From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@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.
-- _____________________________________________________________________ -- 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