<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <font face="Calibri Light">hello John<br>
      <br>
      i have found what was causing the issue. is was topology hiding
      when ACK was received by opensips. <br>
      <br>
      <br>
      thank you for all your help and time :)<br>
      <br>
      br<br>
      miha<br>
    </font><br>
    <div class="moz-cite-prefix">John Quick je 5/18/2021 ob 11:15
      AM napisal:<br>
    </div>
    <blockquote type="cite"
      cite="mid:001a01d74bc6$50fface0$f2ff06a0$@smartvox.co.uk">
      <pre class="moz-quote-pre" wrap="">Miha

Altering the text in the Record-Route headers with subst() function is not
the correct approach.
I believe the problem is that you are not inserting the correct RR headers
in the first place.
If you get the RR headers right then it will also fix the problem with ACK
using the wrong protocol.
This pseudo-code snippet illustrates what is required when adding RR headers
to the initial INVITE request:

if (INVITE-from-Teams-Proxy-to-us) {
    record_route_preset("IP:port", "SBC_FQDN:5061;transport=tls");
    add_rr_param(";r2=on");
} else if (INVITE-from-us-to-Teams-Proxy) {
    record_route_preset( "SBC_FQDN:5061;transport=tls", "IP:port");
    add_rr_param(";r2=on");
} else
    record_route();

Don't insert any RR headers when handling loose-routed requests.

I tried to explain all this stuff in a number of articles. Here are the
links:
<a class="moz-txt-link-freetext" href="https://kb.smartvox.co.uk/opensips/opensips-as-ms-teams-sbc/">https://kb.smartvox.co.uk/opensips/opensips-as-ms-teams-sbc/</a>
<a class="moz-txt-link-freetext" href="https://kb.smartvox.co.uk/opensips/nat-contact-and-via-fixing-in-sip-part-4/">https://kb.smartvox.co.uk/opensips/nat-contact-and-via-fixing-in-sip-part-4/</a>
<a class="moz-txt-link-freetext" href="https://kb.smartvox.co.uk/opensips/contact-and-record-route-headers-explaine">https://kb.smartvox.co.uk/opensips/contact-and-record-route-headers-explaine</a>
d/

John Quick
Smartvox Limited

</pre>
    </blockquote>
    <br>
  </body>
</html>