[asterisk-users] Failover Routing

Danny Nicholas danny at debsinc.com
Tue Mar 1 10:24:17 CST 2011


Try this - it says it is for 1.8 but might work in 1.6
http://www.voip-info.org/wiki/view/Asterisk+variable+DIALSTATUS


-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Deepika
Nijhawan
Sent: Tuesday, March 01, 2011 10:18 AM
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Subject: Re: [asterisk-users] Failover Routing

SIP_HEADER() gives you only access to headers of the initial INVITE request
(and not, for example, the final BYE message)
How will I check sip response with this like 404 or 503?

-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Danny Nicholas
Sent: 01 March 2011 15:09
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Subject: Re: [asterisk-users] Failover Routing


-----Original Message-----
From: Bob Beers [mailto:bob.beers at gmail.com] 
Sent: 01 March 2011 13:24
To: Asterisk Users Mailing List - Non-Commercial Discussion
Cc: Deepika Nijhawan
Subject: Re: [asterisk-users] Failover Routing

On Tue, Mar 1, 2011 at 8:09 AM, Deepika Nijhawan
<deepika.nijhawan at oxygen8.com> wrote:
> Ya, below is my routing:
> Exten => 1234,1,Dial(SIP/abc)
> Exten => 1234,n,Dial(SIP/xyz)
>
> If 1234 is unallocated on SIP/abc it returns 1 in ${HANGUPCAUSE} variable.
> For this I don't want it  to try SIP/xyz.
> But overall, if we get SIP 4xx reason then call should hangup like it
sends
> back 404 not found for this case and if we get SIP 5xx response then
should
> try SIP/xyz.
> Is there any way to check sip responses and do failover routing based on
> that?
>

Have you looked at SIP_HEADER() dialplan function?
<https://wiki.asterisk.org/wiki/display/AST/Function_SIP_HEADER>

Maybe you can parse Reason header in 4xx or 5xx response?

HTH,
-Bob
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Deepika
Nijhawan
Sent: Tuesday, March 01, 2011 9:04 AM
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Subject: Re: [asterisk-users] Failover Routing

It says it for asterisk1.8. I am using asterisk1.6, can we use this function
in this version.
Is it possible for you to give example on how to use?

I just went into my 1.4.37 console and find that SIP_HEADER is there in
"Core show functions" so it should be useable in 1.6.


--
_____________________________________________________________________
-- 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


--
_____________________________________________________________________
-- 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




More information about the asterisk-users mailing list