<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi Uri,<br>
<br>
if(is_present_hf("Reason")) {<br>
$var(cause)=$(hdr(Reason){param.value,cause}{s.int});<br>
xlog("L_INFO", "Our cause code: $var(cause)");<br>
}<br>
<br>
Also you can add this value to your CDR<br>
<br>
modparam("acc", "log_extra",
"src_user=$fU;src_domain=$fd;dst_user=$rU;dst_domain=$rd;to_user=$tU;to_domain=$td;causecode=$var(cause)")<br>
<br>
<br>
Wbr,<br>
Alexandr<br>
<br>
<br>
1/30/2012 7:20 AM, Uri Shacked wrote:
<blockquote
cite="mid:CAMMbDhT9iUsb1C4i+H+2o4S_H=4ndSTgL=KtLBBt8dS-MhdB=A@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>Hi,</div>
<div> </div>
<div>the gateway i use for sending call to pstn has an option of
sending a header with Q850 reason.</div>
<div>it looks like this:</div>
<div>"</div>
<div>Reason: Q.850;cause=17;text="UserBusy"<br>
Reason Protocols: Q.850<br>
Cause: 17(0x11)[User busy]</div>
<div>"</div>
<div> </div>
<div>now, i need to save the reason for reports.</div>
<div>the reason changes and i am trying to find a way to parse
it and save the code only.</div>
<div>usualy i use the "search" function to get text from headers
that are the gateway's inventions :-)</div>
<div>here i can find the text "Q850....." but how do i get the
cause code?</div>
<div>i guess i cab write something long with textops and
parsing. but, is there a better and nicer way to perform it?</div>
<div> </div>
<div>thanks,</div>
<div>Uri </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>
</body>
</html>