[SR-Users] Fwd: acc_cdrs empty

Nelson Migliaro eng.migliaro at gmail.com
Thu Mar 31 13:39:17 CEST 2016


Resolved, due to a routing error, dialog flag was not being activated
setflag(4);


---------- Forwarded message ----------
From: Nelson Migliaro <eng.migliaro at gmail.com>
Date: 2016-03-30 23:50 GMT+02:00
Subject: acc_cdrs empty
To: "Kamailio (SER) - Users Mailing List" <sr-users at lists.sip-router.org>


Hello,

I am not able to set up cdr.

I see acc table is updated with 2 new entries after each call (INVITE and
BYE) but acc_cdrs is empty.

There are errors in the log.

I think that I set up everything but is not working,

- load the module, set module params and set the flag? Am I missing
something, should I use a store procedure or something?

------------------------------------------------------------------------------------------------------------


loadmodule "acc.so"

modparam("acc", "early_media", 0)
modparam("acc", "report_ack", 0)
modparam("acc", "report_cancels", 0)
modparam("acc", "detect_direction", 1)

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_start_on_confirmed", 1)
modparam("acc", "cdrs_table", "acc_cdrs")
modparam("acc", "cdr_start_id", "start_time")
modparam("acc", "cdr_end_id", "end_time")
modparam("acc", "cdr_duration_id", "duration")

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

route[WITHINDLG] {
    if (has_totag()) {
        if (loose_route()) {
            route(DLGURI);
            if (is_method("BYE")) {


CREATE TABLE `acc_cdrs` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `start_time` varchar(32) NOT NULL DEFAULT '',
  `end_time` varchar(32) NOT NULL DEFAULT '',
  `duration` varchar(32) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `start_time_idx` (`start_time`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1$$


Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20160331/713ee98d/attachment.html>


More information about the sr-users mailing list