<div dir="ltr"><div>Hello Guys,</div><div><br></div><div>I am using Kamailio 4.1.0. I am trying to get Kamailio to rotate the cdr log through command kamcmd flatstore.rotate  but it keeps sending log to the renamed files, </div>
<div><br></div><div><br></div><div>I use the following parameter</div><div><br></div><div><div>#!define WITH_ACCFILE</div></div><div><br></div><div><br></div><div><div># ----- acc params -----</div><div>/* what special events should be accounted ? */</div>
<div>modparam("acc", "early_media", 1)</div><div>modparam("acc", "report_ack", 1)</div><div>modparam("acc", "report_cancels", 1)</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 "append_fromtag"</div><div>   in "rr" module */</div><div>modparam("acc", "detect_direction", 0)</div><div>/* account triggers (flags) */</div>
<div>modparam("acc", "log_flag", FLT_ACC)</div><div>modparam("acc", "log_missed_flag", FLT_ACCMISSED)</div><div>modparam("acc", "log_extra", </div><div><span class="" style="white-space:pre"> </span>"src_user=$fU;src_domain=$fd;src_ip=$si;"</div>
<div><span class="" style="white-space:pre">    </span>"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>modparam("acc", "db_flag", FLT_ACC)</div><div>modparam("acc", "db_missed_flag", FLT_ACCMISSED)</div><div>#!ifdef WITH_ACCFILE</div><div>modparam("acc", "db_url", "flatstore:/var/log/kamailio") </div>
<div>modparam("db_flatstore", "flush", 1)</div><div>modparam("acc", "cdr_enable", 1)</div><div>#modparam("acc", "cdr_flag", 3)</div><div>modparam("acc", "db_extra","ds=$DLG_lifetime")</div>
<div>modparam("acc", "log_extra",</div><div>"src_user=$fU;src_domain=$fd;src_ip=$si;"</div><div>"dst_ouser=$tU;dst_user=$rU;dst_domain=$rd;"</div><div>"duration=$DLG_lifetime")</div>
<div>modparam("acc", "db_extra",</div><div>"src_user=$fU;src_domain=$fd;src_ip=$si;" </div><div>"dst_ouser=$tU;dst_user=$rU;dst_domain=$rd;"</div><div>"duration=$avp(i:256)")</div>
<div><br></div><div>#!endif</div></div></div>