[asterisk-users] Failover Configuration

Gordon Henderson gordon+asterisk at drogon.net
Thu Aug 9 15:35:15 CDT 2007


On Thu, 9 Aug 2007, Steve Totaro wrote:

> John Meksavan wrote:
>> Asterisk Users,
>>
>>  The more I work with the Asterisk 1.2.13 on the Debian Etch, the more
>> realize there is no real reliable SIP provider.  Having two Sip
>> Providers is smartest thing to do, one being your main provider, while
>> the other being the failover/safety.
>>
>>  Ideally, I would like it to failover automatically when there is
>> congestion/busy or sip channel dead lock.  If I have to press "9" or
>> some random digit just to make a call out on the 2nd Sip provider, it
>> would be fine also.
>>
>>  What would be the best way of to doing this?
>>
>>  Trying dialing 9 first to use the netlogic trunk did not work, so I
>> commented it out and tried doing the following way.  This does not
>> work.  Any Suggestions?
>>
>> [bv-outbound]
>> exten => _1NXXNXXXXXX,1,Macro(dialout|SIP/${EXTEN}@bvoice-out,30)
>> ;exten => _91NXXNXXXXXX.,1,Macro(dialout|SIP/${EXTEN}@bvoice-out,30)
>> exten => _1NXXNXXXXXX,2,Congestion
>> exten => _1NXXNXXXXXX,3,Macro(dialout|SIP/${EXTEN}@netlogic,30)
>>
>>
>> Best Regards,
>> John
> Try losing the congestion line first.
>
> Try enabling priority jumping and change this line
> exten => _1NXXNXXXXXX,3,Macro(dialout|SIP/${EXTEN}@netlogic,30)
> to
> exten => _1NXXNXXXXXX,102,Macro(dialout|SIP/${EXTEN}@netlogic,30)

I'd say lose the priority jumping[1] and start using the return code from 
Dial to base your decision on what to do next.

So, (approximately! - in particular you might want to do a nother set of 
Goto's after the 2nd dial to play messages back to the caller, etc. if 
this is a desired feature...)

exten => _dialywildcard,1,Macro(dialout|SIP/${EXTEN}@bvoice-out,30)
exten => _dialywildcard,n,Goto(${DIALSTATUS})

exten => _dialywildcard,n(CHANUNAVAIL),Noop(We got CHANUNAVAIL)
exten => _dialywildcard,n,Macro(dialout|SIP/${EXTEN}@netlogic,30)
exten =>  _dialywildcard,n,Hangup()

exten => _dialywildcard,n(CONGESTION),Noop(We got CONGESTION)
exten => _dialywildcard,n,Macro(dialout|SIP/${EXTEN}@netlogic,30)
exten =>  _dialywildcard,n,Hangup()

exten =>  _dialywildcard,n(NOANSWER),Noop(We got NOANSWER)
exten =>  _dialywildcard,n,Answer()
exten =>  _dialywildcard,n,Playback(number-not-answering)
exten =>  _dialywildcard,n,Playback(please-try-again-later)
exten =>  _dialywildcard,n,ResetCDR()
exten =>  _dialywildcard,n,Hangup()

exten =>  _dialywildcard,n(BUSY),Noop(We got BUSY)
exten =>  _dialywildcard,n,Answer()
exten =>  _dialywildcard,n,Playback(that-number)
exten =>  _dialywildcard,n,Playback(is-curntly-busy)
exten =>  _dialywildcard,n,ResetCDR()
exten =>  _dialywildcard,n,Hangup()

exten =>  _dialywildcard,n(ANSWER),Noop() ; should never get this one...
exten =>  _dialywildcard,n(CANCEL),Noop()
exten =>  _dialywildcard,n(DONTCALL),Noop()
exten =>  _dialywildcard,n(TORTURE),Noop()
exten =>  _dialywildcard,n,Answer()
exten =>  _dialywildcard,n,Noop(Unknown dial status of ${DIALSTATUS})
exten =>  _dialywildcard,n,Playback(an-error-has-occured)
exten =>  _dialywildcard,n,Playback(please-try-again-later)
exten =>  _dialywildcard,n,ResetCDR()
exten =>  _dialywildcard,n,Hangup()



Gordon

[1] Isn't priority jumping this depreciated now?



More information about the asterisk-users mailing list