<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix"><tt>Hi, John!<br>
<br>
If the call is rejected, than the "X-internal-hangup" header is
in the reply. failure_route is ran in the request context.
Therefore, you have to use the is_present_hf() function in the
onreply_route.<br>
Alternatively, you can check for the header existing using the
hdr pseudo-variable in the reply context (i.e if
($(<reply>hdr(</tt><tt>X-internal-hangup)) != NULL)).<br>
<br>
Best regards,<br>
</tt>
<pre class="moz-signature" cols="72">Răzvan Crainea
OpenSIPS Solutions
<a class="moz-txt-link-abbreviated" href="http://www.opensips-solutions.com">www.opensips-solutions.com</a></pre>
On 01/15/2015 12:40 PM, John Nash wrote:<br>
</div>
<blockquote
cite="mid:CAA4rGPzorWR7UkFetO_=HqrHEFU+rQ28Z64fFSLE0_Dtq_cNMg@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>I am testing a setup where opensips sending call to
freeswitch and if call is rejected by freswitch a custom
header "X-internal-hangup". In opensips failure_route I am
trying to check it using is_present_hf() function but it never
reaches inside conditions. In wireshark I see this header.<br>
<br>
</div>
is_present_hf is working fine when used in main request block.<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>