<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <font face="monospace">Hi Antonioss,<br>
      <br>
      See the "advertise" option - there is a global one, or a
      per-socket on:<br>
         
<a class="moz-txt-link-freetext" href="https://www.opensips.org/Documentation/Script-CoreParameters-3-5#advertised_address">https://www.opensips.org/Documentation/Script-CoreParameters-3-5#advertised_address</a><br>
         
      <a class="moz-txt-link-freetext" href="https://www.opensips.org/Documentation/Script-CoreParameters-3-5#socket">https://www.opensips.org/Documentation/Script-CoreParameters-3-5#socket</a> 
      (the AS option)<br>
      <br>
      Regards,<br>
    </font>
    <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>
  <a class="moz-txt-link-freetext" href="https://www.siphub.com">https://www.siphub.com</a></pre>
    <div class="moz-cite-prefix">On 02.04.2025 15:00, Antonios Psaras
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:260a01dba3c6$c7d9bf70$578d3e50$@microbase.gr">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta name="Generator"
        content="Microsoft Word 15 (filtered medium)">
      <style>@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}div.WordSection1
        {page:WordSection1;}</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal">Hello Johan<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Thank you for your prompt reply.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">My question is how do I force opensips not
          to use NAT IP which is defined on socket level?<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">As you mention rtpengine as well, what
          flags should I pass in order not to use the NAT IP which is
          also defined as configuration on “external” interface.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Thank you once more for your support.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"
style="mso-margin-top-alt:0cm;margin-right:1.0pt;margin-bottom:5.0pt;margin-left:1.0pt"><b><span
              style="color:#5F5F5F">Antonis Psaras</span></b><span
            style="color:#595959"><o:p></o:p></span></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><b>From:</b> Johan De Clercq
          <a class="moz-txt-link-rfc2396E" href="mailto:Johan@democon.be"><Johan@democon.be></a> <br>
          <b>Sent:</b> Τετάρτη, 2 Απριλίου 2025 13:23<br>
          <b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:apsaras@microbase.gr">apsaras@microbase.gr</a>; OpenSIPS users mailling list
          <a class="moz-txt-link-rfc2396E" href="mailto:users@lists.opensips.org"><users@lists.opensips.org></a><br>
          <b>Subject:</b> Re: [OpenSIPS-Users] mhomed OpenSIPs behind
          NAT - How to control NAT IP<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <div>
          <p class="MsoNormal">Antonias, <o:p></o:p></p>
          <div>
            <p class="MsoNormal">yes you can.  You need to if then else
              the stuff.  if $si==1.2.34 then use nat <o:p></o:p></p>
          </div>
          <div>
            <p class="MsoNormal">                                       
                                                                       
                else don't use nat.<o:p></o:p></p>
          </div>
          <div>
            <p class="MsoNormal"><o:p> </o:p></p>
          </div>
          <div>
            <p class="MsoNormal">Note, not only for opensips headers,
              but you will also need different flags for rtpengine. <o:p></o:p></p>
          </div>
          <div>
            <p class="MsoNormal"><o:p> </o:p></p>
          </div>
          <div>
            <p class="MsoNormal"><o:p> </o:p></p>
          </div>
        </div>
        <p class="MsoNormal"><o:p> </o:p></p>
        <div>
          <div>
            <p class="MsoNormal">Op wo 2 apr 2025 om 11:35 schreef
              Antonios Psaras <<a href="mailto:apsaras@microbase.gr"
                moz-do-not-send="true" class="moz-txt-link-freetext">apsaras@microbase.gr</a>>:<o:p></o:p></p>
          </div>
          <blockquote
style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
            <div>
              <div>
                <div>
                  <p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Dear all.<o:p></o:p></p>
                  <p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
                  <p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I have the
                    following setup.<o:p></o:p></p>
                  <p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
                  <p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">OpenSIPs
                    Server has two interfaces (DMZ / LAN). DMZ is behind
                    NAT. RTP Engines is also configured.<o:p></o:p></p>
                  <p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
                  <p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Everything
                    was fine until an end point with in DMZ asked for
                    SIP Trunking. The issue here is that if DMZ Client
                    tries to connect to OpenSIPs DMZ interface, OpenSIPs
                    will reply with NAT IP on SIP body as well as NAT IP
                    on SDP.<o:p></o:p></p>
                  <p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
                  <p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">My thought is
                    to create an other socket on DMZ interface with a
                    different port without NAT configuration and ask the
                    DMZ Client to connect on that interface. That will
                    required extra configuration per peer as I will need
                    to specify the preferred communication socket ie on
                    load balancing configuration. Moreover I should
                    configure a new RTPEngine Service without NAT
                    configuration and route those calls to that one. <o:p></o:p></p>
                  <p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
                  <p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Most probably
                    the above scenario will work but I am looking for
                    any alternatives to minimize configuration and
                    complexity. <o:p></o:p></p>
                  <p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
                  <p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Is there any
                    way to control the usage of NAT IP on OpenSIPs
                    script. Ie if source IP is with in DMZ do not send
                    NAT IP in SIP Headers.<o:p></o:p></p>
                  <p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
                  <p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Regards<o:p></o:p></p>
                  <p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
                </div>
              </div>
              <p class="MsoNormal">_______________________________________________<br>
                Users mailing list<br>
                <a href="mailto:Users@lists.opensips.org"
                  target="_blank" moz-do-not-send="true"
                  class="moz-txt-link-freetext">Users@lists.opensips.org</a><br>
                <a
href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
                  target="_blank" moz-do-not-send="true"
                  class="moz-txt-link-freetext">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><o:p></o:p></p>
            </div>
          </blockquote>
        </div>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></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>