<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please
use this template only for bug reports.
If you have questions about using Kamailio or related to its configuration file, ask on
sr-users mailing list:
*
http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
If you have questions about developing extensions to Kamailio or its existing C code, ask
on sr-dev mailing list:
*
http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Please try to fill this template as much as possible for any issue. It helps the
developers to troubleshoot the issue.
If there is no content to be filled in a section, the entire section can be removed.
You can delete the comments from the template sections when filling.
You can delete next line and everything above before submitting (it is a comment).
-->
### 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.
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
### Troubleshooting
#### Reproduction
<!--
If the issue can be reproduced, describe how it can be done.
-->
#### Debugging Data
<!--
If you got a core dump, use gdb to extract troubleshooting data - full backtrace,
local variables and the list of the code at the issue location.
gdb /path/to/kamailio /path/to/corefile
bt full
info locals
list
If you are familiar with gdb, feel free to attach more of what you consider to
be relevant.
-->
```
(paste your debugging data here)
```
#### Log Messages
<!--
Check the syslog file and if there are relevant log messages printed by Kamailio, add them
next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
```
(paste your log messages here)
```
#### SIP Traffic
<!--
If the issue is exposed by processing specific SIP messages, grab them with ngrep or save
in a pcap file, then add them next, or attach to issue, or provide a link to download them
(e.g., to a pastebin site).
-->
```
(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
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull
request with a fix.
-->
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
[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
```
* **Operating System**:
<!--
Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 16.04,
CentOS 7.1, ...), MacOS, xBSD, Solaris, ...;
Kernel details (output of `lsb_release -a` and `uname -a`)
-->
```
[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 or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3142
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3142(a)github.com>