[SR-Users] No cdr after Kamailio 5.0 restart

Kordován Szabolcs koszab at gmail.com
Tue Mar 14 22:00:36 CET 2017


Hello Daniel,

Sorry for my reply, I didn't receive your mail.
So, only the active calls are affected. The new call, from invite to
bye-ok, is recorded into table acc and acc_cdrs.

Regards,
Szabolcs

2017-03-14 11:13 GMT+01:00 Kordován Szabolcs <koszab at gmail.com>:

> Hi,
>
> I use acc module for create cdr into db and also make acc log into db.
> After restart Kamailio cdr won't be created but acc log will be inserted
> into db. In the syslog also I see just the acc log. The dialog will be
> remove from db.
>
> I have read many threads. I know that it should work.
>
> Thanks for help!
> Regards,
> Szabolcs
>
> From my configs:
>
> #!define FLT_ACC 1
> #!define FLT_ACCMISSED 2
> #!define FLT_ACCFAILED 3
>
> modparam("acc", "db_url", DBURL)
> modparam("acc", "db_flag", FLT_ACC)
> modparam("acc", "db_missed_flag", FLT_ACCMISSED)
> modparam("acc", "db_extra", "src_user=$fU;src_domain=$fd;
> dst_ouser=$tU;dst_user=$rU;dst_domain=$rd;src_ip=$si")
>
> modparam("acc", "log_level", 3)
> modparam("acc", "log_flag", FLT_ACC)
> modparam("acc", "log_missed_flag", FLT_ACCMISSED)
>
> modparam("acc", "report_ack", 1)
> modparam("acc", "report_cancels", 1)
> modparam("acc", "early_media", 1)
>
> modparam("acc", "failed_transaction_flag", FLT_ACCFAILED)
>
> modparam("acc", "acc_prepare_always", 1)
> modparam("acc", "time_mode", 1)
> modparam("acc", "time_attr", "seconds")
> modparam("acc", "time_exten", "microsecs")
> modparam("acc", "reason_from_hf", 1)
>
> modparam("acc", "cdr_enable", 1)
> modparam("acc", "cdr_expired_dlg_enable", 1)
> modparam("acc", "cdr_start_on_confirmed", 1)
> modparam("acc", "cdrs_table", "acc_cdrs")
> modparam("acc", "cdr_on_failed", 1)
> modparam("acc", "cdr_extra", "callid=$ci;src_user=$dlg_var(
> fU);src_domain=$dlg_var(fd);dst_ouser=$dlg_var(tU);dst_
> user=$dlg_var(rU);dst_domain=$dlg_var(rd);src_ip=$dlg_var(
> si);peer_in=$dlg_var(peerin);peer_out=$dlg_var(peerout)")
>
> request_route {
> <------>
> <------>$var(loose) = loose_route();
> <------>$var(check_trans) = t_check_trans();
> <------>sip_trace();
> <------>setflag(FLT_SIPTRACE);
> <------>dlg_manage();
>
> <------># handle retransmissions
> <------>if(t_precheck_trans()) {
> <------>    xlogl("LOG_LOCAL0", "L_ALERT", "================== kamaty $rm
> route $ci ==== $rm ==== precheck_trans exit\n");
> <------>    exit;
> <------>}
>
> <------>if(is_method("OPTIONS")) {.
> <------>    # send reply for each options request.
> <------>    sl_send_reply("200", "ok");.
> <------>    exit();.
> <------>}
> <------># CANCEL processing
> <------>if (is_method("CANCEL")) {
> <------><------>if (t_check_trans()) {
> <------><------>    route(RELAY);
> <------><------>}
> <------><------>exit;
> <------>}
> <------>if ( is_method("ACK") ) {
> <------><------>if ( $var(check_trans) ) {
> <------><------>    route(RELAY);
> <------><------>}
> <------><------>exit;
> <------>}
> <------>if (is_method("BYE")) {
> <------>    if ($var(loose)) {
> <------><------>setflag(FLT_ACC); # do accounting ...
> <------><------>setflag(FLT_ACCFAILED); # ... even if the transaction
> fails
> <------><------>setflag(FLT_ACCMISSED);
> <------><------>route(RELAY);
> <------>    <-->exit;
> <------>    }
> <------>    exit;
> <------>}
> etc.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20170314/5681d6db/attachment.html>


More information about the sr-users mailing list