<html><head></head><body bgcolor="#FFFFFF"><div>Hello,<br><br></div><div><br>On 6 Nov 2012, at 23:53, Owen Lynch &lt;<a href="mailto:owen.lynch@paragon.co.nz">owen.lynch@paragon.co.nz</a>&gt; wrote:<br><br></div><div></div><blockquote type="cite"><div>I've made some progress. It seems that dlg_manage() is required in the route script. Now I have CDR in syslog:<div><br></div><div>&nbsp;NOTICE: acc [acc_cdr.c:192]: st=1352240307.196; et=1352240319.116; d=11.920<br></div><div>
<br></div><div>but not as a RADIUS record. Looking at the code I can only see syslog support for CDR in the acc module, is this the case?</div><div>In the acc module I see a conditional build flag RAD_ACC but I think this would give the same functionality as the acc_radius module, which is radius transaction logging only. I have the acc-radius module loaded.</div>
<div><br></div><div>So, my question remains - how to get CDR entry into radius?</div></div></blockquote><div><br></div>Iirc, the developer added support only for cdrs to log file. If nobody works on it, probably i will do it before next major release.<div><br></div><div>Cheers,</div><div>Daniel</div><div><br><blockquote type="cite"><div><div><br></div><div>Thanks,</div><div>Owen</div><div class="gmail_extra"><br><br><div class="gmail_quote">On 7 November 2012 09:35, Owen Lynch <span dir="ltr">&lt;<a href="mailto:owen.lynch@paragon.co.nz" target="_blank">owen.lynch@paragon.co.nz</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hi Paul,</div><div><br></div><div>yes, I have the standard acc parameters set up. I have RADIUS logging of transactions working (start and stop events on call establishment and clear down) but not CDR events. I understand that CDR support requires the dialog module and I figure that the dlg_flag needs to be set and cleared in the route script, but I'm not sure where.</div>

<div><br></div><div>The relevant parameters are:</div><div><br></div><div># ----- acc params -----</div><div>/* what special events should be accounted ? */</div><div>modparam("acc", "early_media", 0)</div>

<div>modparam("acc", "report_ack", 0)</div><div>modparam("acc", "report_cancels", 0)</div><div>/* by default ww do not adjust the direct of the sequential requests.</div><div>&nbsp; &nbsp;if you enable this parameter, be sure the enable "append_fromtag"</div>

<div>&nbsp; &nbsp;in "rr" module */</div><div>modparam("acc", "detect_direction", 0)</div><div>/* account triggers (flags) */</div><div class="im"><div>modparam("acc", "log_flag", FLT_ACC)</div>
</div><div>
modparam("acc", "log_missed_flag", FLT_ACCMISSED)</div><div>modparam("acc", "log_extra",</div><div>&nbsp; &nbsp; &nbsp; &nbsp; "src_user=$fU;src_domain=$fd;src_ip=$si;"</div><div>&nbsp; &nbsp; &nbsp; &nbsp; "dst_ouser=$tU;dst_user=$rU;dst_domain=$rd")</div>

<div>modparam("acc", "failed_transaction_flag", FLT_ACCFAILED)</div><div>/* enhanced DB accounting */</div><div>#!ifdef WITH_ACCDB</div><div>modparam("acc", "db_flag", FLT_ACC)</div>

<div>modparam("acc", "db_missed_flag", FLT_ACCMISSED)</div><div>modparam("acc", "db_url", DBURL)</div><div>modparam("acc", "db_extra",</div><div>&nbsp; &nbsp; &nbsp; &nbsp; "src_user=$fU;src_domain=$fd;src_ip=$si;"</div>

<div>&nbsp; &nbsp; &nbsp; &nbsp; "dst_ouser=$tU;dst_user=$rU;dst_domain=$rd")</div><div>#!endif</div><div class="im"><div>modparam("acc", "cdr_enable", 1)</div></div><div>#modparam("acc", "cdr_facility", "LOG_LOCAL0")</div>

<div>#!ifdef WITH_ACC_RADIUS</div><div>modparam("acc_radius", "radius_config", "/usr/local/etc/radiusclient-ng/radiusclient.conf")</div><div>modparam("acc_radius", "radius_flag", FLT_ACC)</div>

<div>modparam("acc_radius", "radius_missed_flag", FLT_ACCMISSED)</div><div>modparam("acc_radius", "radius_extra", "Called-Station-Id=$tu;Calling-Station-Id=$fu")</div><div>

# ----- dialog params -----</div><div>modparam("dialog", "dlg_flag", 4)</div><div>#!endif</div><div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">On 6 November 2012 20:52, Pawel Kuzak <span dir="ltr">&lt;<a href="mailto:pawel.kuzak@1und1.de" target="_blank">pawel.kuzak@1und1.de</a>&gt;</span> wrote:<br>

</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    Hi Owen,<br>
    <br>
    I think basically you are right. But referring to your code example,
    did you set up the <i>log_flag</i> module parameter correctly?
    E.g.:<br>
    <br>
    #!define FLT_ACC 1<br>
    modparam("acc","log_flag", FLT_ACC)<br>
    <br>
    Greetings,<br>
    Paul<div><div><br>
    <br>
    <br>
    <div>On 06.11.2012 00:34, Owen Lynch wrote:<br>
    </div>
    <blockquote type="cite">Hi,
      <div><br>
      </div>
      <div>I have transaction accounting to RADIUS setup and get the
        start and stop events logged to file when a call is made. I want
        to extend this to also get CDR logs - call duration etc. To do
        this I understand I need to configure the acc module and load
        and configure the dialog module:</div>
      <div><br>
      </div>
      <div>#!define FLD_DLG &nbsp;4</div>
      <div>modparam("acc", "cdr_enable", 1)<br>
      </div>
      <div>modparam("dialog", "dlg_flag", FLD_DLG)</div>
      <div><br>
      </div>
      <div>I was expecting extra entries in the RADIUS file but they
        don't appear. I think this is because I need to set and clear
        the dialog flag at appropriate places in the route script (e.g.
        setflag(FLD_DLG)) but I'm not sure where. Should this be done in
        the INVITE and BYE method handling as is currently done for the
        transaction accounting, e.g.:</div>
      <div><br>
      </div>
      <div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; # account only INVITEs</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; if (is_method("INVITE"))</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; {</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; setflag(FLT_ACC); # do accounting</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; }</div>
      </div>
      <div>
        <br>
      </div>
      <div><br>
      </div>
      <div>Thanks,</div>
      <div>Owen Lynch</div>
    </blockquote>
  </div></div></div>

<br></div></div>_______________________________________________<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" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list</span><br><span><a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a></span><br><span><a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a></span><br></div></blockquote></div></body></html>