[SR-Users] ACC - Cdr enabled
Diego Nadares
dnadares at gmail.com
Mon Mar 20 14:45:56 CET 2017
Hi,
Sorry, . I meant the sip_code/sip_reason of the message that hangup the
call.
For example:
*************************** 1. row ***************************
id: 160
method: BYE
from_tag: 1
to_tag: 56
callid: 1-2397 at 172.16.213.21
sip_code: 200
sip_reason: OK
*************************** 1. row ***************************
id: 61975
method: INVITE
from_tag: 40511
to_tag:
callid: 40511-2397 at 172.16.213.21
sip_code: 503
sip_reason: Service Unavailable
thanks,
Diego
2017-03-20 10:23 GMT-03:00 Kordován Szabolcs <koszab at gmail.com>:
> 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
>>
>>
>
> _______________________________________________
> 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/e0f98d09/attachment.html>
More information about the sr-users
mailing list