[Devel] table names for ACC module

Victor Gamov vitspec at gmail.com
Mon Oct 16 12:14:44 CEST 2006


Hi guys!

I use OpenSER a bit of time but I have many experience in VoIP and billing
production.

Now we use ACC module to write accounting info into DB directly (not through
RADIUS/DIAMETER) and then we use accounting table to produce CDR for our
billing software.
Now we have many records in one table but it's very useful if we can write
accounting info into different tables changed periodically by the time
principle.
I propose to use meta-characters in table-name parameter for this purpose.
We can use meta-characters like strftime() for example, so if I write in
config something like

modparam("acc", "db_table_acc", "myacc_table-%Y-%m-%d")

I have get one accounting table per day.

It's really very flexible and very useful in many situations.

One complexity which I see now -- we must have CREATE TABLE statement in
OpenSER.  But if OpenSER write accounting into some external
database.table(not default
openser.acc) external process can create this table or (more correctly) we
can have one more ACC module parameter like "db_table_acc_create" and use it
as SQL statement to create table.

-- 
CU,
Victor Gamov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://openser.org/pipermail/devel/attachments/20061016/c5ebc3ba/attachment.html


More information about the Devel mailing list