[OpenSIPS-Users] Write acc_extra data to separate table

Bogdan-Andrei Iancu bogdan at opensips.org
Thu Jun 11 14:48:40 EST 2020


Hi Mark,

If you want to have full control over the DB usage for the ACC data, I 
would suggest to use the event_route module to capture the ACC_CDR event 
(produced by the acc module) - this event will expose all the acc data 
(extra + legs). In the event route you use the avp_db_query() function 
(from the avpops) module to place the acc fields in whatever tables / DB 
you want.

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com

On 6/11/20 1:38 PM, Mark Farmer wrote:
> Thanks for the reply Johan, I'm not sure that's quite what I'm looking 
> for.
> I'd like the usual acc data to be written to the normal acc table but 
> my extra data written to a different table, preferably in a different 
> database.
>
> Many thanks
> Mark.
>
>
> On Thu, 11 Jun 2020 at 11:32, Johan De Clercq <Johan at democon.be 
> <mailto:Johan at democon.be>> wrote:
>
>     If I am not wrong, you can specify the accounting table and db in
>     the module params.
>     Hence make a copy of the table, insert in a new db, add your extra
>     column and adapt the module parameters.
>
>     wkr,
>
>     Op do 11 jun. 2020 om 12:18 schreef Mark Farmer <farmorg at gmail.com
>     <mailto:farmorg at gmail.com>>:
>
>         Hi everyone
>
>         I have a couple of extra fields in my acc database table which
>         is added by acc_extra. This causes issues when upgrading.
>         I would prefer to have that data stored in a different
>         database/table.
>
>         Is there a nice way to do that?
>         OpenSIPS 3.0 in this case.
>
>         Many thanks
>         Mark.
>
>         _______________________________________________
>         Users mailing list
>         Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>         http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>     _______________________________________________
>     Users mailing list
>     Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> -- 
> Mark Farmer
> farmorg at gmail.com <mailto:farmorg at gmail.com>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20200611/d2a9bbe6/attachment-0001.html>


More information about the Users mailing list