[SR-Users] CDR - acc_cdrs

Annus Fictus annusfictus at gmail.com
Thu Jan 5 15:58:43 CET 2017


Hi Diego,

I'm using default script:

# account only INVITEs
         if (is_method("INVITE")) {
                 setflag(FLT_ACC); # do accounting
         }


if (is_method("BYE")) {
                         setflag(FLT_ACC); # do accounting ...
                         setflag(FLT_ACCFAILED); # ... even if the 
transaction fails
                 }

Regards


El 05/01/2017 a las 09:54, Diego Nadares escribió:
> Hi Annus,
>
> Did you set the flags for those calls you want to account?
>
> I have something like this in my request route
>
> if (is_method("INVITE") && !has_totag()) {
>                 setflag(FLT_ACC); # do accounting
>                 dlg_manage();
>                 setflag(FLT_ACCMISSED);
>                 setflag(FLT_ACCFAILED);
>  }
>
> Logs?
>
> Cheers,
>
> Diego
>
>
>
> 2017-01-05 11:13 GMT-03:00 Annus Fictus <annusfictus at gmail.com 
> <mailto:annusfictus at gmail.com>>:
>
>     Hello,
>
>     I'm trying to save Kamailio CDR on acc_cdrs table without success.
>     My relevant configuration look like:
>
>     -----
>
>     #!define FLT_ACC 1
>     #!define FLT_ACCMISSED 2
>     #!define FLT_ACCFAILED 3
>
>     -----
>
>     #!define WITH_ACCDB
>
>     ----
>
>     loadmodule "dialog.so"
>     loadmodule "acc.so"
>     modparam("dialog", "dlg_flag", 0)
>
>     ----
>
>     # ----- acc params -----
>     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", "log_extra",
>             "src_user=$fU;src_domain=$fd;src_ip=$si;"
>             "dst_ouser=$tU;dst_user=$rU;dst_domain=$rd")
>     modparam("acc", "failed_transaction_flag", FLT_ACCFAILED)
>     #!ifdef WITH_ACCDB
>     modparam("acc", "db_flag", FLT_ACC)
>     modparam("acc", "db_missed_flag", FLT_ACCMISSED)
>     modparam("acc", "db_url", DBURL)
>     modparam("acc", "cdr_enable", 1)
>     modparam("acc", "cdr_log_enable", 1)
>     modparam("acc", "cdr_on_failed", 1)
>     modparam("acc", "cdrs_table", "acc_cdrs")
>     modparam("acc", "cdr_start_on_confirmed", 1)
>     modparam("acc", "db_extra",
>             "src_user=$fU;src_domain=$fd;src_ip=$si;"
>             "dst_ouser=$tU;dst_user=$rU;dst_domain=$td")
>     #!endif
>
>     Any hint is really appreciate.
>
>     Regards
>
>
>
>     _______________________________________________
>     SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
>     list
>     sr-users at lists.sip-router.org <mailto:sr-users at lists.sip-router.org>
>     http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>     <http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users>
>
>
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20170105/cf188524/attachment.html>


More information about the sr-users mailing list