[asterisk-users] Queue Status
Lee Jenkins
lee at datatrakpos.com
Wed Jan 31 11:37:18 MST 2007
Rob Schall wrote:
> Hello all,
>
> Lee recommended QUEUESTATUS, but that seems to return if anyone is in a
> specific queue, and not if the current call came from a queue. I
> probably just misunderstand how it all works. :)
>
> Thanks all!
> Rob
>
Hi Rob,
Remember that I am pretty new to Asterisk myself. ;)
I'm not sure how you have setup your queues, but with mine, the caller
doesn't go to the agent's voicemail (is it even supposed to?) if the
queue times out. If the queue times out for me, it will go to the next
line in the dialplan (or to the context specified if you allow them to
exit out).
So my suggestion was to see if QUEUESTATUS was set when the call kicks
out of the queue or into whatever context/extension in question, in a
way that could tell you if the call was coming out of a queue.
For my dialplans, I dedicate a single context for entering a queue like
this snippet from my dialplan:
[support_afterhours]
exten=>s,1,Answer()
exten=>s,2,Set(LAST_MENU_REACHED=support_afterhours)
exten=>s,3,Playback(custom/support_reminder)
exten=>s,4,Background(custom/support_afterhours)
exten=>1,1,Queue(support,t|||60)
exten=>1,2,Macro(DialExtenNoVM,112|60|tm)
Because this I already know that extension 1,1 is for entering the
queue, we can assume that if the call gets to 1,2 then there was a timeout.
If the context or extension is not setup so that you can assume a
timeout, then I was suggesting that you checkout the QUEUESTATUS variable:
From the wiki:
http://www.voip-info.org/wiki/view/Asterisk+cmd+Queue
"The application sets the following channel variable upon completion:
QUEUESTATUS. The status of the call as a text string, one of TIMEOUT |
FULL | JOINEMPTY | LEAVEEMPTY | JOINUNAVAIL | LEAVEUNAVAIL"
I just wasn't sure (haven't tested it) if the QUEUESTATUS var is
initially set as a null string if Queue() has not been called yet for
that channel. This would allow you to determine if the call was coming
out of a queue fairly easily:
exten=>s,1,GotoIf($["${QUEUESTATUS}" != ""],?2:3)
exten=>s,2,Macro(MyMacroToHandleQueueTimeouts)
exten=>s,3,Macro(MyNormalDialplanLogicMacro)
Of course, it could be that I completely misunderstood what you are
trying to do ;)
--
Warm Regards,
Lee
More information about the asterisk-users
mailing list