Hi,Sorry, . I meant the sip_code/sip_reason of the message that hangup the call.For example:*************************** 1. row ***************************id: 160method: BYEfrom_tag: 1to_tag: 56callid: 1-2397@172.16.213.21sip_code: 200sip_reason: OK*************************** 1. row ***************************id: 61975method: INVITEfrom_tag: 40511to_tag:callid: 40511-2397@172.16.213.21sip_code: 503sip_reason: Service Unavailablethanks,Diego2017-03-20 10:23 GMT-03:00 Kordován Szabolcs <koszab@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,Szabolcs2017-03-20 14:03 GMT+01:00 Diego Nadares <dnadares@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@gmail.com>:Hi guys,I have configured to use cdr with extra fieldsmodparam("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@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-user s
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-user s
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr- users