Hi Uri,
if(is_present_hf("Reason")) {
$var(cause)=$(hdr(Reason){param.value,cause}{s.int});
xlog("L_INFO", "Our cause code: $var(cause)");
}
Also you can add this value to your CDR
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)")
Wbr,
Alexandr
1/30/2012 7:20 AM, Uri Shacked wrote:
Hi,
the gateway i use for sending call to pstn has an option of sending a
header with Q850 reason.
it looks like this:
"
Reason: Q.850;cause=17;text="UserBusy"
Reason Protocols: Q.850
Cause: 17(0x11)[User busy]
"
now, i need to save the reason for reports.
the reason changes and i am trying to find a way to parse it and save
the code only.
usualy i use the "search" function to get text from headers that are
the gateway's inventions :-)
here i can find the text "Q850....." but how do i get the cause code?
i guess i cab write something long with textops and parsing. but, is
there a better and nicer way to perform it?
thanks,
Uri
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users