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

Danny Nicholas danny at debsinc.com
Wed Dec 8 16:53:54 UTC 2010


From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Bruce B
Sent: Wednesday, December 08, 2010 10:46 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] How to quickly move on to Dahdi channels when
SIPprovider fails?

 

Hi Everyone,

 

There are situations when internet connection is lost, SIP provider fails,
or even authentication to SIP provider fails, and we want to use the backup
Dahdi channels (PSTN). As simple as it may sound but with the many different
situations and error messages it seems like it's not so easy to predict all
the errors. Is there any single parameter value that can be changed to send
the call to Dahdi instead of SIP in-case for any reason the SIP provider
fails? Because I see a server with this need waits for long time for DNS to
resolve when there is no internet even.

 

Thanks

 

Just my .02, but since you're going to (quite possibly) have a long(ish)
timeout if internet connection or SIP provider is down, I would have an AGI
run in front of my dial that did a ping to verify internet and sip provider
connectivity.  Something like this:

Exten => s,1,AGI(verconn.agi)

Exten => s,n,gotoif(${CONNUP} = yes?3:4)

Exten => s,n,Dial(SIP.)

Exten => s,n,Dial(DAHDI.)

 

Verconn.agi could be PERL, C, PHP or even bash.

 

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


More information about the asterisk-users mailing list