Before compiling. In acc makefile, uncomment: DEFS+=-DSQL_ACC
In main Makefile exclude_modules?= cpl cpl-c extcmd \ snmp postgres \ im \ jabber mysql \ /*remove mysql*/ auth_radius group_radius uri_radius Be sure that mysql module is rightly compiled, and mysql.so file is created.
In ser.cfg, the basic lines to enable accounting are:
loadmodule "/usr/local/lib/ser/modules/mysql.so" loadmodule "/usr/local/lib/ser/modules/acc.so"
modparam("acc", "db_url", "sql://ser:heslo@localhost/ser") modparam("acc", "db_flag", 1) //See if you put "log_flag", in this case you are logging in syslog.
In route () {
setflag(1); //All will be marked with flag one enabled. This flag must be the same that you are watching with "db_flag" parameter.
In my case, only this is necessary to obtain an accounting. Best Regards
hi,
thank you very mutch!
modparam("acc", "db_url", "sql://ser:heslo@localhost/ser") modparam("acc", "db_flag", 1) //See if you put "log_flag", in this case you are logging in syslog.
this was my error, i have not unterstand what log_flag means syslog and db_flag means sql.
it works! many thanks.
bg, Grigory