[asterisk-users] Defining what an extension should do after the Dial() command returns busy.
Ernie Dunbar
maillist at lightspeed.ca
Wed Feb 9 16:37:40 CST 2011
> 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.
No, actually I got lots of examples of very, very complicated dialplans
that were about as clear as mud. But your example was much more helpful,
if incomplete.
The final answer (should someone else try to Google this problem) was a
dialplan like this:
exten => 27,1,Dial(SIP/foo,10)
exten => 27,n,Goto(ernie,s-${DIALSTATUS},1)
exten => 27,n,Hangup()
Which would require a separate context like this:
[ernie]
exten => s-BUSY,1,Voicemail(27,u)
exten => s-NOANSWER,1,Dial(DAHDI/g1/5551234)
;; End of context
Of course, each person who wants to do this kind of thing would require a
whole new context just for their forwarding. All of the previous Google
results I found were for far more generic uses of the s-BUSY and
s-NOANSWER extensions, like operator messages for such results.
More information about the asterisk-users
mailing list