[sr-dev] Generating CDRs in JSON format

Daniel-Constantin Mierla miconda at gmail.com
Wed Sep 25 18:51:00 CEST 2019


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 at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training, Oct 21-23, 2019, Berlin, Germany -- https://asipto.com/u/kat

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20190925/ab89da92/attachment.html>


More information about the sr-dev mailing list