<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#42392c" bgcolor="#ffffff">
    Hello Liviu,<br>
    I want file report on it. I have wireshark screenshot which shows
    exact issue. <br>
    Initial INVITE lookup is  forked to all registered destinations, but
    ACK no.<br>
    <br>
    On ACK in dialog applied snippet like this <br>
    <br>
    route[WITHINDLG] {<br>
                     if(has_totag()) {<br>
                         if(topology_hiding_match()) {<br>
    <br>
               if(is_method("ACK") && $DLG_did!=NULL &&
    $DLG_did!="<null") {<br>
                            xlog("[IN_DIALOG] [$rm] in dialog ACK with
    dialog ID => [$DLG_did]\n");<br>
                            setflag("FLAG_ACK_IN_DIALOG");<br>
                    }<br>
              route(RELAY);<br>
             exit;<br>
           } else {<br>
                   ...<br>
        }<br>
    }<br>
    <br>
    route[RELAY] {<br>
     <br>
                  } else if(isflagset("FLAG_ACK_IN_DIALOG")) {<br>
                            $ru = $tu;<br>
                            route(CONTACT_LOOKUP);<br>
                    }<br>
                    if(is_method("ACK") &&
    $avp(ua_orig_trns)==NULL) {<br>
                            #  TCP applied <br>
                            $var(src_socket) = "tcp" + ":" +
    $avp(req_ip) + ":" + "5084";<br>
                    }<br>
                    $socket_out = $var(src_socket);<br>
            xlog("[RELAY] [$rm] sending call ~> $ru over $socket_out
    for $ci\n");<br>
            if(!t_relay()) {<br>
                    send_reply(500, "Internal Error");<br>
                    exit;<br>
            }<br>
            exit;<br>
    <br>
    }<br>
    <br>
    volga629<br>
     <br>
    <br>
    <div class="moz-cite-prefix">On 3/24/21 1:14 PM, volga629 via Users
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:37f6d7d3-c5b4-c759-f4ed-f42d818860e0@skillsearch.ca">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      Hello Liviu,<br>
      May I send few screen shot of sip flow for this call ?<br>
      <br>
      volga629.<br>
      <br>
      <div class="moz-cite-prefix">On 3/24/21 8:57 AM, volga629 via
        Users wrote:<br>
      </div>
      <blockquote type="cite"
        cite="mid:079a32e4-a3f1-d4f5-d66f-94c28da12e7c@skillsearch.ca">
        <meta http-equiv="Content-Type" content="text/html;
          charset=UTF-8">
        Hello Liviu,<br>
        We use topology hiding edge proxy for end point.<br>
        Here are example <br>
        of contact header <br>
        <br>
        Contact: <a class="moz-txt-link-rfc2396E"
          href="sip:112%40domain.com@10.30.100.61:5060"
          moz-do-not-send="true"><sip:112%40domain.com@10.30.100.61:5060></a><br>
        <br>
        that call is inbound from PBX  to opensips and opensips forward
        to end point.<br>
        <br>
        <br>
                       
        if(is_method("INVITE|UPDATE|ACK|BYE|CANCEL|NOTIFY|INFO|OPTIONS")
        && $rU=~"%40") {<br>
                                xlog("[RELAY] [$rm] testing original
        [$ru]\n");<br>
                                route(CONTACT_LOOKUP);<br>
                        # We want exclude ACK rewrite toward Bria Push
        Server<br>
                        } else if(!isflagset("FLAG_BRIA_PUSH")) {<br>
                                xlog("[RELAY] [$rm] didn't match R-URI
        schema [$ru] correcting\n");<br>
                                $ru = "sip:" + $tU + "%40" + $td + "@" +
        $td;<br>
                                route(CONTACT_LOOKUP);<br>
                        }<br>
        <br>
        <br>
        volga629 <br>
        <br>
        <div class="moz-cite-prefix">On 3/24/21 5:04 AM, Liviu Chircu
          wrote:<br>
        </div>
        <blockquote type="cite"
          cite="mid:b7dee093-2c3a-10e1-5fe3-7b2042664aa5@opensips.org">
          <meta http-equiv="Content-Type" content="text/html;
            charset=UTF-8">
          <div class="moz-cite-prefix">On 24.03.2021 05:04, volga629 via
            Users wrote:<br>
          </div>
          <blockquote type="cite"
            cite="mid:913584ce-6b5d-6b7b-461f-15b4dedcf4f2@skillsearch.ca"><font
              size="+1"><font face="Cantarell">But then arrive the ACK
                and that where start the problems lookup  only find
                first contact and not second.</font></font></blockquote>
          <p><font face="monospace">Hi Volga,</font></p>
          <p><font face="monospace">So you're doing a lookup() on the
              ACK Request-URI?  Typically, the ACK R-URI will contain a
              contact header, which is not meant to be searchable.  I'm
              surprised you even get 1 result, I would expect such a
              lookup() to return -1.</font></p>
          <p><font face="monospace">Can you explain what you are trying
              to achieve?  Why not just route the ACK using
              loose_route(), just like all other mid-dialog requests,
              and be done with it?<br>
            </font></p>
          <pre class="moz-signature" cols="72">-- 
Liviu Chircu
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/liviuchircu" moz-do-not-send="true">www.twitter.com/liviuchircu</a> | <a class="moz-txt-link-abbreviated" href="http://www.opensips-solutions.com" moz-do-not-send="true">www.opensips-solutions.com</a></pre>
        </blockquote>
        <br>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <pre class="moz-quote-pre" wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" moz-do-not-send="true">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
      </blockquote>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>