<p></p>

<h3 dir="auto">Description</h3>
<p dir="auto">I want to get the CDR of the whole call. For this I use the following configuration.<br>
I don't use any sql database. I want to get CDR in syslog<br>
...</p>
<p dir="auto">loadmodule "db_text.so"<br>
loadmodule "dialog.so"<br>
loadmodule "acc.so"</p>
<p dir="auto">...<br>
#----Dialog--------------------------<br>
modparam("dialog", "db_mode", 0)</p>
<p dir="auto">#-----ACCounting module -----<br>
modparam("acc", "early_media", 0)<br>
modparam("acc", "report_cancels", 1)<br>
modparam("acc", "log_facility", "LOG_LOCAL1")<br>
modparam("acc", "detect_direction", 0)<br>
modparam("acc", "log_level", ACC_LOG_LEVEL)<br>
modparam("acc", "log_flag", FLAG_ACC_LOG)<br>
modparam("acc", "log_missed_flag", FLAG_ACC_LOG_MISSED)<br>
modparam("acc", "failed_transaction_flag", FLAG_ACC_LOG_FAILED)<br>
modparam("acc", "log_extra", "ip_src=$si;ip_dst=$avp(ip_dst);sip_from=$fU;sip_to=$tU;ruri_user=$rU;spx_rs=$avp(spx_http_rs)") ## TODO<br>
modparam("acc", "cdr_enable", 1)<br>
modparam("acc", "cdr_facility", "LOG_LOCAL1")<br>
modparam("acc", "cdr_log_enable", 1)</p>
<p dir="auto">...<br>
request_route {<br>
setflag(FLAG_ACC_LOG);<br>
setflag(FLAG_ACC_LOG_MISSED);<br>
setflag(FLAG_ACC_LOG_FAILED);<br>
...<br>
...<br>
...<br>
}</p>
<p dir="auto">...<br>
#___handle requests within SIP dialogs<br>
route[HANDLE_IN_DIALOG_REQUESTS] {<br>
if (has_totag()) {<br>
if (loose_route()) {<br>
xlog("L_INFO", "route[WITHINDLG]|$rm with to-tag and loose route|\n");</p>
<pre class="notranslate"><code class="notranslate">        if (is_method("BYE")) {
             setflag(FLAG_ACC_LOG);   
        }
     }
</code></pre>
<p dir="auto">}</p>
<p dir="auto">As a result, I get two separate records for INVITE and BYE transactions. But I'm expecting one CDR for the entire call.</p>

<h3 dir="auto">Troubleshooting</h3>
<h4 dir="auto">Reproduction</h4>

<h4 dir="auto">Debugging Data</h4>

<pre class="notranslate"><code class="notranslate">(paste your debugging data here)
</code></pre>
<h4 dir="auto">Log Messages</h4>

<pre class="notranslate"><code class="notranslate">(paste your log messages here)
</code></pre>
<h4 dir="auto">SIP Traffic</h4>

<pre class="notranslate"><code class="notranslate">(paste your sip traffic here)
</code></pre>
<h3 dir="auto">Possible Solutions</h3>
<p dir="auto">I tried to find a solution on the internet, and found this message<br>
<a href="https://www.mail-archive.com/sr-users@lists.kamailio.org/msg13617.html" rel="nofollow">https://www.mail-archive.com/sr-users@lists.kamailio.org/msg13617.html</a></p>
<p dir="auto">The author talks about an additional flag in the dialog module. And also asks to add this to the documentation of the ACC module</p>
<p dir="auto">I tried adding a flag but didn't get the desired result. Probably something else needs to be done. There is nothing in the documentation about this. Maybe it makes sense to write a similar article for kamailio?</p>
<p dir="auto"><a href="https://www.opensips.org/Documentation/Tutorials-Advanced-Accounting" rel="nofollow">https://www.opensips.org/Documentation/Tutorials-Advanced-Accounting</a></p>

<h3 dir="auto">Additional Information</h3>
<ul dir="auto">
<li><strong>Kamailio Version</strong> - output of <code class="notranslate">kamailio -v</code></li>
</ul>
<pre class="notranslate"><code class="notranslate">[opodguyko@vms-vms-spx-1 ~]$ kamailio -v
version: kamailio 5.5.3 (x86_64/linux) b02728-dirty
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: b02728 -dirty
compiled on 15:35:46 Dec 15 2021 with gcc 8.3.1

</code></pre>
<ul dir="auto">
<li><strong>Operating System</strong>:</li>
</ul>

<pre class="notranslate"><code class="notranslate">[opodguyko@vms-vms-spx-1 ~]$ cat /etc/redhat-release 
AlmaLinux release 8.5 (Arctic Sphynx)
[opodguyko@vms-vms-spx-1 ~]$ 

</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/3142">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZNMW42SV3LQSQM6HBDVO3XSVANCNFSM5YTNDP3Q">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/ABO7UZOEECDHEGBIMWOHE6DVO3XSVA5CNFSM5YTNDP32YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4S5E6R4Q.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><kamailio/kamailio/issues/3142</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/3142",
"url": "https://github.com/kamailio/kamailio/issues/3142",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>