[SR-Users] ACC_CDRS table with src and dst data are inverted

Fred Posner fred at palner.com
Tue May 15 17:12:17 CEST 2018


On 5/15/18 4:51 PM, Emanuele Gambaro wrote:
> Hi to all,
> I have some troubles with acc_db module and acc_cdrs table.
> First scenario:
> Alice calls Bob and after a while, when a call is established, Alice 
> hangs up, sending a BYE. The acc_cdrs table is filled up with the right 
> data:
> * src_user, src_domain, src_ip are from Alice account (the caller)
> * dst_user etc etc are from Bob account (the callee)
> In this scenario all works as expected: the src data are from who starts 
> the call, and the dst data are from who receives the call.
> 
> In the following scenario src and dst data are inverted.
> 
> Alice calls Bob and after a while, when a call is established, Bob hangs 
> up, sending a BYE. The acc_cdrs table now is:
> * src_user, src_domain, src_ip are from Bob account (the callee that 
> sends the BYE message)
> * dst_user etc etc are from Alice account (the caller that receives the BYE)
> 
> This is the intended behavior or I’m missing something? How I can record 
> the CDR data with the right CALLER and CALLEE data ?
> 
> /Emanuele/
> 

Hi Emanuele,

In the scenarios, the acc is recording the correct src and destination 
of the message that is received; with the src depending on the classic 
teenage question of "who hung up first?"

The difference here is that the accounting table and a CDR is somewhat 
different, but correlated by call-id. In the CDR, you would combine the 
events of the CALL-ID to make a start/end/duration of the call.

A good example of doing this is the stored procedure provided with siremis:

https://github.com/asipto/siremis/blob/master/siremis/modules/sipadmin/mod.install.siremis.sql

--fred



More information about the sr-users mailing list