From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@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 <tles...@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/xxx...@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()

 

 

-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to