Hi All
Does anyone have a working example of
modparam("acc", "diameter_extra", "7846=$hdr(Content-type);7847=$avp(s:email)")
In my setup I do have
modparam("acc", "db_url", "mysql://openser:123456@87.236.144.12/openser")
modparam("acc", "acc_from_tag_column", "from_tag")
modparam("acc", "acc_to_tag_column", "to_tag")
modparam("acc", "db_flag", 2)
#modparam("acc", "db_extra", "ct=$hdr(Content-type); email=$avp(s:email)")
I am getting the from and to data in the MySQL acc table. However I do need to save the URI and RURI as well. I tried with the example above but it stopped the logging to the database.
Can anyone please direct me into the correct direction ?
Thanks.
Anyone with a working example please ?
Thanks
________________________________
From: users-bounces@lists.openser.org [mailto:users-bounces@lists.openser.org] On Behalf Of Ali Jawad Sent: Tuesday, June 17, 2008 10:15 AM To: users@lists.openser.org Subject: [OpenSER-Users] Acc Modules + Extra paramters
Hi All
Does anyone have a working example of
modparam("acc", "diameter_extra", "7846=$hdr(Content-type);7847=$avp(s:email)")
In my setup I do have
modparam("acc", "db_url", "mysql://openser:123456@87.236.144.12/openser")
modparam("acc", "acc_from_tag_column", "from_tag")
modparam("acc", "acc_to_tag_column", "to_tag")
modparam("acc", "db_flag", 2)
#modparam("acc", "db_extra", "ct=$hdr(Content-type); email=$avp(s:email)")
I am getting the from and to data in the MySQL acc table. However I do need to save the URI and RURI as well. I tried with the example above but it stopped the logging to the database.
Can anyone please direct me into the correct direction ?
Thanks.
On Tuesday 17 June 2008, Ali Jawad wrote:
Anyone with a working example please ? [..]
Hi Ali,
please don't post your question again without adding any new informations. Keep in mind that the support in this channel is done voluntary, so sometimes it needs a little bit more time to get an answer.
Cheers,
Henning
On Tuesday 17 June 2008, Ali Jawad wrote:
Does anyone have a working example of
modparam("acc", "diameter_extra", "7846=$hdr(Content-type);7847=$avp(s:email)")
In my setup I do have
modparam("acc", "db_url", "mysql://openser:123456@87.236.144.12/openser")
modparam("acc", "acc_from_tag_column", "from_tag")
modparam("acc", "acc_to_tag_column", "to_tag")
modparam("acc", "db_flag", 2)
#modparam("acc", "db_extra", "ct=$hdr(Content-type); email=$avp(s:email)")
I am getting the from and to data in the MySQL acc table. However I do need to save the URI and RURI as well. I tried with the example above but it stopped the logging to the database.
Hi Ali,
do you get an error message in the server logs? In order to be able to insert the extra accounting stuff in the DB you need to create the appropriate columns too. Take a look at examples/acc-mysql.cfg for an example.
Perhaps you can try first to use syslog ACC, as this is the easiest to setup. If this work for all your extra accounting, try to swith to the DB, and see if it continues to work.
Cheers,
Henning
Hi Henning
Sorry for any inconvenience I might have caused if I do use
modparam("acc", "db_url", "mysql://openser:123456@87.236.144.12/openser")
modparam("acc", "acc_from_tag_column", "from_tag")
modparam("acc", "acc_to_tag_column", "to_tag")
modparam("acc", "db_flag", 2)
The call is added to the acc table. However I need to get the URI and RURI to be inserted in the database as well..so I used the example in the module howto modparam("acc", "db_extra","7846=$hdr(Content-type);7847=$avp(s:email)" When I do add this line to the config nothing is logged anymore into the db. Another thing that I was wondering about is how does openser know in which column to add that db_extra data ?
The error I get when using the avp db_extra is
Jun 18 12:57:23 [24162] ERROR:mysql:db_mysql_submit_query: driver error: Unknown column 'ct' in 'field list' Jun 18 12:57:23 [24162] ERROR:mysql:db_mysql_insert: error while submitting query Jun 18 12:57:23 [24162] ERROR:acc:acc_db_request: failed to insert into database Jun 18 12:57:23 [24162] DBG:tm:cleanup_uac_timers: RETR/FR timers reset
Thanks for anyhelp
-----Original Message----- From: Henning Westerholt [mailto:henning.westerholt@1und1.de] Sent: Wednesday, June 18, 2008 1:26 PM To: users@lists.openser.org Cc: Ali Jawad Subject: Re: [OpenSER-Users] Acc Modules + Extra paramters
On Tuesday 17 June 2008, Ali Jawad wrote:
Does anyone have a working example of
modparam("acc", "diameter_extra", "7846=$hdr(Content-type);7847=$avp(s:email)")
In my setup I do have
modparam("acc", "db_url", "mysql://openser:123456@87.236.144.12/openser")
modparam("acc", "acc_from_tag_column", "from_tag")
modparam("acc", "acc_to_tag_column", "to_tag")
modparam("acc", "db_flag", 2)
#modparam("acc", "db_extra", "ct=$hdr(Content-type); email=$avp(s:email)")
I am getting the from and to data in the MySQL acc table. However I do need to save the URI and RURI as well. I tried with the example above but it stopped the logging to the database.
Hi Ali,
do you get an error message in the server logs? In order to be able to insert the extra accounting stuff in the DB you need to create the appropriate columns too. Take a look at examples/acc-mysql.cfg for an example.
Perhaps you can try first to use syslog ACC, as this is the easiest to setup. If this work for all your extra accounting, try to swith to the DB, and see if it continues to work.
Cheers,
Henning
On Wednesday 18 June 2008, Ali Jawad wrote:
modparam("acc", "db_url", "mysql://openser:123456@87.236.144.12/openser")
modparam("acc", "acc_from_tag_column", "from_tag")
modparam("acc", "acc_to_tag_column", "to_tag")
modparam("acc", "db_flag", 2)
The call is added to the acc table. However I need to get the URI and RURI to be inserted in the database as well..so I used the example in the module howto modparam("acc", "db_extra","7846=$hdr(Content-type);7847=$avp(s:email)" When I do add this line to the config nothing is logged anymore into the db. Another thing that I was wondering about is how does openser know in which column to add that db_extra data ?
The error I get when using the avp db_extra is
Jun 18 12:57:23 [24162] ERROR:mysql:db_mysql_submit_query: driver error: Unknown column 'ct' in 'field list' Jun 18 12:57:23 [24162] ERROR:mysql:db_mysql_insert: error while submitting query Jun 18 12:57:23 [24162] ERROR:acc:acc_db_request: failed to insert into database Jun 18 12:57:23 [24162] DBG:tm:cleanup_uac_timers: RETR/FR timers reset
Hi Ali,
the acc module can't insert the data because the 'ct' column you specified in the db_extra parameter (original mail) is not available in your add table.
As i said, you need to create the columns in the acc table for all db_extra informations you want to log. Take a look at http://devel.openser.org/svn/trunk/examples/acc-mysql.cfg for an DB setup and the belonging db_extra configuration to get an idea.
Henning
Hi Henning As per your example everything worked great. However I noticed that the missed calls statement reads
CREATE TABLE `missed calls` (
Whereas the acc module default missed call table name is 'missed_calls' not 'missed calls' this caused me some problems I don't know if this is a typo or not, I just thought of letting you know.
Thanks for your efforts.
-----Original Message----- From: Henning Westerholt [mailto:henning.westerholt@1und1.de] Sent: Wednesday, June 18, 2008 3:18 PM To: Ali Jawad Cc: users@lists.openser.org Subject: Re: [OpenSER-Users] Acc Modules + Extra paramters
On Wednesday 18 June 2008, Ali Jawad wrote:
modparam("acc", "db_url", "mysql://openser:123456@87.236.144.12/openser")
modparam("acc", "acc_from_tag_column", "from_tag")
modparam("acc", "acc_to_tag_column", "to_tag")
modparam("acc", "db_flag", 2)
The call is added to the acc table. However I need to get the URI and RURI to be inserted in the database as well..so I used the example in the module howto modparam("acc", "db_extra","7846=$hdr(Content-type);7847=$avp(s:email)" When I do add this line to the config nothing is logged anymore into
the
db. Another thing that I was wondering about is how does openser know
in
which column to add that db_extra data ?
The error I get when using the avp db_extra is
Jun 18 12:57:23 [24162] ERROR:mysql:db_mysql_submit_query: driver
error:
Unknown column 'ct' in 'field list' Jun 18 12:57:23 [24162] ERROR:mysql:db_mysql_insert: error while submitting query Jun 18 12:57:23 [24162] ERROR:acc:acc_db_request: failed to insert
into
database Jun 18 12:57:23 [24162] DBG:tm:cleanup_uac_timers: RETR/FR timers
reset
Hi Ali,
the acc module can't insert the data because the 'ct' column you specified in the db_extra parameter (original mail) is not available in your add table.
As i said, you need to create the columns in the acc table for all db_extra informations you want to log. Take a look at http://devel.openser.org/svn/trunk/examples/acc-mysql.cfg for an DB setup and the belonging db_extra configuration to get an idea.
Henning
On Thursday 19 June 2008, Ali Jawad wrote:
As per your example everything worked great. However I noticed that the missed calls statement reads
CREATE TABLE `missed calls` (
Whereas the acc module default missed call table name is 'missed_calls' not 'missed calls' this caused me some problems I don't know if this is a typo or not, I just thought of letting you know.
Hi Ali,
thank you for the report, i'll fix this.
Henning
Hi I am glad I could be of any use in this project, even for a tiny issue like this one. TC -----Original Message----- From: Henning Westerholt [mailto:henning.westerholt@1und1.de] Sent: Tuesday, June 24, 2008 1:48 PM To: Ali Jawad Cc: users@lists.openser.org Subject: Re: [OpenSER-Users] Acc Modules + Extra paramters
On Thursday 19 June 2008, Ali Jawad wrote:
As per your example everything worked great. However I noticed that
the
missed calls statement reads
CREATE TABLE `missed calls` (
Whereas the acc module default missed call table name is
'missed_calls'
not 'missed calls' this caused me some problems I don't know if this
is
a typo or not, I just thought of letting you know.
Hi Ali,
thank you for the report, i'll fix this.
Henning