<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
in failure route you have access to the request, not the reply -- I
understand the Reason header is in reply from the content of the
discussion.<br>
<br>
Either set an onreply_route and get the Reason header there, like
storing it in the avp, or use $T_rpl($hdr(Reason)) in failure route
-- first option is faster if meets your needs of what to do with the
avp.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
On 1/31/12 6:24 PM, Uri Shacked wrote:
<blockquote
cite="mid:CAMMbDhRrZPm5-=1ytMfC7iqhJ_R_mEMtARzY4dJEX-N=u6PMUQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>Hi guys.....</div>
<div> </div>
<div>the header searching and saving the Q850 code didn't work.</div>
<div>here is what i wrote in the cfg, in the failure route:</div>
<div> </div>
<div><em># manage failure routing cases<br>
failure_route[MANAGE_FAILURE] {<br>
xlog("L_CRIT", "failure \n");<br>
if($avp(CAR)=="CALLOUT"){<br>
xlog("L_CRIT", "failure in callout \n");<br>
##if(is_present_hf("Reason")) {<br>
xlog("L_CRIT", "failure in reason\n");<br>
$avp(Q850)=$(hdr(Reason){param.value,cause}{<a
moz-do-not-send="true" href="http://s.int">s.int</a>});<br>
xlog("L_CRIT", "failure in reason $avp(Q850)\n");<br>
##}</em></div>
<div> </div>
<div>here is the log print......</div>
<div> </div>
<div><em> 3(3433) CRITICAL: <script>: failure<br>
3(3433) CRITICAL: <script>: failure in callout<br>
3(3433) CRITICAL: <script>: failure in reason<br>
3(3433) ERROR: <core> [lvalue.c:347]: non existing
right pvar<br>
3(3433) ERROR: <core> [lvalue.c:407]: assignment
failed at pos: (524,15-524,54)<br>
3(3433) CRITICAL: <script>: failure in reason
<null></em></div>
<div> </div>
<div> </div>
<div>the command <em>is_present_hf("Reason")) </em> is under ##
because of tests... when it was in use, the script didn't even
went in the "if", the command didn't recognize the header.</div>
<div><em></em> </div>
<div>here is the sip trace for the 486, the header is there...</div>
<div> </div>
<div><em> Message Header<br>
Call-ID: 6994099017399497785-1328029200-13379<br>
From: <<a class="moz-txt-link-freetext" href="sip:36264529;ss7-cpc=10;cpc=">sip:36264529;ss7-cpc=10;cpc=</a><a
moz-do-not-send="true" href="mailto:ordinary@172.16.10.3">ordinary@172.16.10.3</a>;user=phone>;tag=6994099017399497785<br>
To: <<a moz-do-not-send="true"
href="mailto:sip%3A39955011@172.16.60.161">sip:39955011@172.16.60.161</a>;user=phone>;tag=9299942026613191738<br>
CSeq: 1 INVITE<br>
Via: SIP/2.0/UDP
172.16.60.161;received=172.16.60.161;branch=z9hG4bK08d6.c653f346.2,SIP/2.0/UDP
172.16.10.3:5060;branch=z9hG4bK-6110080000017439-ac100a03-1<br>
Supported: timer,100rel<br>
Reason: Q.850;cause=17;text="UserBusy"<br>
Reason Protocols: Q.850<br>
Cause: 17(0x11)[User busy]<br>
Content-Length: 0</em></div>
<div> </div>
<div><br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla -- <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://linkedin.com/in/miconda">http://linkedin.com/in/miconda</a> -- <a class="moz-txt-link-freetext" href="http://twitter.com/miconda">http://twitter.com/miconda</a></pre>
</body>
</html>