[asterisk-users] How to quickly move on to Dahdi channels when SIP provider fails?

William Stillwell william at stillwellsoft.com
Wed Dec 8 21:43:42 UTC 2010


From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Warren Selby
Sent: Wednesday, December 08, 2010 4:11 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] How to quickly move on to Dahdi channels when
SIP provider fails?

 

On Wed, Dec 8, 2010 at 1:50 PM, Tilghman Lesher <tlesher at digium.com> wrote:

On Wednesday 08 December 2010 11:33:10 Bruce B wrote:
> Thanks for the input guys. I really appreciate all the input and I am
> sure they work but I thought there would be a much better way to do
> this. Sounds like patching things to me. Why doesn't Asterisk take
> advantage of the qualify values to make sure if the SIP connection is
> up or not? Shouldn't this become a native feature of the PBX rather
> than trying to do work-around?



Enable qualify on your SIP peers.  Then configure your outbound dialplan
like this:

exten => outboundexten,1,Dial(SIP/...)
exten => outboundexten,n,Dial(DAHDI/...)

If the SIP is up, the call goes through on that Dial statement.  When the
call is over and the people hangup, it will not continue down to the next
line.  If it's down (and the system knows this because of qualify), it will
fail and automatically roll to the next line.  I've used this to setup
failover between DAHDI and SIP a few times.

-- 
Thanks,
--Warren Selby, dCAP
http://www.selbytech.com

 

 

Another thing to check is Congestion, sometimes my Sip Provider works fine,
but for some reason there end peer has failed.

 

exten => s,n,Dial(SIP/XXXXXX at ProviderX)

exten => s,n,GotoIf($["${DIALSTATUS}" = "CONGESTION"]?ProviderXCongestion)

exten => s,n,Hangup()             

exten => s,n(ProviderXCongestion),Dial(IAX2/XXXXX/XXXXX)

exten => s,n,GotoIf($["${DIALSTATUS}" = "CONGESTION"]?ProviderYCongestion)

exten => s,n,Hangup()     

exten => s,n(ProviderYCongestion),Dial(DAHDI/XXX/XXXXXX)

exten => s,n,Hangup()

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20101208/cb8be16e/attachment.htm 


More information about the asterisk-users mailing list