[Serusers] acc module with mysql support

Gorka Guridi gorka.guridi at gmail.com
Tue May 17 13:34:53 CEST 2005


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20050517/e2f0bdfd/attachment.htm>


More information about the sr-users mailing list