[OpenSIPS-Devel] [2.2/devel] Heads up, major accounting changes

Ionut Ionita ionutionita at opensips.org
Fri Mar 25 18:12:18 CET 2016


Hello all,

Head’s up for major changes in how to use the accounting module. The
flag-based triggering of accounting showed its limitations, especially now,
in relation to the async processing. Accounting became something really
complex, too complex to be controlled only by simply setting and resetting
flags - we need a way to actually perform also actions (accounting related)
during the script execution.

So, we need something more controllable, more flexible and more usable
and clear.

In OpenSIPS 2.2, the accounting flags have now been replaced with two new
functions: do_accounting and drop_accounting. By using these functions,
you can all accounting scenarios in all the possible ways as before - you
can arm and disarm accounting, whenever you want, the same way you used
the flags before.

The do_accounting() has 3 parameters. The first parameter represents the
accounting type(db, evi, aaa, diam, log). The types have to be separated
by ‘|’. The second parameter stands for the accounting flags, what kind
of accounting you want to do, we called it flags(cdr, missed, failed).
The failed flag replaces the old failed_transaction_flag. If you set the
cdr flag, dialog module has to be loaded in order to be able to match the
Invite with the Bye. The third parameter stands for the table name and it
replaces the old table_name_avp, which now have been removed.

Drop_accounting() has the same parameters as do_accounting excluding
the table name. If you call the function without any arguments accounting
is stopped. If you use only the first argument, accounting for the given
type shall  be stopped. If both arguments are used and you stop all
accounting types(cdr, missed,failed) normal accounting will still be 
enabled.

For usage examples, see online documentation:
[0] http://www.opensips.org/html/docs/modules/2.2.x/acc#do_accouting
[1]http://www.opensips.org/html/docs/modules/2.2.x/acc#drop_accouting


Regards,

-- 
Ionut Ionita
OpenSIPS Developer

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/devel/attachments/20160325/27d7322c/attachment.htm>


More information about the Devel mailing list