[asterisk-users] Defining what an extension should do after the Dial() command returns busy.

Steve Edwards asterisk.org at sedwards.com
Wed Feb 9 14:36:16 CST 2011


Un-top-posting...

On Wed, 9 Feb 2011, Ernie Dunbar wrote:

>> We have a customer who wants to forward an extension to their cell 
>> phone, if and only if that extension is "unavailable", or when the 
>> Dial() command times out. However, should the Dial() command return 
>> "busy" it should go to voicemail instead.

On Wed, 9 Feb 2011, Danny Nicholas wrote:

>> Perhaps your "googling" skills need some management - look for S-BUSY, 
>> S-NOANSWER.

>> Here's a snippet that might do what they want
>> - exten => s,1,Dial(DAHDI/1/5551212,30)
>> - exten => s,n-BUSY,voicemail(blah)
>> - exten => s,n-UNAVAILABLE,Dial(DAHDI/1/5552323,30)
>> - exten => t,1,Dial(DAHDI/1/5552323,30) Cell

On Wed, 9 Feb 2011, Ernie Dunbar wrote:

> It's nice to know that you've tried this and are presenting me with a 
> proven solution.
>
> FYI, this doesn't work. Neither do any of the following variations:

Off the top of his head, Danny put you into the 'ballpark,' a little bit 
more googling on your part would have brought you home.

Off the top of my head, the missing step is using the DIALSTATUS returned 
by the dial() application as the target of a goto. Like:

 	exten = s,n,			goto(s-${DIALSTATUS},1)

and then your dialplan should include extensions like:

 	exten = s-BUSY,1,		verbose(1,[${EXTEN}@${CONTEXT}])
 	exten = s-BUSY,n,		...

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000



More information about the asterisk-users mailing list