Hello,
I think the approach with engine is somehow better just in case someone wants another format (e.g., xml) or another backend (e.g., for radius) for cdrs, so they can add new modules for those specific needs.
Cheers, Daniel
On 25.09.19 17:11, Lucian Balaceanu wrote:
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
Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev