login | register
Fri 29 of Aug, 2008 [20:29 UTC]

voip-info.org

History

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 option

 weight = 

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 release
If 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
; leavewhenempty=strict
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)
;strategy=rrmemory

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 message

announce

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


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

Comments Filter
222

333timeout member queue issue enter pin beyond 1.4.11; workaround for 1.4.13

by lingolep, Thursday 11 of October, 2007 [05:01:31 UTC]
Up to and including asterisk 1.4.11, my queues.conf was set to call a few members using ringall and head to voicemail if the timeout passed to the queue command expired. Versions beyond this though, and in 1.4.13 in particular where I figured out a workaround, instead would say ``Enter pin'' and the asterisk log shows the first sip member gave a cancel or 487 reject message. Its a Grandstream gxp-2020 phone and perhaps it did an auto firmware update on its own that affected a change, though it seems more likely to be related to the asterisk version number since problems began in sync with the update. The workaround is simply to place a timeout= parameter in the queues.conf section, which is lower than the timeout specified in the extensions.conf as a parameter in the Queue cmd itself. For example, Queue cmd passing 45 for timeout with the queues.conf section set to timeout=35 seems to work fine. The config file setting is taken and the next step in extensions.conf gets run properly for Voicemail. The Queue cmd options include the n, though I tried without as well, and I'm using tTnr.
222

333Penalty - Latest Build V1.2.24

by atatham, Tuesday 18 of September, 2007 [12:38:04 UTC]
The penalty system for queues apprears not to work in V1.2.24. Agents are called regardless of their penalty in the queue and the status of others. Has anybody else experienced this?
222

333Estimated waiting time

by Luxvero, Thursday 14 of June, 2007 [14:11:07 UTC]
announceholdtime
How does asterisk calculates the estimated holdtime? How can I set it properly?
222

333Circular call distribution: doesn't work?

by tgice, Saturday 28 of October, 2006 [19:03:16 UTC]
I'm trying to implement what's called "circular call distribution" here, I think.

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?
222

333

by vlrk, Monday 24 of October, 2005 [14:52:20 UTC]


222

333

by vlrk, Monday 24 of October, 2005 [14:51:39 UTC]


222

333issue with the announceholdtime

by vlrk, Wednesday 12 of October, 2005 [09:36:02 UTC]
i am entering into an empty queue i.e no agents are present and in queues.conf i kept announce-holdtime = yes
still i did not got any message while iam in hold . iam using the latest cvs-head.my announce-frequency = 200

222

333Re: issue with leastrecent strategy

by FranklinWebb, Wednesday 07 of September, 2005 [13:45:03 UTC]
sorry "_" was supposed to be "autologgoff"
222

333issue with leastrecent strategy

by FranklinWebb, Wednesday 07 of September, 2005 [13:41:03 UTC]
When using the "leastrecent" strategy you can find yourself in a situation where you have many reps on, yet calls are backing up in the queue because one agent is not answering.

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.
222

333Re: correction to queue sounds

by maverick, Friday 10 of December, 2004 [15:35:47 UTC]
In addition to removing the quotes, I found that using the complete path i.e. /var/lib/asterisk/sounds/queue-xxx made the announcements work. This feature is great! Also running Asterisk 1.0.1