<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hello,<br>
      <br>
      There is also another much simpler solution. Stefano correctly
      point out that new need two "interfaces" as you want to interact
      with 2 different networks (private and public) in different ways
      (you should do the advertising only for the traffic going to
      public interface).<br>
      <br>
      Here is what I suggest:<br>
      &nbsp;&nbsp;&nbsp; - keep the current private IP you now on OpenSIPS -&gt; IPa<br>
      &nbsp;&nbsp;&nbsp; - add (on the same interface as IPa) a second private IP -&gt;
      IPb<br>
      &nbsp;&nbsp;&nbsp; - for IPb set advertising the public IP<br>
      &nbsp;&nbsp;&nbsp; - for new calls, from MS to GW, switch from IPa to IPb (use
      the force_send_socket() function)<br>
      &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
      <a class="moz-txt-link-freetext" href="http://www.opensips.org/Documentation/Script-CoreFunctions-1-10#toc15">http://www.opensips.org/Documentation/Script-CoreFunctions-1-10#toc15</a>)<br>
      &nbsp;&nbsp;&nbsp; - for new calls, from GW to MS, switch from IPb to IPa <br>
      <br>
      Regards,<br>
      <br>
      <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
      On 06.02.2014 09:38, Stefano Pisani wrote:<br>
    </div>
    <blockquote cite="mid:52F33BEA.7080101@omnianet.it" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      There are a problem in the network configuration.<br>
      Opensips has only one network card, in this way it cound only use
      one IP but it actually has two IPs (one external and one interna).<br>
      You need to enable a second network card with a public IP (in the
      DMZ)&nbsp; and use mhomed=1 in configuration to change IP in SIP header
      according to interface used.<br>
      <br>
      Or you can use (if available and working properly) the SIP ALG in
      you firewall instead of advertising_address.<br>
      <br>
      The third option is to create DNAT (with different port) also for
      media server so all server are on public IP.<br>
      <br>
      You can't mix public and private IP as you done using a single
      network card.<br>
      <br>
      s<br>
      <br>
      <div class="moz-cite-prefix">Il 06/02/2014 03.47, Tony Ward ha
        scritto:<br>
      </div>
      <blockquote
        cite="mid:CB5D974C87E91B41A54A2011011E5817016A1AF1@aissbs1.ais-rx.local"
        type="cite">
        <meta http-equiv="Content-Type" content="text/html;
          charset=ISO-8859-1">
        <meta name="Generator" content="Microsoft Word 14 (filtered
          medium)">
        <style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;}
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;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
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"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
          <p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
          <div>
            <div style="border:none;border-top:solid #B5C4DF
              1.0pt;padding:3.0pt 0in 0in 0in">
              <p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:windowtext">From:</span></b><span
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:windowtext">
                  Tony Ward <br>
                  <b>Sent:</b> Wednesday, February 05, 2014 3:43 PM<br>
                  <b>To:</b> '<a moz-do-not-send="true"
                    class="moz-txt-link-abbreviated"
                    href="mailto:stefano.pisani@omnianet.it">stefano.pisani@omnianet.it</a>';
                  'OpenSIPS users mailling list'<br>
                  <b>Subject:</b> RE: [OpenSIPS-Users] media server
                  behind nat<o:p></o:p></span></p>
            </div>
          </div>
          <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D">Sorry for the
              lack of clarity.&nbsp; Network drawing is at <a
                moz-do-not-send="true"
                href="http://www.ais-rx.com/pub/network.jpg">http://www.ais-rx.com/pub/network.jpg</a></span><span
              style="color:#1F497D"><o:p></o:p></span></p>
          <p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
          <p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
          <p class="MsoNormal"><span style="color:#1F497D">Thanks,</span><span
              style="color:#1F497D"><o:p></o:p></span></p>
          <p class="MsoNormal"><span style="color:#1F497D">Tony<o:p></o:p></span></p>
          <p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
        </div>
      </blockquote>
      <br>
      <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>