It seems like it is a v1.8 only function at present (unless a backport is 
released).

>From http://www.voip-info.org/wiki/view/Asterisk+variable+hangupcause

-----
Asterisk 1.8 will allow to read SIP response codes in the dialplan via

 ${HASH(SIP_CAUSE,<channel-name>)}

Asterisk 1.8 also comes with a 'use_q850_reason' configuration option for 
generating and parsing, if available: 
-----

That will give you what you want if you consider upgrading to v1.8.

                


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


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


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


 If you have received this communication in error we would appreciate
you advising us either by telephone or return of e-mail. The contents
of this message, and any attachments, are the property of DataVox,
and are intended for the confidential use of the named recipient only.
If you are not the intended recipient, employee or agent responsible
for delivery of this message to the intended recipient, take note that
any dissemination, distribution or copying of this communication and
its attachments is strictly prohibited, and may be subject to civil or
criminal action for which you may be liable.
Every effort has been made to ensure that this e-mail or any attachments
are free from viruses. While the company has taken every reasonable
precaution to minimise this risk, neither company, nor the sender can
accept liability for any damage which you sustain as a result of viruses.
It is recommended that you should carry out your own virus checks
before opening any attachments. 

Registered in England. No. 27459085.



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