Asterisk config queues.conf
Created by: oej,Last modification on Tue 19 of Aug, 2008 [23:34 UTC] by ardentbiker
queues.conf
ACD (Automatic Call Distributor) distributes incoming calls in the order of arrival to the first available agent. The system answers each call immediately and, if necessary, holds it in a queue until it can be directed to the next available call center agent. Balancing the workload among agents ensures that each caller receives prompt and professional service.Asterisk supports multiple call queues. They are defined in the queues.conf file and then referenced as arguments to the Queue application in extensions.conf. Agents are defined in the agents.conf file.
See also Asterisk call queues.
New feature (Jul 31, 2005 CVS HEAD)
Periodic announcements are available in queues using the new periodic-announce and periodic-announce-frequency options. This allows a message like "Thank you for holding, your call is important to us." to be played at regular intervals while a caller is in the queue. e.g:periodic-announce = thank-you-message
periodic-announce-frequency = 60 ; every 60 seconds
New feature (Jan 06, 2005):
Gives queues a 'weight' option, to ensure calls waiting in a higher priority queue will deliver its calls first. Only delays the lower weight queue's call if the member is also in the higher weight queue. Thanks to k3v for this optionweight =
weight = expects an integer value
This option may cause a queue deadlock - please see Bug Note 6196 http://bugs2.digium.com/view.php?id=6196 for information and patch
New feature (Sep 28, 2004):
Introduced right after the v1.0 releaseIf you wish to remove callers from the queue if there are no agents present, add the following line to your queues.conf file:
leavewhenempty = yes
- If you are using CVS-HEAD and agents the queue app sees the agents as queue members always thus breaking this try
If there are calls queued, and the last agent logs out, the remaining incoming callers will immediately be removed from the queue, and the Queue() call will return, If leavewhenempty" is set to "strict".
; joinempty=strict
"joinempty" set to "strict" will keep incoming callers from being placed in queues where there are no agents to take calls. The Queue() application will return, and the dial plan can detemine what to do next.
NOTE: In version 1.0.9 (and perhaps other versions of the 1.0 release series), you must use Asterisk cmd AddQueueMember instead of Asterisk cmd AgentCallbackLogin or Asterisk cmd AgentLogin if you want the options leavewhenempty and joinempty to work properly. If you have any static queue members defined as "Member => Agent/XXXX" in your Queue definiation, Asterisk will considered the Queue in-use, regardless of whether any Agents are logged in or not. AddQueueMember() on the other hand will dynamically add and remove the interface from the queue... and these options will work properly.
New feature: Position announcement
Introduced into Asterisk after v0.7.2 (see bug note #214 in the Mantis bugtracker). See the file queues.conf.sample for configuration options like; Calls may be recorded using Asterisk's monitor resource
; This can be enabled from within the Queue application, starting recording
; when the call is actually picked up; thus, only successful calls are
; recorded, and you are not recording while people are listening to MOH.
; To enable monitoring, simply specify "monitor-format"; it will be disabled
; otherwise.
;
; monitor-format = gsm|wav|wav49
; How often to announce queue position and/or estimated holdtime to caller (0=off)
;
;announce-frequency = 90
;
; Should we include estimated hold time in position announcements?
; Either yes, no, or only once; hold time will not be announced if <1 minute
;
;announce-holdtime = yes|no|once
;
; Use these sound files in making position/holdtime announcements. The
; defaults are as listed below — change only if you need to.
;
;queue-youarenext = "queue-youarenext" ; ("You are now first in line.")
;queue-thereare = "queue-thereare" ; ("There are")
;queue-callswaiting = "queue-callswaiting" ; ("calls waiting.")
;queue-holdtime = "queue-holdtime" ; ("The current est. holdtime is")
;queue-minutes = "queue-minutes" ; ("minutes.")
;queue-thankyou = "queue-thankyou" ; ("Thank you for your patience.")
;Note: when the semicolons don't work, leave them out e.g.:
;queue-thankyou=yoursoundfile
;
; Note that a timeout to fail out of a queue may be passed as part of application call
; from extensions.conf:
; Queue(queuename|options|optionalurl|announceoverride|timeout)
; example: Queue(dave|t|||45)
Understanding announcements
The key point with announcements is that they are only played within the timeout/retry period set on the queue. For the most part this works OK as when all queue members are busy/unavailable, the timeout/retry period is effectively ignored (i.e. you can consider the queue to always be in this state) and announcements will be played as per your setting of the announce-frequency and periodic-announce-frequency parameters. When a handset is available and the queue is ringing it, the timeout/retry timeouts become critical. For example, if you want announcements every 20 seconds, but the timeout is set to 60 seconds, when a queue member is ringing, you will only ever get announcements every 60 seconds.'announce-frequency' controls how often the queue position (if 'announce-position' is set), estimated hold time ('announce-holdtime') and the thankyou file ('queue-thankyou') are played.
'min-announce-frequency' defines a minimum time which must pass between position/holdtime announcements. This stops the caller receiving multiple queue position announcement messages in quick succession for a queue that has many callers and is being serviced quickly.
'periodic-announce-frequency' defines how often the file(s) defined in 'periodic-announce' are played.
Note that calls are not offered to queue members whilst the announcement is playing and it is possible for callers to slip ahead in the queue as a result. For example, call 1 arrives and is queued. Call 2 arrives ten seconds later and is queued. After twenty seconds, call 1 is played the periodic announce message. Exactly one second after call 1 starts hearing the message an agent becomes free. Since call 1 is tied up with announcements, call 2 is successfully offered to the agent. Call 1 remains on hold and yet a call which arrived later has been serviced.
Wrapuptime
This setting can be in agents or in the queue. But it needs to be in the queue.conf file for agents that are are listed as members.; After a successful call, how long to wait before sending a potentially
; free member another call (default is 0, or no delay)
;
;wrapuptime=15
Memberdelay
This sets a delay period between the time that the member answers the call and when it is connected.;memberdelay = 5
timeoutrestart
If timeoutrestart is set to yes, then the timeout for an agent to answer is reset if a BUSY or CONGESTION is received. This can be useful if agents are able to cancel a call with reject or similar. (I found that when agents return NOANSWER (ring, no-answer) this also causes the queue to move to the next agent in a roundrobin);timeoutreset = yes
Strategy
Calls are distributed among the members handling a queue with one of several strategies- ringall: ring all available channels until one answers (default)
- roundrobin: take turns ringing each available interface (depreciated in 1.4, use rrmemory)
- leastrecent: ring interface which was least recently called by this queue
- fewestcalls: ring the one with fewest completed calls from this queue
- random: ring random interface
- rrmemory: round robin with memory, remember where we left off last ring pass
- linear: Rings interfaces in the order they are listed in the configuration file. Dynamic members will be rung in the order in which they were added. (new in 1.6)
- wrandom: Rings a random interface, but uses the agent's penalty as a weight (new in 1.6)
Timeout
Timeout in seconds when calling an agent;timeout=15
context=<context>
This is the context that is used to allow the caller to exit with a key for further action. For example, press "1" to leave a messageannounce
The "announce = XXX" option in queues.conf makes Asterisk play the XXX announcement to the member of the queue who picks up the call in a similar manner to the A() option of the Dial() cmd. This can also be invoked in the Queue() application ('Queue(queuename,options,URL,announceoverride,timeout,AGI,macro,gosub,rule)').Note that the announcement is played in the language set on the answering device, not in the language of the originating channel.
Examples
Tutorials
- Asterisk Queues Tutorial (from Orderly Software).
Notes
- The penalty parameter: You can have agents that are less likely to take calls (e.g. imagine a sales queue, you'd have the sales people with no penalty, you might have the receptionists with a penalty of 1 and us propeller heads in technical support with a penalty of 2). The technical support people would only be offered a call from the sales queue if all the sales people and the receptionists were busy.
- If you include groups in your queue definition the calls get routed in the order of the group regardless of the specified strategy. So I just have a member= line for each agent.
member => Agent/@1 ; a group
member => Agent/501 ; a single agent
member => Agent/:1,1 ; Any agent in group 1, wait for first available, but consider with penalty
Some notes about roundrobin and rrmemory
roundrobin is not to be confused with "circular call distribution", infact even using roundrobin without memory subsequent calls are circulated between agent, here in detail it's how it works, by kpfleming.
roundrobin mode remembers the last agent it _started_ with for a new call, and starts with the next agent in the list. If you have three agents, the first call will go to agent 1->2->3, the next call will go to 2->3->1, the next call will go to 3->2->1, etc.
rrmemory mode remembers the last agent it tried to _call_, regardless of who it started with, so that the next call will go the agent after the last one who answered. If you have three agents and the first call rings 1->2 (and is answered), then the next call will ring 3->1 (and is answered), then the next call will ring 2->3->1, etc. For the first call, if agent 2 answered it in roundrobin mode, they would still be the first agent for the next call, but rrmemory mode will move past them.
You can, however, achieve circular call distribution by using roundrobin mode and putting a different penalty on each agent, in the order you wish them to be called. app_queue will always try all agents with no penalty, then the ones with penalty 1, etc. NOTE that this does not apply to 1.4.13 (an possibly earlier versions). There is no 'roundrobin' strategy any more and 'rrmemory' will continue to try the lowest priority handset(s) - there is no way of doing circular call distribution any more.
See also
- Asterisk config agents.conf
- Asterisk cmd Queue
- Asterisk agents
- OrderlyQ - Extension to Asterisk Queues that lets callers hang up, then call back without losing their place.
- AstQueueIcon: Alternative free queue solution utilitzing the call parking feature instead of the queue application. As the queue app stays out of the media path, features like call forwarding will not be denied for the agents.
Comments
333timeout member queue issue enter pin beyond 1.4.11; workaround for 1.4.13
333Penalty - Latest Build V1.2.24
333Estimated waiting time
How does asterisk calculates the estimated holdtime? How can I set it properly?
333Circular call distribution: doesn't work?
I want to use roundrobin, but have the queue keep no memory at all of the last phone rung, but to always start at the first member of the queue. In earlier versions of Asterisk (0.9.x), I'd written my own strategy that I called roundrobinreset. I attempted to make this work by using roundrobin in 1.2.13 and assigning 0,1,2,3,4 etc. penalties to all of the queue members, but this doesn't work. The call stays on the 0 penalty member and continues to ring. Does something else have to be set on the queue to make this work?
333
333
333issue with the announceholdtime
still i did not got any message while iam in hold . iam using the latest cvs-head.my announce-frequency = 200
333Re: issue with leastrecent strategy
333issue with leastrecent strategy
This may be limited to the business edition.
Even if you have _ set in agents.conf it will never log out an agent if the queue timeout is shorter. The agent stops being rung before they can be logged out and is rung over again.
If an agent rung with the "leastrecent" strategy is not answering, and not being logged out (either because a logout is not set or because of the above situation) all new callers will be directed towards that agent. I would consider this a bug.
I encourage you to use the "roundrobin" strategy if you find this is an issue for you.
333Re: correction to queue sounds