<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Vitalii,<br>
      <br>
      I think this is what you are looking for
      <a class="moz-txt-link-freetext" href="https://github.com/OpenSIPS/opensips/issues/1671">https://github.com/OpenSIPS/opensips/issues/1671</a>, right ?<br>
      <br>
      Regards,<br>
    </tt>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
OpenSIPS Summit 2019
  <a class="moz-txt-link-freetext" href="https://www.opensips.org/events/Summit-2019Amsterdam/">https://www.opensips.org/events/Summit-2019Amsterdam/</a>
</pre>
    <div class="moz-cite-prefix">On 07/31/2019 12:33 PM, Vitalii
      Aleksandrov wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:6ad306db-839b-3a30-265f-a7e0f1042505@gmail.com">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <div class="moz-cite-prefix">When user is registered everything is
        OK. The problem appears when I send a call to another proxy or
        carrier. With UDP transport opensips correctly detects an
        outgoing interface and forwards a call. With TCP/TLS transport
        opensips is not that smart. Found the place in code which
        detects an outgoing socket and it just takes the first interface
        for TCP with a comment that it's too complicated to detect it
        properly.</div>
      <div class="moz-cite-prefix">It means if you have a proxy with
        multiple LAN/WAN interfaces you can't just forward calls to
        different trunks and have to manually manage
        force_send_socket().</div>
      <div class="moz-cite-prefix">And unfortunately this trick with $fs
        doesn't work for BIN and I just can't have cluster neighbors in
        different segments of my network. </div>
      <div class="moz-cite-prefix"><br>
      </div>
      <blockquote type="cite"
cite="mid:CAEVWGm9bWUg7pbHsVuwpwkz7pc7nZsv-yuf180RA5ufHx1=SYQ@mail.gmail.com">
        <meta http-equiv="content-type" content="text/html;
          charset=utf-8">
        <div dir="ltr">
          <div>mhomed =1 will make sure that the outgoing interface
            towards user A is the interface on which user A has
            registered. <br>
          </div>
          <div>Hence you need to be very very careful with mhomed=1. <br>
          </div>
          <div>I use force_send_socket when I a have a mixed environment
            (e.g users that register, connection to provider without
            registration, etc). <br>
          </div>
          <div><br>
          </div>
          <div>these are my 2 drops of wisdom :-)</div>
          <div><br>
          </div>
          <div>as for BIN, that I can't explain as I never used that
            type of interface.<br>
          </div>
          <br>
          <div>. </div>
          <div class="gmail_quote">
            <div dir="ltr" class="gmail_attr">Op di 30 jul. 2019 om
              17:16 schreef Vitalii Aleksandrov <<a
                href="mailto:vitalik.voip@gmail.com"
                moz-do-not-send="true">vitalik.voip@gmail.com</a>>:<br>
            </div>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
              0.8ex;border-left:1px solid
              rgb(204,204,204);padding-left:1ex">Hi,<br>
              <br>
              Have a problem with a multihomed proxy which doesn't
              select outgoing <br>
              interface correctly. Found similar topics where people
              discussed usage <br>
              of force_send_socket() when they want to force opensips to
              use some <br>
              interface.<br>
              <br>
              As far as I understood "mhomed=1" is the option which
              forces opensips to <br>
              select a proper outgoing interface in multihomed
              environment. This <br>
              options really works, but unfortunately only for UDP. When
              opensips has <br>
              multiple TCP / TLS / BIN interfaces, opensips just takes
              the first from <br>
              the list which is not always correct and fails to
              establish an outgoing <br>
              connection.<br>
              <br>
              Since I have a module that detects an outgoing interface I
              can use this <br>
              info with $fs to force correct socket for SIP.
              Unfortunately this trick <br>
              doesn't work for BIN and it's not possible to setup a
              multihomed <br>
              opensips with clustering neighbors in both internal and
              external networks.<br>
              <br>
              Is there any workaround for BIN?<br>
              <br>
              <br>
              _______________________________________________<br>
              Users mailing list<br>
              <a href="mailto:Users@lists.opensips.org" target="_blank"
                moz-do-not-send="true">Users@lists.opensips.org</a><br>
              <a
                href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
                rel="noreferrer" target="_blank" moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
            </blockquote>
          </div>
        </div>
        <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>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <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>