Hi Alain,
In failure route, the processed SIP message is the original INVITE - see
http://www.opensips.org/Documentation/Script-Routes-2-2#toc3
And you want to get the "Reason" from the reply message , so you should
do $(<reply>hdr(Reason)) - see
http://www.opensips.org/Documentation/Script-CoreVar-2-2 .
Best regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 28.06.2016 12:41, Alain Bieuzent wrote:
Hi Nick, thanks for response.
Allready test without « : », doesn’t work also
thanks
*De : *<[email protected]> au nom de Nick Altmann
<[email protected]>
*Répondre à : *OpenSIPS users mailling list <[email protected]>
*Date : *mardi 28 juin 2016 11:18
*À : *OpenSIPS users mailling list <[email protected]>
*Objet : *Re: [OpenSIPS-Users] Testing Reason Header
Use is_present_hf("Reason"), but not is_present_hf("Reason:")
--
Nick
2016-06-28 12:14 GMT+03:00 Alain Bieuzent <[email protected]
<mailto:[email protected]>>:
Hi all,
I need to test if some particular value exist in Reason header on
a 404 reply.
I receive :
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 1.2.3.4:5060;branch=z9hG4bK72222454
From: "+33111111111" <sip:[email protected]
<mailto:sip%3A%[email protected]>>;tag=as005364a4
To: <sip:[email protected]
<mailto:sip%3A%[email protected]>>;tag=SDufib599-019e0074000099e0
Call-ID: [email protected]:5060
<http://[email protected]:5060>
CSeq: 102 INVITE
Content-Length: 0
Reason: Q.850;cause=001
I’m trying using this code, but is_present_hf() function return
always false.
if ( t_check_status("404") ) {
if (is_present_hf("Reason:"))
xlog("L_WARN","Reason exist");
xlog("L_WARN","Reason not exist");
}
Any Idea ?
_______________________________________________
Users mailing list
[email protected] <mailto:[email protected]>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________ Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users