Hello, I want to ask, how to "detect" queue timeout? If queue members are busy or not answering to the call, and after queue timeout caller would hear : "Sorry all operators are busy, please leave a record": This example: [ivr] exten => start,1,Ringing exten => start,n,Wait(2) exten => start,n,Answer exten => start,n,Playback(ivr/welcome) exten => start,n,Set(RECORD_FILENAME=/var/spool/asterisk/monitor/ivr/operator-${STRFTIME(${EPOCH},,%Y%m%d%H%M%S)}-${CALLERID(num)}) exten => start,n,Set(MONITOR_FILENAME=${RECORD_FILENAME}) exten => start,n,Queue(ivr|tT|||30) exten => t,1,Goto(ivr,recording,1) exten => recording,1,Playback(ivr/leave-the-message) exten => recording,n,Set(RECORD_FILENAME=/var/spool/asterisk/monitor/ivr/irasas-${STRFTIME(${EPOCH},,%Y%m%d%H%M%S)}-${CALLERID(num)}) exten => recording,n,Record(${RECORD_FILENAME}:wav||60) So if operators are busy or not answering, and after 30 sec, I want to run recording. But if operators answered the call, I want just hangup call. And I don't no how to do that. Maybe use Dial command instead using Queue ? Or is another way.... Thanks for your help. -- Pagarbiai / Best Regards, Giedrius Augys -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080822/3d492447/attachment.htm
On Fri, 2008-08-22 at 21:26 +0300, Giedrius Augys wrote:> I want to ask, how to "detect" queue timeout? If queue members are > busy or not answering to the call, and after queue timeout caller > would hear : "Sorry all operators are busy, please leave a record":The Queue() application sets a channel variable named QUEUESTATUS, and by reading that channel variable, you'll be able to evaluate why the call left the queue (due to a timeout or other reason). See the end of the description for the queue application in the online help by typing "core show application queue" at the Asterisk command-line interface. -- Jared Smith Training Manager Digium, Inc.
Giedrius Augys wrote:> Hello, > > I want to ask, how to "detect" queue timeout? If queue members are > busy or not answering to the call, and after queue timeout caller would > hear : "Sorry all operators are busy, please leave a record": > This example: > > [ivr] > exten => start,1,Ringing > exten => start,n,Wait(2) > exten => start,n,Answer > exten => start,n,Playback(ivr/welcome) > exten => > start,n,Set(RECORD_FILENAME=/var/spool/asterisk/monitor/ivr/operator-${STRFTIME(${EPOCH},,%Y%m%d%H%M%S)}-${CALLERID(num)}) > exten => start,n,Set(MONITOR_FILENAME=${RECORD_FILENAME}) > exten => start,n,Queue(ivr|tT|||30) > > exten => t,1,Goto(ivr,recording,1) > > exten => recording,1,Playback(ivr/leave-the-message) > exten => > recording,n,Set(RECORD_FILENAME=/var/spool/asterisk/monitor/ivr/irasas-${STRFTIME(${EPOCH},,%Y%m%d%H%M%S)}-${CALLERID(num)}) > exten => recording,n,Record(${RECORD_FILENAME}:wav||60) > > > So if operators are busy or not answering, and after 30 sec, I want to > run recording. But if operators answered the call, I want just hangup > call. And I don't no how to do that. Maybe use Dial command instead > using Queue ? Or is another way.... > > Thanks for your help. > > -- > Pagarbiai / Best Regards, > Giedrius Augys >You can check the value of QUEUESTATUS after the call to Queue(). If the call timed out, then it will be set to TIMEOUT. Mark Michelson
On Aug 22, 2008, at 2:26 PM, Giedrius Augys wrote:> Hello, > > I want to ask, how to "detect" queue timeout? If queue members are > busy or not answering to the call, and after queue timeout caller > would hear : "Sorry all operators are busy, please leave a record": > This example: > > [ivr] > exten => start,1,Ringing > exten => start,n,Wait(2) > exten => start,n,Answer > exten => start,n,Playback(ivr/welcome) > exten => start,n,Set(RECORD_FILENAME=/var/spool/asterisk/monitor/ivr/ > operator-${STRFTIME(${EPOCH},,%Y%m%d%H%M%S)}-${CALLERID(num)}) > exten => start,n,Set(MONITOR_FILENAME=${RECORD_FILENAME}) > exten => start,n,Queue(ivr|tT|||30)exten => start,n,voicemail(ACCOUNT) Fred Posner www.teamforrest.com -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2162 bytes Desc: not available Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20080822/41192b65/attachment.bin