<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    there is a function that 'parks' the request already:<br>
    <br>
<a class="moz-txt-link-freetext" href="http://kamailio.org/docs/modules/stable/modules/evapi.html#evapi.f.evapi_async_relay">http://kamailio.org/docs/modules/stable/modules/evapi.html#evapi.f.evapi_async_relay</a><br>
    <br>
    Be sure you keep somehow the values of $T(id_index) and $T(id_label)
    (either in htable, or send them to cgrates and they have to be
    returned back in reply) to resume the transaction with t_continue():<br>
    <br>
    <a class="moz-txt-link-freetext" href="http://kamailio.org/docs/modules/stable/modules/tmx.html#idp110920">http://kamailio.org/docs/modules/stable/modules/tmx.html#idp110920</a><br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <meta charset="utf-8">
    <div class="moz-cite-prefix">On 04/12/14 10:51, DanB wrote:<br>
    </div>
    <blockquote cite="mid:54802EA1.40105@gmail.com" type="cite">Hey
      Guys,
      <br>
      <br>
      We are in the process of implementing prepaid control using
      CGRateS engine and for that we will be using evapi module (thanks
      Daniel again for that).
      <br>
      <br>
      I was wondering if you can advice us whether the path we are
      taking is the correct one.
      <br>
      <br>
      On INVITE, we will initiate a MaxCallTimeout (sort of call auth)
      to CGRateS via evapi. Once request sent, we should "park" the
      request somehow (right now we are considering sleep in the process
      via usleep and recheck for the answer every 5-10 milliseconds).
      Answer should be shared via htable. Could you recommend us a
      better approach?
      <br>
      <br>
      On reply, the answer processed in event route
      evapi:message-received should set in htable a key of combination
      callid:fromtag with the maximum call duration or auth reject if
      not enough balance. This key should be processed by the sleeping
      process on wakeup.
      <br>
      <br>
      What do u think, is there a better way to approach the 2 ways
      communication?
      <br>
      <br>
      Thanks in advance for any kind of tip!
      <br>
      <br>
      DanB
      <br>
      <br>
      <br>
      _______________________________________________
      <br>
      SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
      list
      <br>
      <a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
      <br>
      <a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
      <br>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a></pre>
  </body>
</html>