<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <p><br>
    </p>
    <div class="moz-cite-prefix">Le 28/06/2022 à 15:54, Carsten Bock a
      écrit :<br>
    </div>
    <blockquote type="cite" cite="mid:CAOCjumE256pXHT5kb6iLoGZ4w-fN6FPRLV44bALcwbjLgDTKcw@mail.gmail.com">
      
      <div dir="ltr">Hi,
        <div><br>
        </div>
        <div>Question:<br>
          Is there a way to forward a reply from the reply route and do
          other stuff afterward? We are currently doing operations on a
          183 reply and it would be useful if we could forward the reply
          before continuing to process other stuff.<br>
          <br>
          High-Level example:<br>
          <br>
          <i>route {<br>
              t_on_reply("REPLY");<br>
              t_relay();<br>
            }<br>
            <br>
            onreply_route[REPLY] {<br>
              // Forward the reply to the Caller<br>
              t_relay(); // Does not work, as t_relay is only allowed in
            request and failure-routes<br>
              <br>
              // Do other fancy stuff, e.g. a DB Update or anything else<br>
            }</i><br>
          <br class="gmail-Apple-interchange-newline">
          Any ideas?<br>
          <br>
        </div>
      </div>
    </blockquote>
    <p>I would use <b>http_async_query()</b> in the onreply route,
      delegate some of the DB update an other stuff to an HTTP server.
      And if there is a need to further interact with K, there is a way
      to specify an HTTP reply route that will be called asynchronously.</p>
    <p>See : <a href="https://www.kamailio.org/docs/modules/stable/modules/http_async_client.html">HTTP_ASYNC_CLIENT
        Module (kamailio.org)</a></p>
    <blockquote type="cite" cite="mid:CAOCjumE256pXHT5kb6iLoGZ4w-fN6FPRLV44bALcwbjLgDTKcw@mail.gmail.com">
      <div dir="ltr">
        <div>Thanks,<br>
          Carsten<br>
          <br>
          <br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>
          <div>
            <div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">
              <div dir="ltr">
                <div>
                  <div dir="ltr">
                    <div dir="ltr">
                      <div dir="ltr">--</div>
                      <div dir="ltr">Carsten Bock I CTO & Founder</div>
                      <div dir="ltr"><br>
                        <p style="margin:0cm 0cm
0.0001pt;background-image:initial;background-position:initial;background-repeat:initial"><span style="color:black" lang="EN-US">ng-voice
                            GmbH</span><span style="color:rgb(0,112,192)" lang="EN-US"></span></p>
                        <p style="margin-right:0cm;margin-bottom:12pt;margin-left:0cm;background-image:initial;background-position:initial;background-repeat:initial"><span style="color:black" lang="EN-US">Trostbrücke
                            1 I 20457 Hamburg I Germany<br>
                            T +49 179 2021244 I <a href="http://www.ng-voice.com/" style="color:rgb(17,85,204)" target="_blank" moz-do-not-send="true"><span style="color:black">www.ng-voice.com</span></a></span></p>
                        <p style="margin:0cm 0cm
0.0001pt;background-image:initial;background-position:initial;background-repeat:initial"><span style="color:black" lang="EN-US">Registry
                            Office at Local Court Hamburg, HRB 120189<br>
                            Managing Directors: Dr. David Bachmann,
                            Carsten Bock</span></p>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
  * <a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
  * <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>
  </body>
</html>