[SR-Users] ACC - Cdr enabled
Kordován Szabolcs
koszab at gmail.com
Mon Mar 20 14:23:59 CET 2017
Hi,
How do you mean 'hangup cause'? ISUP cause call?
If the server supports isup cause it can insert an additional header (eg.
X-Asterisk-HangupCauseCode) but it is not mandatory. I think you have to
know the name of the header which contains the cause code and you can read
it.
if (is_present_hf("X-Asterisk-HangupCauseCode")) xlogl("LOG_LOCAL0",
"L_ALERT", $hdr(X-Asterisk-HangupCauseCode));
Regards,
Szabolcs
2017-03-20 14:03 GMT+01:00 Diego Nadares <dnadares at gmail.com>:
> I figured out that I can get start_time and end_time from dlg_vars.
>
> The only thing left is hangup cause. Any help with this?
>
> Thanks!
>
> 2017-03-20 9:46 GMT-03:00 Diego Nadares <dnadares at gmail.com>:
>
>> Hi guys,
>>
>> I have configured to use cdr with extra fields
>>
>> modparam("acc", "cdr_extra",
>> * "sip_code=$rs;sip_reason=$rr;"*
>> "hangup_src=$dlg_var(hangup_disposition);"
>> "prefix=$dlg_var(prefix);gos=$dlg_var(gos);endpoint_type=$dl
>> g_var(endpoint_type);"
>> "ip_a=$dlg_var(ip_a);ip_b=$dlg_var(ip_b);"
>>
>> Is this the right way to always save the hangup cause? Or is another
>> better way? Because, when call is finished with a bye both fields are empty.
>>
>> The other thing is that I need to save, start_time and end_time with
>> seconds.microseconds (1490013250.601707). Is this possible?
>>
>> Thanks!
>>
>> Diego
>>
>>
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20170320/a6660f8d/attachment.html>
More information about the sr-users
mailing list