Hello Bogdan-Andrei, Might as well disregard this request. I wasn¹t really thinking about the fact that if I was to host a couple of customers and they happen to call each other, I would need account_id (attrs) for both of them. So when I run the report at the end of the month, they would both have it as a record.
Thanks again, Gordon From: Bogdan-Andrei Iancu <[email protected]> Reply-To: OpenSIPS users mailling list <[email protected]> Date: Sun, 8 Jun 2014 17:45:35 +0300 To: OpenSIPS users mailling list <[email protected]>, Gordon Sims <[email protected]> Subject: Re: [OpenSIPS-Users] Adding extra information into the acc table based on dr_rules Hi Gordon, Instead of adding a new column to the dr_rules, I suggest to use the "attrs" column of that table. It is not used by the actual routing engine, its only purpose is to allow the user to attach custom data to the rules. So add your ID into the attrs columns - when the rule is match, the attrs value will be available into script into a variable (see http://www.opensips.org/html/docs/modules/1.11.x/drouting.html#id294716, rule_attrs_pvar parameter). Once you loaded into a variable, via db_extra you can push it to the acc table. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 08.06.2014 15:35, Gordon Sims wrote: > > First off, I would like to thank Razvan for my cdr accounting issue and using > db_extra. Was exactly what I was looking for. > > > > > Now I¹m getting stumped on adding in extra information into the acc table. > I¹ve added in another field to both my dr_rules and acc tables called > account_id (int 6). What I would like to do is when the call comes in, based > on the destination, is to take the account_id information from the dr_rules > table and insert that same value into the acc table. I¹ve looked at avpops > module, but not finding anything definitive that would do what I¹ve looking > for. I hope I¹m not the only one that is trying to do this. I¹m looking for > a working example on how to accomplish this one. > > > > > Thanks in advance, > > > > > Gordon > > > > _______________________________________________ > Users mailing list > [email protected]http://lists.opensips.org/cgi-bin/mailman/listinfo/use > rs > _______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
