Hello,

the cdrs generated for siremis are different than the cdrs generated by acc module. The siremis cdrs rely only on acc records, and you have to configure it like explained at:

- http://kb.asipto.com/siremis:install40x:accounting

Cheers,
Daniel

On 8/9/13 11:56 AM, Nandini madhu wrote:
Dear All,

I am working  on Kamailio (4.0.1) server with GUI package Siremis (4.0) of it. I was successful in get through Calls and SMS features in our VoIP phones using this kamailio sever. But i am encountering some issues related to CDR data generation into mysql database.

I have activated WITH_ACCDB in kamailio cfg file.
Siremis is configured to kamailio DB properly as i am getting accounting list in the siremis GUI well,  but only the CDR data is not getting reflecting in GUI.

But this CDR data is successfully logging into syslog (see the paragraph below), but my requirement is to get the CDR data to be reflect in my GUI.

Here below is the CDR data that logged into syslog:

Aug  3 17:36:25 kamailio /usr/local/sbin/kamailio[12391]: INFO: acc [acc.c:275]: acc_log_request(): ACC: transaction answered: timestamp=1375531585;method=INVITE;from_tag=170287292812;to_tag=373699520912;call_id=6595ee13-bfec-15a7-ae-4b-00210705d550@192.168.2.99;code=200;reason=OK;src=;dst=
Aug  3 17:36:25 kamailio /usr/local/sbin/kamailio[12393]: INFO: acc [acc.c:275]: acc_log_request(): ACC: request acknowledged: timestamp=1375531585;method=ACK;from_tag=170287292812;to_tag=373699520912;call_id=6595ee13-bfec-15a7-ae-4b-00210705d550@192.168.2.99;code=200;reason=OK;src=;dst=
Aug  3 17:36:29 kamailio /usr/local/sbin/kamailio[12391]: INFO: acc [acc_cdr.c:192]: write_cdr(): st=1375531585.654; et=1375531588.863; duration=3.209; src_user=102; src_domain=192.168.2.41; src_ip=192.168.2.99; dst_ouser=101; dst_user=101; dst_domain=192.168.2.77

And my kamailio.cfg script relating to CDR's is like this:

/* enhanced DB accounting */
#!ifdef WITH_ACCDB
modparam("acc", "db_flag", FLT_ACCDB)  /* FLT_ACCDB is 2 */
modparam("acc", "db_missed_flag", FLT_ACCMISSED) /* FLT_ACCMISSED is 3 */
modparam("acc", "db_url", mysql://kamailio:kamailiorw@kamailio/kamailio)
#modparam("acc", "db_extra","src_user=$fU;src_domain=$fd;src_ip=$si;""dst_ouser=$tU;dst_user=   $rU;dst_domain=$rd;""duration=$DLG_lifetime")
#modparam("acc", "db_extra","${cdr_extra}")
modparam("acc", "db_extra","src_user=$fU;src_domain=$fd;src_ip=$si;""dst_ouser=$tU;dst_user=   $rU;dst_domain=$rd")
modparam("acc", "db_table_acc", "acc")
#modparam("acc", "db_table_acc", "acc_$time(year)_$time(mon)")
modparam("acc", "db_table_missed_calls", "missed_calls")
modparam("acc", "acc_method_column", "method")
modparam("acc", "acc_from_tag_column", "from_tag")
modparam("acc", "acc_to_tag_column", "to_tag")
modparam("acc", "acc_callid_column", "callid")
modparam("acc", "acc_sip_code_column", "sip_code")
modparam("acc", "acc_sip_reason_column", "sip_reason")
modparam("acc", "acc_time_column", "time")
modparam("acc", "db_insert_mode", 0)
#!endif

# -------- for siremis CDRs -----------
modparam("acc", "cdr_enable", 1)
modparam("acc", "cdr_start_on_confirmed", 1)
modparam("acc", "cdr_facility", "LOG_DAEMON")
#modparam("acc", "cdr_extra", "c1=$dlg_var(caller);c2=$dlg_var(callee)")
modparam("acc", "cdr_extra", "src_user=$fU;src_domain=$fd;src_ip=$si;""dst_ouser=$tU;dst_user=$rU;dst_domain=$rd")      
modparam("acc", "cdr_start_id", "st")
modparam("acc", "cdr_end_id", "et")
modparam("acc", "cdr_duration_id", "duration")
.
modparam("rtimer", "timer", "name=cdr;interval=300;mode=1;")
modparam("rtimer", "exec", "timer=cdr;route=2")
modparam("sqlops", "sqlcon", "ca=>mysql://kamailio:kamailiorw@localhost/kamailio")
modparam("sqlops", "sqlres", "ra")
.
.
# Populate CDRs Table of Siremis
route[2] {
        sql_query("ca","call kamailio_cdrs()","ra");
}

Can u guess where i am wrong ? how can i solve this issue ?

And for your notice, in acc module document it is said like this:
 'Note that CDR generation does not involve any kind of database storage (yet). In order to persist the CDRs into a database you will have to set up an exterior process (i.e., a script living outside of Kamailio) and implement the storage task yourself'.
What does it mean ? of course 'cdrs' table in kamailio database is empty.

Any help will greatly appreciate.

Regards,
Nandini.


_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda