<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>I think that what Olle suggested is a good solution.</p>
    <p>Otherwise, for tm onreply_route, using t_reply() can make tm
      generate its own reply and you can use it to overwrite the
      incoming reply, but I am not sure it works for 200ok -- for 300 or
      greater should be ok-ish all the time, unless you want to
      propagate all headers coming in the received reply.</p>
    <p>For core (stateless processing) reply_route, there is:</p>
    <p>  -
<a class="moz-txt-link-freetext" href="https://www.kamailio.org/docs/modules/stable/modules/sl.html#sl.f.sl_forward_reply">https://www.kamailio.org/docs/modules/stable/modules/sl.html#sl.f.sl_forward_reply</a></p>
    <p>But then be sure you also use drop not to send the incoming reply
      as well.</p>
    <p>Maybe for tm onreply_route, a variant of t_reply() without
      parameters can be added, and in such case the incoming reply is
      forward without any change in code and reason text. But could be a
      little bit tricky/risky, because the state of transaction is
      updated when the reply is sent out, setting it in terminated
      state, and the timer ticks till it is going to be destroyed in
      about 5 secs (with default params).</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <div class="moz-cite-prefix">On 28.06.22 16:06, Olle E. Johansson
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:969280AF-196E-4ED1-8CF3-70881B726981@edvina.net">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <br class="">
      <div><br class="">
        <blockquote type="cite" class="">
          <div class="">On 28 Jun 2022, at 15:54, Carsten Bock <<a
              href="mailto:carsten@ng-voice.com"
              class="moz-txt-link-freetext" moz-do-not-send="true">carsten@ng-voice.com</a>>
            wrote:</div>
          <br class="Apple-interchange-newline">
          <div class="">
            <div dir="ltr" class="">Hi,
              <div class=""><br class="">
              </div>
              <div class="">Question:<br class="">
                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 class="">
                <br class="">
                High-Level example:<br class="">
                <br class="">
                <i class="">route {<br class="">
                    t_on_reply("REPLY");<br class="">
                    t_relay();<br class="">
                  }<br class="">
                  <br class="">
                  onreply_route[REPLY] {<br class="">
                    // Forward the reply to the Caller<br class="">
                    t_relay(); // Does not work, as t_relay is only
                  allowed in request and failure-routes<br class="">
                    <br class="">
                    // Do other fancy stuff, e.g. a DB Update or
                  anything else<br class="">
                  }</i><br class="">
                <br class="gmail-Apple-interchange-newline">
                Any ideas?<br class="">
              </div>
            </div>
          </div>
        </blockquote>
        I don’t know how to do it that way, but I would add stuff to
        mqueue and process it asynchronously in the background.</div>
      <div><br class="">
      </div>
      <div>/O<br class="">
        <blockquote type="cite" class="">
          <div class="">
            <div dir="ltr" class="">
              <div class=""><br class="">
                Thanks,<br class="">
                Carsten<br class="">
                <br class="">
                <br class="">
              </div>
              <div class=""><br class="">
              </div>
              <div class=""><br class="">
              </div>
              <div class="">
                <div class="">
                  <div dir="ltr" class="gmail_signature"
                    data-smartmail="gmail_signature">
                    <div dir="ltr" class="">
                      <div class="">
                        <div dir="ltr" class="">
                          <div dir="ltr" class="">
                            <div dir="ltr" class="">--</div>
                            <div dir="ltr" class="">Carsten Bock I CTO
                              & Founder</div>
                            <div dir="ltr" class=""><br class="">
                              <div style="margin: 0cm 0cm 0.0001pt;"
                                class=""><span style="" class=""
                                  lang="EN-US">ng-voice GmbH</span><span
                                  style="color:rgb(0,112,192)" class=""
                                  lang="EN-US"></span></div>
                              <p
style="margin-right:0cm;margin-bottom:12pt;margin-left:0cm;background-image:initial;background-position:initial;background-repeat:initial"
                                class=""><span style="" class=""
                                  lang="EN-US">Trostbrücke 1 I 20457
                                  Hamburg I Germany<br class="">
                                  T +49 179 2021244 I <a
                                    href="http://www.ng-voice.com/"
                                    style="color:rgb(17,85,204)"
                                    target="_blank" class=""
                                    moz-do-not-send="true"><span
                                      style="" class="">www.ng-voice.com</span></a></span></p>
                              <div style="margin: 0cm 0cm 0.0001pt;"
                                class=""><span style="" class=""
                                  lang="EN-US">Registry Office at Local
                                  Court Hamburg, HRB 120189<br class="">
                                  Managing Directors: Dr. David
                                  Bachmann, Carsten Bock</span></div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            __________________________________________________________<br
              class="">
            Kamailio - Users Mailing List - Non Commercial Discussions<br
              class="">
             * <a href="mailto:sr-users@lists.kamailio.org"
              class="moz-txt-link-freetext" moz-do-not-send="true">sr-users@lists.kamailio.org</a><br
              class="">
            Important: keep the mailing list in the recipients, do not
            reply only to the sender!<br class="">
            Edit mailing list options or unsubscribe:<br class="">
             * <a
              href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users"
              class="moz-txt-link-freetext" moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br
              class="">
          </div>
        </blockquote>
      </div>
      <br class="">
      <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>
    <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 - Online: June 20-23, 2022
  * <a class="moz-txt-link-freetext" href="https://www.asipto.com/sw/kamailio-advanced-training-online/">https://www.asipto.com/sw/kamailio-advanced-training-online/</a></pre>
  </body>
</html>