<div dir="ltr">Hi,<div><br></div><div>In the table acc you can see what you need. You can use callid to connect the rows.</div><div><br></div><div>Regards,</div><div>Szabolcs</div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-03-20 14:45 GMT+01:00 Diego Nadares <span dir="ltr"><<a href="mailto:dnadares@gmail.com" target="_blank">dnadares@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi, <div><br></div><div>Sorry, . I meant the sip_code/sip_reason of the message that hangup the call. </div><div><br></div><div>For example:</div><div><br></div><div><div>*************************** 1. row ***************************</div><div>               id: 160</div><div>           method: BYE</div><div>         from_tag: 1</div><div>           to_tag: 56</div><div>           callid: <a href="mailto:1-2397@172.16.213.21" target="_blank">1-2397@172.16.213.21</a></div><div>         sip_code: 200</div><div>       sip_reason: OK</div></div><div><br></div><div><div>*************************** 1. row ***************************</div><div>               id: 61975</div><div>           method: INVITE</div><div>         from_tag: 40511</div><div>           to_tag:</div><div>           callid: <a href="mailto:40511-2397@172.16.213.21" target="_blank">40511-2397@172.16.213.21</a></div><div>         sip_code: 503</div><div>       sip_reason: Service Unavailable</div></div><div><br></div><div>thanks,</div><div><br></div><div>Diego</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2017-03-20 10:23 GMT-03:00 Kordován Szabolcs <span dir="ltr"><<a href="mailto:koszab@gmail.com" target="_blank">koszab@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>How do you mean '<span style="font-size:12.8px">hangup cause'? ISUP cause call?</span></div><div><span style="font-size:12.8px">If the server supports isup cause it can insert an additional header (eg. </span><span style="color:rgb(51,51,51);font-family:"helvetica neue",helvetica,roboto,arial,sans-serif;font-size:12px;white-space:pre-wrap">X-Asterisk-HangupCauseCod<wbr>e</span><span style="font-size:12.8px">) 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.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">if (is_present_hf("</span><span style="color:rgb(51,51,51);font-family:"helvetica neue",helvetica,roboto,arial,sans-serif;font-size:12px;white-space:pre-wrap">X-Asterisk-Han<wbr>gupCauseCode</span><span style="font-size:12.8px">")) xlogl("LOG_LOC<wbr>AL0", "L_ALERT", $hdr(</span><span style="color:rgb(51,51,51);font-family:"helvetica neue",helvetica,roboto,arial,sans-serif;font-size:12px;white-space:pre-wrap">X-Asterisk-HangupCauseCod<wbr>e</span><span style="font-size:12.8px">));</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Regards,</span></div><div><span style="font-size:12.8px">Szabolcs</span></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_1624523235275589332h5">2017-03-20 14:03 GMT+01:00 Diego Nadares <span dir="ltr"><<a href="mailto:dnadares@gmail.com" target="_blank">dnadares@gmail.com</a>></span>:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_1624523235275589332h5"><div dir="ltr">I figured out that I can get start_time and end_time from dlg_vars. <div><br></div><div>The only thing left is hangup cause. Any help with this?</div><div><br></div><div>Thanks!</div></div><div class="m_1624523235275589332m_-652216192736032752HOEnZb"><div class="m_1624523235275589332m_-652216192736032752h5"><div class="gmail_extra"><br><div class="gmail_quote">2017-03-20 9:46 GMT-03:00 Diego Nadares <span dir="ltr"><<a href="mailto:dnadares@gmail.com" target="_blank">dnadares@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi guys,<div><br></div><div>I have configured to use cdr with extra fields</div><div><br></div><div><div style="font-size:13px"><div>modparam("acc", "cdr_extra",</div></div><div style="font-size:13px"><div>    <b>    "sip_code=$rs;sip_reason=$rr;"</b></div><div>        "hangup_src=$dlg_var(hangup_di<wbr>sposition);"</div><div>      "prefix=$dlg_var(prefix);gos=$<wbr>dlg_var(gos);endpoint_type=$dl<wbr>g_var(endpoint_type);"</div><div>        "ip_a=$dlg_var(ip_a);ip_b=$dlg<wbr>_var(ip_b);"</div></div><div><br></div><div>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.</div></div><div><br></div><div>The other thing is that I need to save, start_time and end_time with seconds.microseconds (1490013250.601707). Is this possible?</div><div><br></div><div>Thanks!</div><span class="m_1624523235275589332m_-652216192736032752m_-7458175421360647HOEnZb"><font color="#888888"><div><br></div><div>Diego</div><div>  </div></font></span></div>
</blockquote></div><br></div>
</div></div><br></div></div>______________________________<wbr>_________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">http://lists.sip-router.org/cg<wbr>i-bin/mailman/listinfo/sr-user<wbr>s</a><br>
<br></blockquote></div><br></div>
<br>______________________________<wbr>_________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">http://lists.sip-router.org/cg<wbr>i-bin/mailman/listinfo/sr-user<wbr>s</a><br>
<br></blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">http://lists.sip-router.org/<wbr>cgi-bin/mailman/listinfo/sr-<wbr>users</a><br>
<br></blockquote></div><br></div>