[SR-Users] new functionality: CDR-based accounting

Timo Reimann timo.reimann at 1und1.de
Thu Aug 4 08:08:22 CEST 2011


Hi all,

as announced quite a while ago, I finally checked in code that allows to
produce CDRs (Call Data Records) directly from SIP-Router and generate
logs accordingly.

The main code portion resides in modules_k/acc and provides a switch to
enable basic CDR generation including start time, end time, and
duration. Analogous to the existing logging approach, you may define an
extra parameter covering to-be-included dialog pseudo-variables that
must be assigned in the configuration script. The new code will take
care of transforming the basic and custom CDR fields into CDR logs at
the end of a dialog.

Speaking of dialogs: The implementation relies heavily on the dialog
module. It takes advantage of dialog variables introduces by Carsten
Bock and adds a few more features. Most notably, we had to change the
dialog callback signature to provide both request and response messages.
Having only one of them proved to be insufficient in certain cases; for
instance, a locally generated 408 returned a FAKED_REPLY, thus rendering
it impossible to access dialog variables through the PV framework. Other
modules using dialog callbacks have been updated along the commit,
third-party modules outside the repository will need to do so too (and
think about whether using the request or response is the Right Thing to do).

Due to the changes brought to the dialog module, I pushed the new acc
and dialog code into a separate branch called treimann/acc-cdr. Feel
free to give it a try by consulting the updated documentation and
suggesting (or, if it's good enough, implementing :) ) improvements. A
Kamailio 1.5 backport of the code has been in usage for quite some time
with us, so generally there shouldn't be any major logical flaws.
SIP-Router certainly needs more testing, however, so I'd be glad for any
feedback. My plan is to merge the code into master branch prior to the
3.2 feature freeze, unless significant objections arise.

Finally, big-time credits go to my co-worker Sven Knoblich who is the
main contributor of the code. He's been working on this stuff for the
past few months and dreams in CDRs by now.


Cheers,

--Timo

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20110804/e00eeada/attachment.htm>


More information about the sr-users mailing list