<div dir="ltr">Use <span style="font-family:Calibri;font-size:14.999999046325684px">is_present_hf("Reason"), but not </span><span style="font-family:Calibri;font-size:14.999999046325684px">is_present_hf("Reason:")</span><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature">--<br>Nick</div></div>
<br><div class="gmail_quote">2016-06-28 12:14 GMT+03:00 Alain Bieuzent <span dir="ltr"><<a href="mailto:alain.bieuzent@free.fr" target="_blank">alain.bieuzent@free.fr</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="white" lang="FR" link="#0563C1" vlink="#954F72"><div><p class="MsoNormal"><span style="font-size:11.0pt">Hi all,<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt">I need to test if some particular value exist in Reason header on a 404 reply. <u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt">I receive : <u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:8.5pt;font-family:"Courier New";color:black">SIP/2.0 404 Not Found<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:8.5pt;font-family:"Courier New";color:black">Via: SIP/2.0/UDP 1.2.3.4:5060;branch=z9hG4bK72222454<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:8.5pt;font-family:"Courier New";color:black">From: "+33111111111" <<a href="mailto:sip%3A%2B33111111111@1.2.3.4" target="_blank">sip:+33111111111@1.2.3.4</a>>;tag=as005364a4<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:8.5pt;font-family:"Courier New";color:black">To: <<a href="mailto:sip%3A%2B33999999999@5.6.7.8" target="_blank">sip:+33999999999@5.6.7.8</a>>;tag=SDufib599-019e0074000099e0<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:8.5pt;font-family:"Courier New";color:black">Call-ID: <a href="http://323ca6b15f8404cd3d05d53014336311@1.2.3.4:5060" target="_blank">323ca6b15f8404cd3d05d53014336311@1.2.3.4:5060</a><u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:8.5pt;font-family:"Courier New";color:black">CSeq: 102 INVITE<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:8.5pt;font-family:"Courier New";color:black">Content-Length: 0<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:8.5pt;font-family:"Courier New";color:black">Reason: Q.850;cause=001<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt">I’m trying using this code, but is_present_hf() function return always false.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt">if ( t_check_status("404") ) {<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt"> if (is_present_hf("Reason:")) xlog("L_WARN","Reason exist");<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt"> xlog("L_WARN","Reason not exist");<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt">}<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt">Any Idea ?<u></u><u></u></span></p></div></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div></div>