[OpenSIPS-Users] Sending CDR over event_datagram module

Dan Christian Bogos danb.lists at gmail.com
Mon Jul 14 16:55:05 CEST 2014


Hey Guys,

As part of integrating Opensips with CGRateS, we were wondering whether 
we are following the right path in terms of generating/processing CDRs 
for OpenSIPS.

Here is our approach:

1. Load event_datagram
2. Load dialog
3. Configure acc params as:
modparam("acc", "cdr_flag", "CDR_FLAG")
modparam("acc", "evi_flag", "CDR_FLAG")
modparam("acc", "evi_extra",
         "cgr_reqtype=$avp(cgr_reqtype);
         cgr_destination=$rU;
         cgr_account=$fU;
         cgr_subject=$fU")


4. Subscribe to E_ACC_CDR events (in startup_route or dynamically over 
mi_*).

This configuration generates an event like:
"""
#
U 2014/07/14 16:43:14.965245 127.0.0.1:44732 -> 127.0.0.1:2020
E_ACC_CDR
method::INVITE
from_tag::df57f22a
to_tag::cf29f53b
callid::YzAxMjJlMmRmZDM0MGZhMDJkYTk3YTZkOGQ2MzczODM.
sip_code::200
sip_reason::OK
time::1405348989
cgr_reqtype::prepaid
cgr_destination::dan
cgr_account::dan
cgr_subject::dan
duration::5
setuptime::2
created::1405348987
"""

Is this approach correct from your point of view? Out of documentation 
could not figure out whether we need or not to specify the evi_flag or 
specifying cdr_flag and handler for the event should suffice.
The second thing which we have noted was that we can activate CDR_FLAG 
also for BYEs and if we do that we receive 2 CDR events, one for method 
INVITE and second for BYE. Is this correct?

We are using 1.11.2 out of debian packages (default residential 
generated configuration with dialog enabled).

Thanks in advance!

DanB





More information about the Users mailing list