<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hello,</p>
    <p><br>
    </p>
    <p>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.</p>
    <p><br>
    </p>
    <p>Cheers,<br>
      Daniel</p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 25.09.19 17:11, Lucian Balaceanu
      wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:1569424319771.29947@1and1.ro">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <style type="text/css" style="display:none"><!--P{margin-top:0;margin-bottom:0;} --></style>
      <p>Hello guys,<br>
        <br>
        I am trying to get the CDRs generated in JSON format just as <em>acc_json
          module</em> 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.<br>
        <br>
        As far as I understood from the code, acc_json and other modules
        extending the acc itself are based on the
        <em>acc_engine structure</em> that contains different function
        pointers. acc module, by means of
        <em>acc_run_engines()</em> then calls the appropriate functions
        in various places.<br>
        <br>
        The programming solutions are at least:<br>
      </p>
      <ul>
        <li>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</li>
      </ul>
      <ul>
        <li>create a sort of an acc_engine for CDRs as well and have
          this called from an external module (acc_json module)</li>
      </ul>
      <p><br>
        Is there an implementation preference you see in order to attain
        this CDR as JSON? Do you have any suggestions?<br>
        <br>
        Thank you,<br>
        Lucian Balaceanu<br>
      </p>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Kamailio (SER) - Development Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-dev@lists.kamailio.org">sr-dev@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training, Oct 21-23, 2019, Berlin, Germany -- <a class="moz-txt-link-freetext" href="https://asipto.com/u/kat">https://asipto.com/u/kat</a></pre>
  </body>
</html>