Queue a call for a call queue
Queues an incoming call in a particular call queue?
as defined in queues.conf?
The option string may contain zero or more of the following characters:
- 't' — allow the called user transfer the calling user
- 'T' — to allow the calling user to transfer the call.
- 'd' — data-quality (modem) call (minimum delay).
- 'H' — allow caller to hang up by hitting *.
- 'n' — no retries on the timeout; will exit this application and go to the next step.
- 'r' — ring instead of playing MOH
In addition to transferring the call, a call may be parked and then picked up by another user. The optional URL will be sent to the called party if the channel supports it, or you can use an external app like XC-AST
to launch it if your terminal does not support it.
This application returns -1 if the originating channel hangs up, or if the call is bridged and either of the parties in the bridge terminate the call. Returns 0 if the queue is full, nonexistant, or has no members.
This method only works when there are no members defined in queues.conf, and instead only added with AddQueueMember(). However with "Member => Agent/101" in queues.conf the Queue command always returns as if there were a member. Update
: 'leavewhenempty = yes' in queues.conf fixes this (in CVS since Sep 28, 2004)
- Dynamically added agents are lost upon Asterisk restart.
- Use the 'Local' channel construct to point to an appropriate dial-out extension in the dialplan if you'd like to add remote agents using AgentCallbackLogin()
- Transfers of calls that are answered out of a queue must be done using Asterisk '#' transfers (enabled with the 't' option above). SIP transfers result in the Agent remaining affiliated with the call until its eventual termination, preventing that agent from being offered another call.
Examples exten => s,1,Answer exten => s,2,SetMusicOnHold(default) exten => s,3,DigitTimeout,5 exten => s,4,ResponseTimeout,10 exten => s,5,Background(welcome) exten => s,6,Queue(tech-queue)
The s,1,Answer is important in order not to have ringing in the background of your hold music.
Here is a working queue-solution as example:
A call comes in over a sip channel, is routed to the extension which handles the sample-queue (here extension 129) in the context sample-queue in extensions.conf. The call, if not answered by an agent, should remain for 300 seconds in the queue, before it is routed to the next priority which transfers the call to voicemail.
The called and the calling user are able to transfer the call (t,T as options of the queue command in extensions.conf).
Signalling the call to logged on agents should work like this:
After the first priority "Playback(some_announce)" has finished, all agents should be signalled (ringall in queues.conf) for at least 15 seconds (timeout in queues.conf). The caller should hear music on hold in the meanwhile. If the call wasn't answered by an agent, there should be some time before the call is signalled again (retry in queues.conf). The actual queue position is announced to the caller every 30 seconds (announce-frequency and announce-holdtime in queues.conf).
exten => 129,1,Playback(some_announce) ; Important, see notes
exten => 129,2,Queue(example_queue|t,T|||300) ;dont set n option until really needed
exten => 129,3,Playback(some_announce_after_leaving_queue)
exten => 129,4,Voicemail(s1234)
music = default
strategy = ringall
context = queue-out ; Here we go when the caller presses a single digit, while in the queue
timeout = 15
announce-frequency = 30
announce-holdtime = yes
joinempty = yes
member => Agent/1234
member => Agent/1235
ackcall=no ; Agent don't has to press # to answer the call
musiconhold => default
agent => 1234,0000,Agent1_Name
agent => 1235,0000, Agent2_Name
Check the timeout settings of your extensions involved in the queue.
Snom Phones have in their web-interface an "invisible" timeout of 60 seconds.
The Playback command, even if an empty file is played, seemed to help avoiding a call from beeing dropped after 60