[SR-Users] CDR preserve original call direction

Ahmed Fouad afouad at gmail.com
Wed Feb 9 13:49:37 CET 2022


Hi,

I've enabled ACC and CDR logging and it's working fine for the logging but
I noticed something wrong in the CDR table , the call source and
destinations are depending on the BYE message not the initial invite dialog

ACC table
+-----+--------+--------------------------------------+---------------------+---------------+---------------------------+--------------+--------------+--------------------------------------+
| id  | method | callid                               | time
 | src_ip        | src_domain                | src_user     | dst_ouser
 | dst_domain                           |
+-----+--------+--------------------------------------+---------------------+---------------+---------------------------+--------------+--------------+--------------------------------------+
| 216 | BYE    | 81fa79a0-3deb-47b6-80ab-831a78a5d46e | 2022-02-09 06:57:51
| x.x.x.x  | domain.com       |  DST_CLID |  SRC_CLID | domain.com
         |
| 215 | INVITE | 81fa79a0-3deb-47b6-80ab-831a78a5d46e | 2022-02-09 06:55:17
| x.x.x.x  | domain.com              | SRC_CLID   | DST_CLID |
dst_domain.com            |

The INVITE is the correct one with SRCIP x.x.x.x and domain.com but the BYE
reversed the order since the the DST_CLID who sent the BYE so it's now
logged as the source

and the final CDR log looks like

+--------+--------------+---------------------------+--------------+--------------------------------------+---------------------+---------------------+----------+-----+-------+--------+-------+---------+
| cdr_id | src_username | src_domain                | dst_username |
dst_domain                           | call_start_time     | call_end_time

+--------+--------------+---------------------------+--------------+--------------------------------------+---------------------+---------------------+----------+-----+-------+--------+-------+---------+
|    195 |  DST_CLID | domain.com       |  SRC_CLID | domain.com
       | 2022-02-09 06:55:12 | 2022-02-09 06:57:51 |

the CDR as shown is reversed regarding the source/dst username

I tried to enable the direction ACC direction flag but didn't help and here
is my current paramters

modparam("acc", "early_media", 0)
modparam("acc", "report_ack", 0)
modparam("acc", "report_cancels", 0)
modparam("acc", "detect_direction", 0)
modparam("acc", "log_flag", FLT_ACC)
modparam("acc", "log_missed_flag", FLT_ACCMISSED)
modparam("acc", "cdr_enable", 1)
modparam("acc", "cdrs_table", "cdrs")

Can you please advise how to configure ACC/CDR to log the CDR with the
correct initial INVITE call flow regardless of the BYE direction ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20220209/ef3414c4/attachment.htm>


More information about the sr-users mailing list