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
Hi Time, Sven,
thanks for this addition!
For now just wanted to say that such announcement is suitable for sr-users mailing list as well, to let community users know what is going to be in the next major release.
Cheers, Daniel
On 8/3/11 5:59 PM, Timo Reimann wrote:
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
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev