Hi Răzvan Thanks for the quick response. I commented out that loose_route code and now it is all working perfectly.
John Quick Smartvox Limited Hi John, The problem is here: if (method=="INVITE" || method=="BYE") { # Write CDR records to the database setflag(2); } For any sequential request, the CDR engine ignores the flag (2 in your case). But the standard accounting will still notice it, and therefore will log the BYE into the database. Deleting this lines above should no longer account it. Anyway, I guess that the INVITE has all the fields filled properly (especially duration and setuptime), right? Regards, -- Răzvan Crainea OpenSIPS Developer On 20.09.2011 19:07, John Quick wrote: > My favourite module (dialog) got even better when the cdr_flag option was > added. I use it all the time now. > > But it doesn't seem to be working in version 1.7. I know the call is > creating a dialog because db_mode is set to 1 and the record can be seen in > the dialog table while the call is active. However, 2 records are written to > the acc table - one for the INVITE and another for the BYE. So cdr_flag is > being ignored. Is this a problem in v1.7 or have I done something wrong? > > Here's the relevant bits from opensips.cfg: > modparam("acc", "db_flag", 2) > modparam("acc", "cdr_flag", 2) > modparam("acc", "db_missed_flag", 3) > modparam("acc", "failed_transaction_flag", 3) > modparam("acc", "report_cancels", 1) > modparam("acc", "detect_direction", 1) > modparam("acc", "db_extra", "authid=$avp(authid); srcip=$si; called=$rU; > route=$rd; cli=$fU") > > modparam("dialog", "db_mode", 1) # 1 during testing; 0 or 3 for > production > modparam("dialog", "dlg_match_mode", 1) > modparam("dialog", "rr_param", "scdg") # unique rr tag value in case other > opensips servers in route > modparam("dialog", "default_timeout", 14400) # default timeout set to 4 > hours > > route[3] > if (method=="INVITE" || method=="BYE") { > # Write CDR records to the database > setflag(2); > # ...and missed calls too > setflag(3); > } > > if (method=="INVITE") { > # make OpenSIPS create a dialog record (see dialog module for info) > create_dialog(); > } > > ...and my loose routing section: > if (has_totag()) { > if (loose_route()) { > # Attempt to match this request with an existing dialog > match_dialog(); > > # Check authentication of re-invites - don't challenge if from a > known address > if(method=="INVITE"&& > (!check_address("0","$si","$sp","$proto"))) { > if (!proxy_authorize("","subscriber")) { > proxy_challenge("","1"); > exit; > }; > }; > > if (method=="INVITE" || method=="BYE") { > # Write CDR records to the database > setflag(2); > } > > > John Quick > Smartvox Limited > Web: www.smartvox.co.uk _______________________________________________ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users