[SR-Users] No cdr after Kamailio 5.0 restart

Daniel-Constantin Mierla miconda at gmail.com
Tue Mar 14 13:37:23 CET 2017


Hello,

is this for all calls, or only for the calls that were active at the
time of restart (the new calls will get the cdrs properly)?

Cheers,
Daniel


On 14/03/2017 11:13, Kordován Szabolcs wrote:
> 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.
>
>
>
> _______________________________________________
> 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

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - www.asipto.com
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com

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


More information about the sr-users mailing list