<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <tt>Hi Asteriskman,<br>
      <br>
      As per doc [1], the module will provide the timestamp of the 200
      OK (call answering) . If doing "cdrs", you will also get the call
      duration, already computed.<br>
      <br>
      For anything extra, you should use extra accounting data [2].<br>
      <br>
      The accounting engine does not natively support noSQL backends,
      but you can use the accounting CDR event [3] in script [4] in
      order to perform a raw mongo query [5]. <br>
      <br>
      <br>
      [1] <a class="moz-txt-link-freetext" href="https://opensips.org/html/docs/modules/3.0.x/acc.html#overview">https://opensips.org/html/docs/modules/3.0.x/acc.html#overview</a><br>
      <br>
      [2]
      <a class="moz-txt-link-freetext" href="https://opensips.org/html/docs/modules/3.0.x/acc.html#ACC-extra-id">https://opensips.org/html/docs/modules/3.0.x/acc.html#ACC-extra-id</a><br>
      <br>
      [3]
      <a class="moz-txt-link-freetext" href="https://opensips.org/html/docs/modules/3.0.x/acc.html#event_E_ACC_EVENT">https://opensips.org/html/docs/modules/3.0.x/acc.html#event_E_ACC_EVENT</a><br>
      <br>
      [4]
      <a class="moz-txt-link-freetext" href="https://opensips.org/html/docs/modules/3.0.x/event_route.html#overview">https://opensips.org/html/docs/modules/3.0.x/event_route.html#overview</a><br>
      <br>
      [5]
      <a class="moz-txt-link-freetext" href="https://www.opensips.org/Documentation/Script-CoreFunctions-3-0#toc10">https://www.opensips.org/Documentation/Script-CoreFunctions-3-0#toc10</a><br>
      <br>
      Regards,<br>
    </tt>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>

</pre>
    <div class="moz-cite-prefix">On 5/16/20 11:20 PM, Asteriskman wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAL5=4DHUxqUZPF8O2YjfkFoBg1+Q_3TvW2rrVVGaCa28ijKPSw@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">Hello everyone,
        <div><br>
        </div>
        <div>I basically know Asterisk and SIP but new to OpenSIPS. I am
          working on a call flow where I need to receive a call from the
          provider and send it to an endpoint or a trunk and store Call
          start timestamp(INVITE), connect timestamp(200 OK) and end
          timestamp(BYE) in MongoDB. </div>
        <div>Now my questions are </div>
        <div>(1) What is the best way to get those values in opensips
          script? Use $Ts at different stages and store the values in
          dialogue? </div>
        <div>(2)What is the best way to perform insert into MongoDB? I
          see there is a cachedb_mongodb module and you can use
          cache_raw_query. </div>
        <div>(3)Will my above approaches work when I do parallel forking
          too? </div>
        <div><br>
        </div>
        <div>BR,</div>
        <div><br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>