Hi all, I am using SER 2.0 rc1. I am trying to make MySql accounting work. I have also attached my ser.cfg file. I don't see any error message while starting SER, but also, nothing is inserted in the acc table. Obviously, I am missing something. Is there some compile time option that i need to set to make this work. Please help me out. Thank you Kumar
Hi!
The way accounting works is that you tag 'calls' with the accounting flag and the module then does the magic. In the default config you find this:
flags FLAG_ACC : 1, [...] modparam("acc_db", "log_flag", "FLAG_ACC") [...]
route { [...] if (method=="INVITE" && @to.tag=="") { setflag(FLAG_ACC); } [...]
A symbolic FLAG_ACC is specified. acc_db is told to look for that FLAG_ACC. Inside the route part a message is tagged (setflag) to enable logging.
Your config reads:
modparam("acc_syslog", "log_flag", "acc.log") modparam("acc_syslog", "log_missed_flag", "acc.missed");
log_flag and log_missed_flag are no log files or such! These are the flags that could be used to tag your 'calls' with. Change the top modparam() back to "FLAG_ACC" and you should see logged calls via syslog. You then need to configure your syslogd to process the log entries properly.
Cheers, Hendrik
Thank you Hendrik for pointing out the mistake. But I also cannot see any accounting information in the MySql Database. Can you tell me why? Obviouly I am missing something here. Thank you Kumar
On 6/7/07, Hendrik Scholz hendrik.scholz@freenet-ag.de wrote:
Hi!
The way accounting works is that you tag 'calls' with the accounting flag and the module then does the magic. In the default config you find this:
flags FLAG_ACC : 1, [...] modparam("acc_db", "log_flag", "FLAG_ACC") [...]
route { [...] if (method=="INVITE" && @to.tag=="") { setflag(FLAG_ACC); } [...]
A symbolic FLAG_ACC is specified. acc_db is told to look for that FLAG_ACC. Inside the route part a message is tagged (setflag) to enable logging.
Your config reads:
modparam("acc_syslog", "log_flag", "acc.log") modparam("acc_syslog", "log_missed_flag", "acc.missed");
log_flag and log_missed_flag are no log files or such! These are the flags that could be used to tag your 'calls' with. Change the top modparam() back to "FLAG_ACC" and you should see logged calls via syslog. You then need to configure your syslogd to process the log entries properly.
Cheers, Hendrik
-- Hendrik Scholz VoIP Systems Engineer
Telefon: + 49 (0) 431 90 20 552 Telefax: + 49 (0) 431 90 20 559 E-Mail: hendrik.scholz@freenet.ag Website: www.freenet.de; www.mobilcom.de
freenet Cityline GmbH Ein Unternehmen der freenet AG Hamburger Chaussee 2-4 24114 Kiel
Geschäftsführer: Eckhard Spoerr, Axel Krieger Amtsgericht Kiel, HRB 6202
Hi!
KUMAR wrote:
Thank you Hendrik for pointing out the mistake. But I also cannot see any accounting information in the MySql Database. Can you tell me why? Obviouly I am missing something here.
You are using acc_syslog and not acc_db. acc_syslog writes syslog entries whereas acc_db relies on a database backend.
Cheers, Hendrik
Is there a convenient way to write both in SER 2.0? In SER 0.9.6, I simply had 1 flag, and the acc module abstracted all the necessary details out for me. Depending upon how I'd compiled it, my 1 flag allowed me to write to mysql, syslog, and/or radius in whatever combination I wished.
Now that the abstraction of a single, simple logging class has been replaced by the increased complexity of 3 separate logging classes, that methodology is no longer possible. Does one now simply set several flags at each turn to determine where to log the data?
N.
Hendrik Scholz wrote:
Hi!
KUMAR wrote:
Thank you Hendrik for pointing out the mistake. But I also cannot see any accounting information in the MySql Database. Can you tell me why? Obviouly I am missing something here.
You are using acc_syslog and not acc_db. acc_syslog writes syslog entries whereas acc_db relies on a database backend.
Cheers, Hendrik