[SR-Users] Generate extra cdr per dialog

Diego Nadares dnadares at gmail.com
Sat Mar 18 22:45:52 CET 2017


Sorry, Im reading that acc supports Multi Call-Legs accounting. That's
exactly what I need. I'll try with this first.

Thanks!

Diego.



2017-03-17 16:21 GMT-03:00 Diego Nadares <dnadares at gmail.com>:

> Hi Guys,
>
> I'm using acc module for accounting with the following conf:
>
> ....
> modparam("acc", "cdr_enable", 1)
> modparam("acc", "cdr_expired_dlg_enable", 1)
> modparam("acc", "cdr_start_on_confirmed", 1)
> modparam("acc", "cdr_facility", "LOG_LOCAL1")
> modparam("acc", "cdr_end_id", "end_time_dt")
> modparam("acc", "cdr_extra",
>         "sip_code=$rs;sip_reason=$rr;"
>         "hangup_src=$dlg_var(hangup_disposition);"
>       "prefix=$dlg_var(prefix);gos=$dlg_var(gos);endpoint_type=$
> dlg_var(endpoint_type);"
>         "ip_a=$dlg_var(ip_a);ip_b=$dlg_var(ip_b);"
> ....
>
> It works fine. At the end of the call the cdr is generated ok.
>
> BUT In MANAGE_FAILURE,  If the first call failed and if there are more
> dests, we are generating a new call in the same dialog (Some of the dialog
> vars like ip_a, ip_b can change for the new dest )
>
> I would like to generate both cdrs, the one that failed and the new one
> (with some dlg vars with new data).
>
> if(rtjson_next_route() && t_check_status("503")) {
>                 $avp(current_route) = $avp(current_route)+1;
>                 t_on_branch("MANAGE_BRANCH");
>                 t_on_failure("MANAGE_FAILURE");
>                 route(RELAY);
>                 exit;
>         }
>
>
> Right now just the last call cdr is saved.
>
> I all ready made this work with db_acc (transaction oriented) but I think
> in my case it will be more reliable with cdr (dialog oriented).
>
> Thanks in advance!
>
> Diego.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20170318/1203804b/attachment.html>


More information about the sr-users mailing list