<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body>
<p>All SIP requests generated by OpenSIPS appear in local_route. So you can filter BYE generated by opensips there.</p>
<p>Also using is_direction method you can determine who sent BYE (caller or callee).</p>
<p>http://www.opensips.org/html/docs/modules/devel/rr.html#id293720</p>
<p>Since BYE generated by opensips is sent in both directions, so you probably want to do accounting only for one BYE (to avoid duplication).</p>
<p>Thank you.</p>
<p> </p>
<p>On 2014-01-27 23:39, Eddie Chan wrote:</p>
<blockquote type="cite" style="padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px; width:100%"><!-- html ignored --><!-- head ignored --><!-- meta ignored --><!-- meta ignored -->
<div class="WordSection1">
<p class="MsoNormal">Hi all,<!-- o ignored --></p>
<p class="MsoNormal"><!-- o ignored --> </p>
<p class="MsoNormal">I am having problem triggering CDR when the max call duration in call control module timeout.<!-- o ignored --></p>
<p class="MsoNormal"><!-- o ignored --> </p>
<p class="MsoNormal">For a normal call, I use setflag in the main routing logic to trigger CDRs.<!-- o ignored --></p>
<p class="MsoNormal"><!-- o ignored --> </p>
<p class="MsoNormal">route(<!-- o ignored --></p>
<p class="MsoNormal"><!-- o ignored --> </p>
<p class="MsoNormal">…<!-- o ignored --></p>
<p class="MsoNormal"> If (is_method(“BYE”)) {<!-- o ignored --></p>
<p class="MsoNormal"> …<!-- o ignored --></p>
<p class="MsoNormal"> setflag(AAA_DO);<!-- o ignored --></p>
<p class="MsoNormal"> }<!-- o ignored --></p>
<p class="MsoNormal"><!-- o ignored --> </p>
<p class="MsoNormal"><!-- o ignored --> </p>
<p class="MsoNormal">However, when the call control timer expired, it will generate two BYE messages to each endpoints. Since the BYE messages were not originated by the endpoints, the main routing loop cannot detect the BYE message and thus failed to generate CDR.<!-- o ignored --></p>
<p class="MsoNormal"><!-- o ignored --> </p>
<p class="MsoNormal">Can anyone give me some idea on this problem? Where should I put the setflag if the BYE messages were originated by Opensip itself?<!-- o ignored --></p>
<p class="MsoNormal"><!-- o ignored --> </p>
<p class="MsoNormal">Thanks,<!-- o ignored --></p>
<p class="MsoNormal">Eddie<!-- o ignored --></p>
<p class="MsoNormal"><!-- o ignored --> </p>
</div>
</blockquote>
<div>
<pre>--
Mit freundlichen Grüßen
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +49 176 99 83 10 85
MSN: shari_786pk@hotmail.com
Email: shaheryarkh@googlemail.com</pre>
</div>
</body></html>