[asterisk-users] Disabling Call-Waiting

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Tue Nov 25 11:00:25 CST 2008


On Tuesday 25 November 2008 10:07:34 Mikhail (Plus Plus) wrote:
> Sorry for hijacking this thread, but I need something similar in
> opposite way the original poster wants:
>
> I have real incoming phone number and all calls on this phone number are
> redirected to local extension: 1234567 -> 515
> where "1234567" is a phone number and "515" is a local extension in
> asterisk. The phone number I get from my provider supposedly has 2
> incoming lines. What I want is:
> If "515" extension is busy, redirect call to local extension "516".
> How this can be achieved?
>
> Right now I have:
>
> exten => 1234567,1,Dial(SIP/515)
> exten => s-NOANSWER,n,Dial(SIP/516)
> exten => s-BUSY,n,Dial(SIP/516)
>
> But this does not work (I guess because I'm wrong).

You're missing a step:

exten => 1234567,1,Dial(SIP/515)
exten => 1234567,n,Goto(s-${DIALSTATUS},1)
exten => s-NOANSWER,1,Dial(SIP/516)
exten => s-BUSY,1,Dial(SIP/516)

or better:

exten => 1234567,1,Dial(SIP/515,30)
exten => 1234567,n,GotoIf($["${DIALSTATUS}"="NOANSWER"]?failover)
exten => 1234567,n,GotoIf($["${DIALSTATUS}"="BUSY"]?failover)
exten => 1234567,n,Goto(voicemail)
exten => 1234567,n(failover),Dial(SIP/516,30)
exten => 1234567,n(voicemail),Voicemail(515,u)

-- 
Tilghman



More information about the asterisk-users mailing list