[asterisk-users] queue timeout

Mark Michelson mmichelson at digium.com
Fri Aug 22 14:17:14 CDT 2008


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



More information about the asterisk-users mailing list