[Asterisk-Users] failover outbound dialplan

Ronald Wiplinger ronald at elmit.com
Thu Apr 7 19:40:05 MST 2005


Steve Edwards wrote:

> On Thu, 7 Apr 2005, Jason Brown wrote:
>
>> Does anyone have a working failover outbound calls that I could sponge a
>> hint from? i.e.
>>
>> Exten => _1NXXNXXXXXX,1,Dial(IAX/MyFirstCrappyIAXPeer/${EXTEN},60)
>>
>> Exten =>
>> _1NXXNXXXXXX,2,Dial(IAX/IfMyFirstCrappyIAXPeerDontAnswerIn5SecDialMySecondCr 
>>
>> appyIAXPeer
>>
>> Exten =>
>> _1NXXNXXXXXX,3,Dial(IAX/IfTheyBothDontAnswerTryTheNextCrappyIAXPeer)
>>
>> Exten => _1NXXNXXXXXX,4,Dial(ZAP/g1)(GiveUpTheyAllSuckSoUseThePRI)
>
>
> Looks like you're already there -- this is what I use:
>
>         exten = _1nxxnxxxxxx,1,         noop(CONTEXT=${CONTEXT})
>         exten = _1nxxnxxxxxx,n,         setcidname(Steve,a)
>         exten = _1nxxnxxxxxx,n,         setcidnum(760 555-5555)


Is priority "n" already supported as next one???

> ; sixtel
>         exten = _1nxxnxxxxxx,n,         background(newline/via-sixtel)
>         exten = _1nxxnxxxxxx,n,         dial,${SIXTEL-RESOURCE}/${EXTEN}
> ; voicepulse
>         exten = _1nxxnxxxxxx,n,         
> background(newline/via-voicepulse)
>         exten = _1nxxnxxxxxx,n,         
> dial,${VOICEPULSE-RESOURCE-1}/${EXTEN}
>         exten = _1nxxnxxxxxx,n,         
> dial,${VOICEPULSE-RESOURCE-1}/${EXTEN}
> ; nufone
>         exten = _1nxxnxxxxxx,n,         background(newline/via-nufone)
>         exten = _1nxxnxxxxxx,n,         dial,${NUFONE-RESOURCE}/${EXTEN}
> ; pstn
>         exten = _1nxxnxxxxxx,n,         background(newline/via-pstn)
>         exten = _1nxxnxxxxxx,n,         dial(${TRUNK-RESOURCE}/${EXTEN})
>

I believe it would work, besides that you may wish that each gateway may 
only be used once at a time.
While the gateway may not bother if you use it twice, your accountant 
may, if they send you a second invoice for another flat rate.
The soltuion would be to use setgroup / checkgroup to make sure that 
each gateway is only used once at a time (or how many times you can allow)


bye

Ronald





More information about the asterisk-users mailing list