<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <tt>Hi, Ziv!<br>
      <br>
      It would be nice if you could tell us your opensips version.<br>
      <br>
      Did you try to add two interfaces to the rtpengine daemon like:<br>
      --interface=priv/10.108.132.110 --interface=pub/10.108.132.110!PUBLIC_IP<br>
      <br>
      And when using the rtpengine_* functions, call them using
      "in-iface=priv out-iface=pub", or the other way around.<br>
      <br>
      Best regards,<br>
    </tt>
    <pre class="moz-signature" cols="72">Răzvan Crainea
OpenSIPS Developer
<a class="moz-txt-link-abbreviated" href="http://www.opensips-solutions.com">www.opensips-solutions.com</a></pre>
    <div class="moz-cite-prefix">On 12/14/2017 01:40 PM, Ziv Gabel
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:00d501d374d0$55b0dc30$01129490$@communitake.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta name="Generator" content="Microsoft Word 14 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@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;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
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;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
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">Hi,<o:p></o:p></p>
        <p class="MsoNormal">I have an rtpengine instance with one
          interface behind nat<o:p></o:p></p>
        <p class="MsoNormal">I’m trying to achieve the following<o:p></o:p></p>
        <p class="MsoNormal">If the INVITE/200 message arrives from an
          internal ip (10.x.x.x) change the media address to the
          internal ip<o:p></o:p></p>
        <p class="MsoNormal">If the INVITE/200 message arrives from
          external ip (any other) change the media address to the public
          ip of the server.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">I’m using rtpengine_offer and
           rtpengine_answer<o:p></o:p></p>
        <p class="MsoNormal">But it looks like no matter what I put in
          the media-address flag, it will always use the internal ip
          address.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">What am I doing wrong ?<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Rtp engine runs with
          --interface=10.108.132.110 flag, and this ip is always on the
          c= parameter in sdp<o:p></o:p></p>
        <p class="MsoNormal">I tried to use replace-session-connection
          and replace-origin flags but still not working.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white"><b><span
style="font-size:10.0pt;font-family:"Verdana","sans-serif";color:#1D1B11">Ziv
              Gabel </span></b><span
style="font-size:10.0pt;font-family:"Verdana","sans-serif";color:#1D1B11">l<b> </b></span><span
style="font-size:12.0pt;font-family:"Verdana","sans-serif";color:#4A442A">Professional</span><span
style="font-size:10.0pt;font-family:"Verdana","sans-serif";color:#4A442A"> services</span><b><span
style="font-size:10.0pt;font-family:"Verdana","sans-serif";color:#1D1B11"> </span></b><span
style="font-size:10.0pt;font-family:"Verdana","sans-serif";color:#1D1B11">l<b> </b></span><span
style="font-size:10.0pt;font-family:"Verdana","sans-serif";color:#4A442A">CommuniTake
            Technologies Ltd.</span><span
style="font-size:12.0pt;font-family:"Arial","sans-serif";color:#222222"><o:p></o:p></span></p>
        <p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white"><b><span
style="font-size:8.0pt;font-family:"Verdana","sans-serif";color:#76923C"> </span></b><span
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222"><o:p></o:p></span></p>
        <p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white"><b><span
style="font-size:8.0pt;font-family:"Verdana","sans-serif";color:#76923C">M</span></b><span
style="font-size:8.0pt;font-family:"Verdana","sans-serif";color:#4A442A">: +972535265553 </span><span
style="font-size:8.0pt;font-family:"Verdana","sans-serif";color:#1F497D">l</span><b><span
style="font-size:8.0pt;font-family:"Verdana","sans-serif";color:#8DB3E2"> </span></b><b><span
style="font-size:8.0pt;font-family:"Verdana","sans-serif";color:#76923C">Skype</span></b><span
style="font-size:8.0pt;font-family:"Verdana","sans-serif";color:#4A442A">:
            ziv_gabel </span><span
style="font-size:8.0pt;font-family:"Verdana","sans-serif";color:#1F497D">l</span><span
style="font-size:8.0pt;font-family:"Verdana","sans-serif";color:#4A442A"> </span><b><span
style="font-size:8.0pt;font-family:"Verdana","sans-serif";color:#76923C">E</span></b><span
style="font-size:8.0pt;font-family:"Verdana","sans-serif";color:#1F497D">: </span><span
style="font-size:8.0pt;font-family:"Verdana","sans-serif";color:#4A442A"><a
              href="mailto:ziv@communitake.com" target="_blank"
              moz-do-not-send="true"><span style="color:blue">ziv@communitake.com</span></a></span><span
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222"><o:p></o:p></span></p>
        <p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white"><b><span
style="font-size:8.0pt;font-family:"Verdana","sans-serif";color:#76923C">T</span></b><span
style="font-size:8.0pt;font-family:"Verdana","sans-serif";color:#4A442A">: +972.4.696.8908 </span><span
style="font-size:8.0pt;font-family:"Verdana","sans-serif";color:#1F497D">l</span><span
style="font-size:8.0pt;font-family:"Verdana","sans-serif";color:gray"> </span><b><span
style="font-size:8.0pt;font-family:"Verdana","sans-serif";color:#76923C">F</span></b><span
style="font-size:8.0pt;font-family:"Verdana","sans-serif";color:#4A442A">: +972.4.959.1654 </span><span
style="font-size:8.0pt;font-family:"Verdana","sans-serif";color:#1F497D">l</span><span
style="font-size:8.0pt;font-family:"Verdana","sans-serif";color:#4A442A"> </span><span
style="font-size:8.0pt;font-family:"Verdana","sans-serif";color:blue"><a
              href="http://www.communitake.com/" target="_blank"
              moz-do-not-send="true"><span style="color:#1155CC">www.communitake.com</span></a></span><span
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222"><o:p></o:p></span></p>
        <p class="MsoNormal"><o:p> </o:p></p>
      </div>
      <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>