Hi Paul,
yes, I have the standard acc parameters set up. I have RADIUS logging of transactions working (start and stop events on call establishment and clear down) but not CDR events. I understand that CDR support requires the dialog module and I figure that the dlg_flag needs to be set and cleared in the route script, but I'm not sure where.
The relevant parameters are:
# ----- acc params ----- /* what special events should be accounted ? */ modparam("acc", "early_media", 0) modparam("acc", "report_ack", 0) modparam("acc", "report_cancels", 0) /* by default ww do not adjust the direct of the sequential requests. if you enable this parameter, be sure the enable "append_fromtag" in "rr" module */ modparam("acc", "detect_direction", 0) /* account triggers (flags) */ modparam("acc", "log_flag", FLT_ACC) modparam("acc", "log_missed_flag", FLT_ACCMISSED) modparam("acc", "log_extra", "src_user=$fU;src_domain=$fd;src_ip=$si;" "dst_ouser=$tU;dst_user=$rU;dst_domain=$rd") modparam("acc", "failed_transaction_flag", FLT_ACCFAILED) /* enhanced DB accounting */ #!ifdef WITH_ACCDB modparam("acc", "db_flag", FLT_ACC) modparam("acc", "db_missed_flag", FLT_ACCMISSED) modparam("acc", "db_url", DBURL) modparam("acc", "db_extra", "src_user=$fU;src_domain=$fd;src_ip=$si;" "dst_ouser=$tU;dst_user=$rU;dst_domain=$rd") #!endif modparam("acc", "cdr_enable", 1) #modparam("acc", "cdr_facility", "LOG_LOCAL0") #!ifdef WITH_ACC_RADIUS modparam("acc_radius", "radius_config", "/usr/local/etc/radiusclient-ng/radiusclient.conf") modparam("acc_radius", "radius_flag", FLT_ACC) modparam("acc_radius", "radius_missed_flag", FLT_ACCMISSED) modparam("acc_radius", "radius_extra", "Called-Station-Id=$tu;Calling-Station-Id=$fu") # ----- dialog params ----- modparam("dialog", "dlg_flag", 4) #!endif
On 6 November 2012 20:52, Pawel Kuzak pawel.kuzak@1und1.de wrote:
Hi Owen,
I think basically you are right. But referring to your code example, did you set up the *log_flag* module parameter correctly? E.g.:
#!define FLT_ACC 1 modparam("acc","log_flag", FLT_ACC)
Greetings, Paul
On 06.11.2012 00:34, Owen Lynch wrote:
Hi,
I have transaction accounting to RADIUS setup and get the start and stop events logged to file when a call is made. I want to extend this to also get CDR logs - call duration etc. To do this I understand I need to configure the acc module and load and configure the dialog module:
#!define FLD_DLG 4 modparam("acc", "cdr_enable", 1) modparam("dialog", "dlg_flag", FLD_DLG)
I was expecting extra entries in the RADIUS file but they don't appear. I think this is because I need to set and clear the dialog flag at appropriate places in the route script (e.g. setflag(FLD_DLG)) but I'm not sure where. Should this be done in the INVITE and BYE method handling as is currently done for the transaction accounting, e.g.:
# account only INVITEs if (is_method("INVITE")) { setflag(FLT_ACC); # do accounting }
Thanks, Owen Lynch
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