[OpenSIPS-Users] Simple ACC test with MySQL

David Santiago david.santiago at almiralabs.com
Fri Nov 5 17:48:06 CET 2010


Hi,

I'm trying to generate CDRs in an OpenSIPS test server. I have checked the
stored procedure that comes with opensips-cp to perform this task and have
noticed that queries the ACC table in order to populate the CDRS table.

Well, first things first. I have used the basic opensips.cfg.sample
configuration (I will not copy it entirely here), adding the changes
required to use mysql with the acc module (after having compiled with mysql
support, of course):

...
loadmodule "db_mysql.so"
...
/* uncomment the following lines to enable DB accounting also */
modparam("acc", "db_flag", 1)
modparam("acc", "db_missed_flag", 2)
modparam("acc", "db_url", "mysql://opensips:opensipsrw@localhost/opensips")
#Pointer to the DB
modparam("acc", "db_extra", "from_uri=$fu; to_uri=$tu") #Extra data
...

I have also modified the ACC table in order to add those fields specified in
the last modparam instruction shown above:

mysql -u root
USE OPENSIPS;
ALTER TABLE `acc` ADD `caller_id` CHAR( 64 ) NOT NULL ;
ALTER TABLE `acc` ADD `callee_id` CHAR( 64 ) NOT NULL ;

After those changes, I'm calling from a voip provider that is linked to the
OpenSIPS test server, in order to send it an INVITE, which is being received
as I have been able to debug with tcpdump.

BUT... no data is being inserted in the ACC table. I can successfully log
into the database with the credentials used in the "db_url" parameter.

Am I wrong assuming that the ACC module is supposed to populate that table
with the setting of flags upon INVITE and BYE requests?


Regards,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20101105/6b3fb871/attachment.htm 


More information about the Users mailing list