<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hello,</p>
    <p>no actions are executed in the same route block after the line
      with async_task_route("NICE_TO_HAVE") -- see the readme of the
      async module at the documentation for this function.</p>
    <p>If you want to continue executing the actions after pushing a
      task for another process, you can try to combine mqueue+rtimer,
      but in your example won't work, because the rtimer won't have the
      current sip message in order to get the dialog for it.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 19.03.18 16:41, George
      Diamantopoulos wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAPcKEYP7+vTE-fQMgSbqc3CzSxY0e9mKX9xNeOv90sAVrtQ4yQ@mail.gmail.com">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div>
                <div>
                  <div>
                    <div>
                      <div>Hello all,<br>
                        <br>
                      </div>
                      I've been exploring the async module a little, and
                      async_task_route() more specifically. I have
                      async_workers set, and the async module loaded.<br>
                    </div>
                    <br>
                  </div>
                  However, whenever this async function is involved in
                  SIP processing, kamailio returns a 500 error to the
                  UAC. I was hoping that someone could confirm that this
                  function is suitable for my needs, I'm not sure I
                  understand the docs very well on this one.<br>
                  <br>
                </div>
                So the plan is to have some of the processing of the
                transaction performed asynchronously, as it is not
                required for routing etc. Here's an example of what I'm
                trying to achieve, it's not really critical if
                NICE_TO_HAVE route functions fail etc, I just need
                request_route processing to continue normally without
                waiting for async_task_route("NICE_TO_HAVE") to finish
                whatever it's going to be doing:<br>
                <br>
              </div>
              request_route() {<br>
              <br>
              <div style="margin-left:40px">...<br>
                <br>
                SIP_PROCESSING_A<br>
                <br>
                ...<br>
                <br>
                async_task_route("NICE_TO_HAVE")<br>
                <br>
                ...<br>
                <br>
                SIP_PROCESSING_B<br>
                <br>
                t_relay();<br>
              </div>
            </div>
          </div>
        </div>
        <br>
        }<br>
        <div>
          <div><br>
          </div>
          <div>route(NICE_TO_HAVE) {<br>
            <br>
            <div style="margin-left:40px">dlg_var(sth) =
              something_derived_from_global_vars();<br>
              <br>
            </div>
            }<br>
            <br>
          </div>
          <div>Is this possible, or am I completely out of scope here?
            Thanks!<br>
            <br>
          </div>
          <div>BR,<br>
          </div>
          <div>George<br>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<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 - April 16-18, 2018, Berlin - <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
Kamailio World Conference - May 14-16, 2018 - <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
  </body>
</html>