I&#39;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> 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><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&#39;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(&quot;acc&quot;, &quot;early_media&quot;, 0)</div>

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

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

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

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

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

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

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

# ----- dialog params -----</div><div>modparam(&quot;dialog&quot;, &quot;dlg_flag&quot;, 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(&quot;acc&quot;,&quot;log_flag&quot;, 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  4</div>
      <div>modparam(&quot;acc&quot;, &quot;cdr_enable&quot;, 1)<br>
      </div>
      <div>modparam(&quot;dialog&quot;, &quot;dlg_flag&quot;, FLD_DLG)</div>
      <div><br>
      </div>
      <div>I was expecting extra entries in the RADIUS file but they
        don&#39;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&#39;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>        # account only INVITEs</div>
        <div>        if (is_method(&quot;INVITE&quot;))</div>
        <div>        {</div>
        <div>                setflag(FLT_ACC); # do accounting</div>
        <div>        }</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>