[sr-dev] Generating CDRs in JSON format

Lucian Balaceanu lucian.balaceanu at 1and1.ro
Wed Sep 25 17:11:59 CEST 2019


Hello guys,

I am trying to get the CDRs generated in JSON format just as acc_json module does for transactions accounting, but for now I didn't find a way to do this directly from Kamailio. Please correct me if I am wrong.

As far as I understood from the code, acc_json and other modules extending the acc itself are based on the acc_engine structure that contains different function pointers. acc module, by means of acc_run_engines() then calls the appropriate functions in various places.

The programming solutions are at least:

  *   extend inside the acc module itself the (log_)write_cdr() function to offer on demand JSON output -- simple to implement, breaks the adaptability given until now by the acc engines

  *   create a sort of an acc_engine for CDRs as well and have this called from an external module (acc_json module)

Is there an implementation preference you see in order to attain this CDR as JSON? Do you have any suggestions?

Thank you,
Lucian Balaceanu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20190925/1aa64b8c/attachment.html>


More information about the sr-dev mailing list