Description

I want to get the CDR of the whole call. For this I use the following configuration.
I don't use any sql database. I want to get CDR in syslog
...

loadmodule "db_text.so"
loadmodule "dialog.so"
loadmodule "acc.so"

...
#----Dialog--------------------------
modparam("dialog", "db_mode", 0)

#-----ACCounting module -----
modparam("acc", "early_media", 0)
modparam("acc", "report_cancels", 1)
modparam("acc", "log_facility", "LOG_LOCAL1")
modparam("acc", "detect_direction", 0)
modparam("acc", "log_level", ACC_LOG_LEVEL)
modparam("acc", "log_flag", FLAG_ACC_LOG)
modparam("acc", "log_missed_flag", FLAG_ACC_LOG_MISSED)
modparam("acc", "failed_transaction_flag", FLAG_ACC_LOG_FAILED)
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
modparam("acc", "cdr_enable", 1)
modparam("acc", "cdr_facility", "LOG_LOCAL1")
modparam("acc", "cdr_log_enable", 1)

...
request_route {
setflag(FLAG_ACC_LOG);
setflag(FLAG_ACC_LOG_MISSED);
setflag(FLAG_ACC_LOG_FAILED);
...
...
...
}

...
#___handle requests within SIP dialogs
route[HANDLE_IN_DIALOG_REQUESTS] {
if (has_totag()) {
if (loose_route()) {
xlog("L_INFO", "route[WITHINDLG]|$rm with to-tag and loose route|\n");

        if (is_method("BYE")) {
             setflag(FLAG_ACC_LOG);   
        }
     }

}

As a result, I get two separate records for INVITE and BYE transactions. But I'm expecting one CDR for the entire call.

Troubleshooting

Reproduction

Debugging Data

(paste your debugging data here)

Log Messages

(paste your log messages here)

SIP Traffic

(paste your sip traffic here)

Possible Solutions

I tried to find a solution on the internet, and found this message
https://www.mail-archive.com/sr-users@lists.kamailio.org/msg13617.html

The author talks about an additional flag in the dialog module. And also asks to add this to the documentation of the ACC module

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?

https://www.opensips.org/Documentation/Tutorials-Advanced-Accounting

Additional Information

[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

[opodguyko@vms-vms-spx-1 ~]$ cat /etc/redhat-release 
AlmaLinux release 8.5 (Arctic Sphynx)
[opodguyko@vms-vms-spx-1 ~]$ 


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <kamailio/kamailio/issues/3142@github.com>