[OpenSIPS-Users] Simple ACC test with MySQL
Flavio Goncalves
flavio at asteriskguide.com
Fri Nov 5 18:30:20 CET 2010
Hi David,
It seems that you have inserted the wrong fields in the database. If
you are using from_uri and to_uri, these are the fields to be inserted
in the database instead of caller_id and callee_id.
Regards,
Flavio E. Goncalves
2010/11/5 David Santiago <david.santiago at almiralabs.com>:
> 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
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
More information about the Users
mailing list