[OpenSER-Users] Acc Modules + Extra paramters

Ali Jawad ali.jawad at splendor.net
Wed Jun 18 13:59:09 CEST 2008


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 at 1und1.de] 
Sent: Wednesday, June 18, 2008 1:26 PM
To: users at 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

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.





More information about the Users mailing list