[Asterisk-Dev] Queues observations

Stephan A. Edelman sedelman at newace.com
Wed Apr 27 21:31:26 MST 2005


> That is not necessary at all. You send the caller into the queue, 
> if they return from it, it's because they could not be connected 
> to an agent for some reason. The QUEUESTATUS variable will tell 
> you why, and depending on the options you have set that may have
> been caused by a timeout, a lack of agents logged in, a lack of 
> agents "available", etc.

Thanks for the heads up on that variable. That's the piece I was
missing.

I tried joinempty=strict (per Brian West) and Queue() indeed returns
immediately. However, I still would like to know before I call Queue()
whether or not an agent is available.

Here's why. Consider this simple dialplan:

exten => s,1,Playback(pls-stay-on-line)
exten => s,2,Playback(for-qc-and-training-purposes)
exten => s,3,Playback(this-call-may-be-monitored-or-recorded)
exten => s,4,Ringing
exten => s,5,Wait,2
exten => s,6,Queue(salesq|td|||45))
exten => s,7,goto(s-${QUEUESTATUS},1)
...

I prefer not to waste the caller's time with "Please stay on the
line...", "Your call may be monitored...", etc. if no agent is logged in
and Queue() will fail with a "no one here" return. 

My current setup is as follows (which works great):

exten => s,1,AgentIsAvail(salesq)		; jump to 102 if no-one
available
exten => s,2,Playback(pls-stay-on-line)
exten => s,3,Playback(silence/600)			; 600 ms
exten => s,4,eagi(eagi-ccno|ffsecn|5000|11)	; ask for customer care
no
exten => s,5,Playback(for-qc-and-training-purposes)
exten => s,6,Playback(this-call-may-be-monitored-or-recorded)
exten => s,7,Ringing
exten => s,8,Wait,2
exten => s,9,Queue(salesq|t|||45)
exten => s,10,AgentIsAvail(salesq)		; jump to 111 if no-one
available
exten => s,11,Goto(ssubmenu,s,9)

exten => s,102,Playback(nbdy-avail-to-take-call)
exten => s,103,Voicemail(4222)
exten => s,104,Goto(goodbye,s,1)

exten => s,111,Goto(102)
exten => s,n,Hangup

This causes the caller to immediately hear "nobody is avail..." and
dumps to voicemail. I'm not wasting the caller's time with superfluous
instructions that don't apply at that moment.

I'm an asterisk rookie, so if someone has a better way to do it, please
let me know.

Regards,

Stephan.




More information about the asterisk-dev mailing list