[OpenSIPS-Users] Testing Reason Header

Alain Bieuzent alain.bieuzent at free.fr
Tue Jun 28 11:41:27 CEST 2016


Hi Nick, thanks for response.

 

Allready test without « : », doesn’t work also

 

thanks

 

 

 

De : <users-bounces at lists.opensips.org> au nom de Nick Altmann <nick.altmann at gmail.com>
Répondre à : OpenSIPS users mailling list <users at lists.opensips.org>
Date : mardi 28 juin 2016 11:18
À : OpenSIPS users mailling list <users at lists.opensips.org>
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 <alain.bieuzent at free.fr>:

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:+33111111111 at 1.2.3.4>;tag=as005364a4

To: <sip:+33999999999 at 5.6.7.8>;tag=SDufib599-019e0074000099e0

Call-ID: 323ca6b15f8404cd3d05d53014336311 at 1.2.3.4: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
Users at lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

 

_______________________________________________ Users mailing list Users at lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20160628/db57c69a/attachment-0001.htm>


More information about the Users mailing list