Klaus Darilion
2006-Sep-19 07:03 UTC
[asterisk-users] fast SIP failover (outgoing sIP requests) with 1.2
Hi! I have the following problem: I route calls from one office to the other office via SIP, but if for any reason this SIP call fails, I want a backup route via the PSTN. Thus, I use: exten => _[1-9].,4,Dial(SIP/${enumresult},90) exten => _[1-9].,5,GotoIf($["${DIALSTATUS}" = "CHANUNAVAIL"]?103:6) exten => _[1-9].,6,GotoIf($["${DIALSTATUS}" = "CONGESTION"]?103:7) exten => _[1-9].,7,Hangup exten => _[1-9].,103,Dial(ZAP/g1/${EXTEN},90) The problem is, if the SIP server at the remote office is down, thus no responses to the INVITE, it takes 64 seconds to timeout. Is there a method to shorten this interval - e.g. if there is no response within 10 seconds give up - without changing the hardcoded retransmission value (6) in chan_sip ? regards klaus
Damon Estep
2006-Sep-19 08:20 UTC
[asterisk-users] fast SIP failover (outgoing sIP requests) with 1.2
Try taking to 90 second timeout off Change exten => _[1-9].,4,Dial(SIP/${enumresult},90) to exten => _[1-9].,4,Dial(SIP/${enumresult}) a btter method is to set up each office as a unique peer with qualify = yes and then add the peer name to the dial string, like dial(SIP/3035551212@peername) if the peer is offline (qualify has failed) the unavaialbe status will come back right away.> -----Original Message----- > From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users- > bounces@lists.digium.com] On Behalf Of Klaus Darilion > Sent: Tuesday, September 19, 2006 8:45 AM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: Re: [asterisk-users] fast SIP failover (outgoing sIP requests) > with 1.2 > > Guido Hecken wrote: > >> -----Urspr?ngliche Nachricht----- > >> Von: Klaus Darilion [mailto:klaus.mailinglists@pernau.at] > >> Gesendet: Dienstag, 19. September 2006 16:03 > >> An: asterisk-users@lists.digium.com > >> Betreff: [asterisk-users] fast SIP failover (outgoing sIP requests) > with > > 1.2 > >> Hi! > >> > >> I have the following problem: I route calls from one office to the > other > >> office via SIP, but if for any reason this SIP call fails, I want a > >> backup route via the PSTN. > >> > >> Thus, I use: > >> > >> > >> exten => _[1-9].,4,Dial(SIP/${enumresult},90) > >> exten => _[1-9].,5,GotoIf($["${DIALSTATUS}" = "CHANUNAVAIL"]?103:6) > >> exten => _[1-9].,6,GotoIf($["${DIALSTATUS}" = "CONGESTION"]?103:7) > >> exten => _[1-9].,7,Hangup > >> exten => _[1-9].,103,Dial(ZAP/g1/${EXTEN},90) > >> > >> The problem is, if the SIP server at the remote office is down, thus no > >> responses to the INVITE, it takes 64 seconds to timeout. > >> > >> Is there a method to shorten this interval - e.g. if there is no > >> response within 10 seconds give up - without changing the hardcoded > >> retransmission value (6) in chan_sip ? > >> > >> regards > >> klaus > > > > Hi, > > > > maybe I'm wrong, but what about using the ChanisAvail function? > > > > We did something like this in a customer installation: > > > > exten => _XXX.,1,Set(LANGUAGE()=de) > > exten => _XXX.,2,ChanisAvail(CAPI/ISDN3/${EXTEN},s) > > exten => _XXX.,3,Dial(CAPI/ISDN3/${EXTEN}/b,60,tT) > > exten => _XXX.,4,Congestion > > exten => _XXX.,103,ChanisAvail(CAPI/ISDN2/${EXTEN},s) > > exten => _XXX.,104,Dial(CAPI/ISDN2/${EXTEN}/b,60,tT) > > exten => _XXX.,105,Congestion > > > > > > Hope, it helps ... > > > > Hi! > > I've tried it but apparently chanisavail does not work with "non-local" > SIP peers. > > thanks > klaus > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users