[OpenSIPS-Users] Sending CDR over event_datagram module
Răzvan Crainea
razvan at opensips.org
Mon Jul 14 19:23:40 CEST 2014
Hi, Dan!
Yes, you are on the right path. You do have to specify the evi_flag,
otherwise the acc module does not know what kind of accounting to do (DB
based, log based, aaa based, events based). If you don't specify the
cdr_flag, then you will get an old-style accounting - for a single call
you will get two events, one for INVITE and one for BYE. To compute the
duration you have to make the difference between their timestamps. When
using the cdr_flag, OpenSIPS raises only a single event, that contains
all the call details, including the duration.
If you set the evi_flag on BYE messages too, do you receive two
E_ACC_CDR events, or one E_ACC_CDR and one E_ACC_EVENT?
Best regards,
Razvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com
On 07/14/2014 05:55 PM, Dan Christian Bogos wrote:
> 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
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
More information about the Users
mailing list