<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hello,</p>
    <p>if the 200ok is consumed by tm, it will destroy the transaction
      very soon. I am not sure this is a good path to go.<br>
    </p>
    <p>If you need to stop the retransmission, a 100 trying should be
      sent instead of 200ok. Can you reconfigure the next hop to do
      that? Or is it out of your control?</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <div class="moz-cite-prefix">On 04.02.21 11:47, Denys Pozniak wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CA+x3Axo9-YWwW0EDGBN9b4_ASNRnbwtFv-SU-MR3KH6BndsgKA@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div>Hello!</div>
        <div><br>
        </div>
        <div>In the configuration below Kamailio Proxy creates a
          transaction for the SIP PUBLISH to get info from the HTTP
          server in async mode.</div>
        <div>But before creating a transaction, a synthetic 200 OK is
          sent, so that I need somehow to drop the real 200 OK from the
          upstream Presence Server.<br>
        </div>
        <div>If drop 200 OK in <b>reply_route</b>, tm module starts to
          retransmit.<br>
        </div>
        <div>Those it is necessary that the 200 OK be consumed by the tm
          module, but does not go further.<br>
        </div>
        <div><br>
        </div>
        <div><i>if ( !is_method("PUBLISH") ) {<br>
          </i></div>
        <div><i>        sl_send_reply("200", "Ok");<br>
                    t_newtran();<br>
          </i></div>
        <div><i>        $http_req(suspend) = 1;<br>
                     http_async_query("$var(url)", "CALLBACK");<br>
          </i></div>
        <div><i>}</i></div>
        <div><i><br>
          </i></div>
        <div><i>route[CALLBACK] {<br>
          </i></div>
        <div><i>        <some header manipulation></i></div>
        <i>        t_on_reply("PUBLISH_REPLY");<br>
                  route(RELAY);<br>
                  exit;<br>
        </i>
        <div><i>}</i></div>
        <div><i><br>
          </i></div>
        <div><i>onreply_route[PUBLISH_REPLY] {<br>
                    if ( t_check_status("200") ) {<br>
                            <b>drop; # Does not work!!!</b><br>
                    }<br>
            }<br>
          </i></div>
        <div><br>
        </div>
        <div>Any advice is appreciated</div>
        <div><br>
        </div>
        -- <br>
        <div dir="ltr" class="gmail_signature"
          data-smartmail="gmail_signature">
          <div dir="ltr"><br>
            <div>
              <div>BR,</div>
              <div>Denys Pozniak<br>
              </div>
              <div><br>
              </div>
              <div><br>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-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>
    <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>
Funding: <a class="moz-txt-link-freetext" href="https://www.paypal.me/dcmierla">https://www.paypal.me/dcmierla</a></pre>
  </body>
</html>