This configuration file is used to create queues. The queue is very useful function. It allows you to bring more professional services to your customers. Thanks to the queues, the system is able to answers each call immediately without considering whether there is an available operator or not. If all the lines are busy or unavailable, the call will be hold in a queue until it could be answered by the next available call agent.
The queues.conf is responsible for the control of the queues.
2. The queues.conf file
There are two types of contexts. The first one is the [general] context. Its name cannot be changed. The name of the other context could be arbitrary. It could be whatever you want. You define the start of a context by typing the following: [general]. Do not forget the brackets. One context ends when another one starts.
For example:
start--> [context name]
option1=something
......
end--->
start next--->[other context name]
option1=something
.....
Now, lets take a look at the options in the [general] context.
1) The general context
The following option is available:
persistentmembers - if this option is set to yes, it will cause the system to store each dynamically logged in agent, from each separate queue, in the Asterisk`s database. In this way, in case of restarting the Asterisk PBX, the agents will be automatically readded into their recorded queues. By default the option is set to yes.
autofill - (default value - yes) - The old/current behavior of the queue has a serial type behavior in that the queue will make all waiting callers wait in the queue even if there is more than one available member ready to take calls until the head caller is connected with the member they were trying to get to. The next waiting caller in line then becomes the head caller, and they are then connected with the next available member and all available members and waiting callers waits while this happens. The new behavior, enabled by setting autofill=yes makes sure that when the waiting callers are connecting with available members in a parallel fashion until there are no more available members or no more waiting callers. This is probably more along the lines of how a queue should work and in most cases, you will want to enable this behavior. If you do not specify or comment out this option, it will default to no to keep backward compatibility with the old behavior.
monitor-type - (default value - MixMonitor). When specifying monitor-format to enable recording of queue member conversations, app_queue will now use the new MixMonitor application instead of Monitor so the concept of "joining/mixing" the in/out files now goes away when this is enabled. You can set the default type for all queues here, and then also change monitor-type for individual queues within queue by using the same configuration parameter within a queue configuration block. If you do not specify or comment out this option, it will default to the old 'Monitor' behavior to keep backward compatibility.
The [general] context is the place for the global settings
2) The named context
The following options are available:
musicclass - (default value - default). Musicclass sets which music applies for this particular call queue. The only class which can override this one is if the MOH class is set directly on the channel using Set(CHANNEL(musicclass)=whatever) in the dialplan.
announce - thanks to this option you can specify an announcement, which to be played to the agents, when they answer the incoming call. Usually this option is used to inform the agents, which queue exactly, they will answer. This is made for agents which are set in more than one queue.
strategy - with this option you define, in what way the incoming calls, to ring to the agents. The following strategies are available:
ringall - ring to all available agents in the queue until one answers. This is the strategy set by default
roundrobin - ring to the each available agent one by one.
leastrecent - ring the agent which was least recently called by this queue.
fewestcalls - ring the agent with fewest completed calls from this queue.
random - ring randomly the agents
rrmemory - round robin with memory, remember where we left off the last answered ring and tries to ring the next agent.
servicelevel - the option is used for service level statistics. You set a period of time in which the calls has to be answered. By default it is set to 0(disabled).
context - with this option you can specify a context(from extensions.conf) in which the user to be transfered in case of pressing a single digit. If the user press a digit, it will be taken out from the queue and transfered to the specified context in the extension with number the same as the pressed one.
timeout - How long can we wait ringing, before to consider that the call won`t be answered. the time is in seconds.
retry - How long can we wait before to start trying all the members again.
weight - when one channel is included in more than one queue, the queue with the higher weight will be the first one which will handle an incoming call on this channel.
wrapuptime - this option sets a period of time, which has to expire, after one call is finished, before another call to be pass to the agent. The time is in seconds.
autopause - (default value - yes) - Autopause will pause a queue member if they fail to answer a call.
maxlen - with this option we define the maximum number of calls which could wait in the queue. (0 is for unlimited).
setinterfacevar - (default value - no) - If set to yes, just prior to the caller being bridged with a queue member the MEMBERINTERFACE variable will be set with the interface name (eg. Agent/1234) of the queue member that was chosen and is now connected to be bridged with the caller.
announce-frequency - this option defines through how many seconds the system to announce the current position of the caller in the queue. If it is set to zero, the option will be turned off.
periodic-announce-frequency - How often to make any periodic announcement
announce-holdtime - setting this option to yes will cause the including of the estimated hold time in the position announcements. There are three possible choices for this option yes, no and once
announce-round-seconds - If this option is set to something different from zero, then the system will announce the seconds, as well as the minutes, rounded to this value.
The following position/holdtime announcement files are available to be played:
queue-youarenext = queue-youarenext - the message which will be played is: You are now first in the line.
queue-thereare = queue-thereare - the message which will be played is: There are
queue-callswaiting = queue-callswaiting - the message which will be played is: calls waiting.
queue-holdtime = queue-holdtime - the message which will be played is: The current estimated holdtime is
queue-minutes = queue-minutes - - the message which will be played is: minutes.
queue-seconds = queue-seconds - the message which will be played is: seconds.
queue-thankyou = queue-thankyou - the message which will be played is: Thank you for your patience.
queue-lessthan = queue-less-than - the message which will be played is: less than
queue-reporthold = queue-reporthold - the message which will be played is: Hold time
periodic-announce = queue-periodic-announce - the message which will be played is: All representatives are busy / wait for next.
This sound messages can be changed if you need to. Just record your own messages and replace the right part of the options above with the names of your files. You have to put the sound files in the directories /var/lib/asterisk/sounds and /usr/src/asterisk/sounds.
monitor-format - this option has two functions. The first one is to enable the monitoring of the conversation. In other words to enable the recording of the call. The second function is to specify the desired format for the files, in which the conversations will be stored. The recording will start when the call is answered. The best part is no recording will be initiated while the people are listening to music on hold. The name of the file will be defined by the variable ${UNIQUEID}. If you would like to change it to something else, you can use the Set application. The possible formats are: gsm, wav and wav49
monitor-join - when this option is set to yes the two files, in which the conversation is recorded (one for the output sound and one for the input sound), will be mixed together in one joint file automatically.
joinempty - through this option, you can determine, whether the caller could join a queue with no members or not. There are three possible choices.
yes - you allow the callers to join queues with no members or unavailable members.
no - you disallow the callers to join a queue with no members
strict - the callers cannot join a queue with no members, but they can join queues with unavailable members.
leavewhenempty - if this option is set to yes you will allow the removing of callers from the queue, if there are new callers, which cannot join. The possible choices are the same as the ones for the joinempty option.
eventwhencalled - when this option is set to yes, the following manager events will be generated: AgentCalled, AgentDump, AgentConnect and AgentComplete.
eventmemberstatus - (default value - no) - If this is set to yes, the following manager events will be generated:
QueueMemberStatus
(may generate a WHOLE LOT of extra manager events)
reportholdtime - this option is very useful. When it is set to yes, the member of the queue, which answer the line, will hear for how long the caller has been left on music on hold.
memberdelay - if you wish to have a silent period of time before the member of the queue to be connected to the caller, you can set to this option a delay in seconds.
ringinuse - (default value - no) - If you want the queue to avoid sending calls to members whose devices are known to be 'in use' (via the channel driver supporting that device state) uncomment this option. (Note: only the SIP channel driver currently is able to report 'in use').
timeoutrestart - If this option is set to yes, and a BUSY or CONGESTION signal received on the line, the agent`s timeout for answering will be reseted. This can be useful with agents, which has the permission to cancel a call with reject.
3. The creation of a queue
Now, lets see the form for creating a queue and how to assign agents to it.
There are two forms:
1) If you use the agents.conf file. In other words if you use the dynamic way. When you use this way, your agents could login from any work station. They are not bind to one particular work station. The form is:member => Agent/<agent number|group>,<penalty>
member is a key word. It is followed by the => characters and then another key word - Agent. For the next setting you have a couple of possibilities.
The first one is to write the the agent number:
For example:
member => Agent/8888
The second possibility is to write the number of the group, in which the agent is included(if there is such one. Look at agents.conf). In this way all incoming calls in the queue will be forwarded to the agents of this agent group. Below we will give you an example how to call an agent group.
For example:
member => Agent/@1
or
member => Agent/:1
It is one and the same. This will call the group with number 1
penalty - it is some kind of priority. The idea is, that the system will try to ring first to the agents with the lower priority. So the agents with the higher penalty will be tried last. The penalty is optional
2) If you do not use the agents.conf file. The so called static way. The disadvantage of this way is that the user is bind to one work station(the one on which is registered) and it cannot login into the queue from another work station. The form is: member => Agent/interface/user>,<penalty>.
member is a key word. It is followed by the => characters and then another key word - Agent.
[interface/user] - you have to write the name of the registered user, which you would like to answer the incoming calls in the queue and also the channel through which the connection to be established.
For example:
member => SIP/operator
penalty - it is some kind of priority. The idea is, that the system will try to ring first to the agents with the lower priority. So the agents with the higher penalty will be tried last. The penalty is optional
4. Example
[general]
persistentmembers = yes
[queue_test1]
reportholdtime=yes
member => Agent/user1
member => Agent/user2
member => Agent/user3
member => Agent/user4
member => Agent/user5
[queue_test2]
monitor-format=wav
monitor-join
strategy = ringall
member => Agent/user1
member => Agent/user2
member => Agent/user3
member => Agent/user4
member => Agent/user5
[test]
context=qtest
announce-frequency=5
periodic-announce-frequency=5
announce-holdtime=yes
announce-round-seconds=10
reportholdtime=yes
queue-youarenext = queue-youarenext
queue-thereare = queue-thereare
queue-callswaiting = queue-callswaiting
queue-holdtime = queue-holdtime
queue-minutes = queue-minutes
queue-seconds = queue-seconds
queue-thankyou = queue-thankyou
queue-lessthan = queue-less-than
queue-reporthold = queue-reporthold
periodic-announce = queue-periodic-announce
member => SIP/operator
5. Additional information
For more information look at agents.conf and the dialplan application concerning the queues:
AddQueueMember
RemoveQueueMember
AgentLogin
AgentMonitorOutgoing
PauseQueueMember
UnpauseQueueMember
http://www.asteriskguru.com/tutorials/queues_conf.html
The queues.conf is responsible for the control of the queues.
2. The queues.conf file
There are two types of contexts. The first one is the [general] context. Its name cannot be changed. The name of the other context could be arbitrary. It could be whatever you want. You define the start of a context by typing the following: [general]. Do not forget the brackets. One context ends when another one starts.
For example:
start--> [context name]
option1=something
......
end--->
start next--->[other context name]
option1=something
.....
Now, lets take a look at the options in the [general] context.
1) The general context
The following option is available:
persistentmembers - if this option is set to yes, it will cause the system to store each dynamically logged in agent, from each separate queue, in the Asterisk`s database. In this way, in case of restarting the Asterisk PBX, the agents will be automatically readded into their recorded queues. By default the option is set to yes.
autofill - (default value - yes) - The old/current behavior of the queue has a serial type behavior in that the queue will make all waiting callers wait in the queue even if there is more than one available member ready to take calls until the head caller is connected with the member they were trying to get to. The next waiting caller in line then becomes the head caller, and they are then connected with the next available member and all available members and waiting callers waits while this happens. The new behavior, enabled by setting autofill=yes makes sure that when the waiting callers are connecting with available members in a parallel fashion until there are no more available members or no more waiting callers. This is probably more along the lines of how a queue should work and in most cases, you will want to enable this behavior. If you do not specify or comment out this option, it will default to no to keep backward compatibility with the old behavior.
monitor-type - (default value - MixMonitor). When specifying monitor-format to enable recording of queue member conversations, app_queue will now use the new MixMonitor application instead of Monitor so the concept of "joining/mixing" the in/out files now goes away when this is enabled. You can set the default type for all queues here, and then also change monitor-type for individual queues within queue by using the same configuration parameter within a queue configuration block. If you do not specify or comment out this option, it will default to the old 'Monitor' behavior to keep backward compatibility.
The [general] context is the place for the global settings
2) The named context
The following options are available:
musicclass - (default value - default). Musicclass sets which music applies for this particular call queue. The only class which can override this one is if the MOH class is set directly on the channel using Set(CHANNEL(musicclass)=whatever) in the dialplan.
announce - thanks to this option you can specify an announcement, which to be played to the agents, when they answer the incoming call. Usually this option is used to inform the agents, which queue exactly, they will answer. This is made for agents which are set in more than one queue.
strategy - with this option you define, in what way the incoming calls, to ring to the agents. The following strategies are available:
ringall - ring to all available agents in the queue until one answers. This is the strategy set by default
roundrobin - ring to the each available agent one by one.
leastrecent - ring the agent which was least recently called by this queue.
fewestcalls - ring the agent with fewest completed calls from this queue.
random - ring randomly the agents
rrmemory - round robin with memory, remember where we left off the last answered ring and tries to ring the next agent.
servicelevel - the option is used for service level statistics. You set a period of time in which the calls has to be answered. By default it is set to 0(disabled).
context - with this option you can specify a context(from extensions.conf) in which the user to be transfered in case of pressing a single digit. If the user press a digit, it will be taken out from the queue and transfered to the specified context in the extension with number the same as the pressed one.
timeout - How long can we wait ringing, before to consider that the call won`t be answered. the time is in seconds.
retry - How long can we wait before to start trying all the members again.
weight - when one channel is included in more than one queue, the queue with the higher weight will be the first one which will handle an incoming call on this channel.
wrapuptime - this option sets a period of time, which has to expire, after one call is finished, before another call to be pass to the agent. The time is in seconds.
autopause - (default value - yes) - Autopause will pause a queue member if they fail to answer a call.
maxlen - with this option we define the maximum number of calls which could wait in the queue. (0 is for unlimited).
setinterfacevar - (default value - no) - If set to yes, just prior to the caller being bridged with a queue member the MEMBERINTERFACE variable will be set with the interface name (eg. Agent/1234) of the queue member that was chosen and is now connected to be bridged with the caller.
announce-frequency - this option defines through how many seconds the system to announce the current position of the caller in the queue. If it is set to zero, the option will be turned off.
periodic-announce-frequency - How often to make any periodic announcement
announce-holdtime - setting this option to yes will cause the including of the estimated hold time in the position announcements. There are three possible choices for this option yes, no and once
announce-round-seconds - If this option is set to something different from zero, then the system will announce the seconds, as well as the minutes, rounded to this value.
The following position/holdtime announcement files are available to be played:
queue-youarenext = queue-youarenext - the message which will be played is: You are now first in the line.
queue-thereare = queue-thereare - the message which will be played is: There are
queue-callswaiting = queue-callswaiting - the message which will be played is: calls waiting.
queue-holdtime = queue-holdtime - the message which will be played is: The current estimated holdtime is
queue-minutes = queue-minutes - - the message which will be played is: minutes.
queue-seconds = queue-seconds - the message which will be played is: seconds.
queue-thankyou = queue-thankyou - the message which will be played is: Thank you for your patience.
queue-lessthan = queue-less-than - the message which will be played is: less than
queue-reporthold = queue-reporthold - the message which will be played is: Hold time
periodic-announce = queue-periodic-announce - the message which will be played is: All representatives are busy / wait for next.
This sound messages can be changed if you need to. Just record your own messages and replace the right part of the options above with the names of your files. You have to put the sound files in the directories /var/lib/asterisk/sounds and /usr/src/asterisk/sounds.
monitor-format - this option has two functions. The first one is to enable the monitoring of the conversation. In other words to enable the recording of the call. The second function is to specify the desired format for the files, in which the conversations will be stored. The recording will start when the call is answered. The best part is no recording will be initiated while the people are listening to music on hold. The name of the file will be defined by the variable ${UNIQUEID}. If you would like to change it to something else, you can use the Set application. The possible formats are: gsm, wav and wav49
monitor-join - when this option is set to yes the two files, in which the conversation is recorded (one for the output sound and one for the input sound), will be mixed together in one joint file automatically.
joinempty - through this option, you can determine, whether the caller could join a queue with no members or not. There are three possible choices.
yes - you allow the callers to join queues with no members or unavailable members.
no - you disallow the callers to join a queue with no members
strict - the callers cannot join a queue with no members, but they can join queues with unavailable members.
leavewhenempty - if this option is set to yes you will allow the removing of callers from the queue, if there are new callers, which cannot join. The possible choices are the same as the ones for the joinempty option.
eventwhencalled - when this option is set to yes, the following manager events will be generated: AgentCalled, AgentDump, AgentConnect and AgentComplete.
eventmemberstatus - (default value - no) - If this is set to yes, the following manager events will be generated:
QueueMemberStatus
(may generate a WHOLE LOT of extra manager events)
reportholdtime - this option is very useful. When it is set to yes, the member of the queue, which answer the line, will hear for how long the caller has been left on music on hold.
memberdelay - if you wish to have a silent period of time before the member of the queue to be connected to the caller, you can set to this option a delay in seconds.
ringinuse - (default value - no) - If you want the queue to avoid sending calls to members whose devices are known to be 'in use' (via the channel driver supporting that device state) uncomment this option. (Note: only the SIP channel driver currently is able to report 'in use').
timeoutrestart - If this option is set to yes, and a BUSY or CONGESTION signal received on the line, the agent`s timeout for answering will be reseted. This can be useful with agents, which has the permission to cancel a call with reject.
3. The creation of a queue
Now, lets see the form for creating a queue and how to assign agents to it.
There are two forms:
1) If you use the agents.conf file. In other words if you use the dynamic way. When you use this way, your agents could login from any work station. They are not bind to one particular work station. The form is:member => Agent/<agent number|group>,<penalty>
member is a key word. It is followed by the => characters and then another key word - Agent. For the next setting you have a couple of possibilities.
The first one is to write the the agent number:
For example:
member => Agent/8888
The second possibility is to write the number of the group, in which the agent is included(if there is such one. Look at agents.conf). In this way all incoming calls in the queue will be forwarded to the agents of this agent group. Below we will give you an example how to call an agent group.
For example:
member => Agent/@1
or
member => Agent/:1
It is one and the same. This will call the group with number 1
penalty - it is some kind of priority. The idea is, that the system will try to ring first to the agents with the lower priority. So the agents with the higher penalty will be tried last. The penalty is optional
2) If you do not use the agents.conf file. The so called static way. The disadvantage of this way is that the user is bind to one work station(the one on which is registered) and it cannot login into the queue from another work station. The form is: member => Agent/interface/user>,<penalty>.
member is a key word. It is followed by the => characters and then another key word - Agent.
[interface/user] - you have to write the name of the registered user, which you would like to answer the incoming calls in the queue and also the channel through which the connection to be established.
For example:
member => SIP/operator
penalty - it is some kind of priority. The idea is, that the system will try to ring first to the agents with the lower priority. So the agents with the higher penalty will be tried last. The penalty is optional
4. Example
[general]
persistentmembers = yes
[queue_test1]
reportholdtime=yes
member => Agent/user1
member => Agent/user2
member => Agent/user3
member => Agent/user4
member => Agent/user5
[queue_test2]
monitor-format=wav
monitor-join
strategy = ringall
member => Agent/user1
member => Agent/user2
member => Agent/user3
member => Agent/user4
member => Agent/user5
[test]
context=qtest
announce-frequency=5
periodic-announce-frequency=5
announce-holdtime=yes
announce-round-seconds=10
reportholdtime=yes
queue-youarenext = queue-youarenext
queue-thereare = queue-thereare
queue-callswaiting = queue-callswaiting
queue-holdtime = queue-holdtime
queue-minutes = queue-minutes
queue-seconds = queue-seconds
queue-thankyou = queue-thankyou
queue-lessthan = queue-less-than
queue-reporthold = queue-reporthold
periodic-announce = queue-periodic-announce
member => SIP/operator
5. Additional information
For more information look at agents.conf and the dialplan application concerning the queues:
AddQueueMember
RemoveQueueMember
AgentLogin
AgentMonitorOutgoing
PauseQueueMember
UnpauseQueueMember
http://www.asteriskguru.com/tutorials/queues_conf.html