<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body><div>Hi Hamid,</div><div><br></div><div>So OpenSIPS listens only on one interface, does a global advertise, but one of the RR headers is inserted with the private listening IP. Could you try to move the advertise param per interface ( instead of global) ? See the syntax of the "listen" param.</div><div><br></div><div>Regards Bogdan</div><div><br></div><div><br></div><div><br></div><div id="composer_signature"><div style="font-size:85%;color:#575757">Sent from my Samsung Galaxy smartphone.</div></div><div style="font-size:100%;color:#000000"><!-- originalMessage --><div>-------- Original message --------</div><div>From: Hamid Hashmi &lt;hamid2kviii@hotmail.com&gt; </div><div>Date: 2/24/2016  06:13  (GMT+01:00) </div><div>To: Bogdan-Andrei Iancu &lt;bogdan@opensips.org&gt;, OpenSIPS users mailling list &lt;users@lists.opensips.org&gt; </div><div>Subject: RE: [OpenSIPS-Users] Protocol conversion - Double record route issue‏ </div><div><br></div></div><div dir="ltr"><font color="#2672EC">Hi Bogdan</font><div><font color="#2672EC"><br></font></div><div><font color="#2672EC">Yes, your guess is right.&nbsp;</font></div><div><font color="#2672EC"><br></font></div><div><font color="#2672EC">Opensips is listening on Private IP with advertise IP, which is an elastic IP. While A and B are on public internet.</font></div><div><br><b><font color="#5133ab" face="Times New Roman" size="3"><i>Hamid R. Hashmi</i></font></b><div><font size="2">Software Engineer - VoIP</font></div><div><font color="#008a17" size="2" style="font-size:10pt;">Vopium A/S</font></div><br><br><div><hr id="stopSpelling">Subject: Re: [OpenSIPS-Users] Protocol conversion - Double record route issue‏<br>To: users@lists.opensips.org; hamid2kviii@hotmail.com<br>From: bogdan@opensips.org<br>Date: Wed, 24 Feb 2016 00:31:56 +0200<br><br>
  
    
  
  
    <tt>Hi Hamid,<br>
      <br>
      I guess both A and B are on the public internet communicating with
      your opensips via the elastic IP, right ? and your opensips is
      listening only on the private IP in EC2 ? do you use advertise ?<br>
      <br>
      Regards,<br>
    </tt>
    <pre class="ecxmoz-signature">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="ecxmoz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
    <div class="ecxmoz-cite-prefix">On 23.02.2016 07:33, Hamid Hashmi
      wrote:<br>
    </div>
    <blockquote cite="mid:BLU182-W936A0E451F799D9C233EDCE0A40@phx.gbl">
      <style><!--
.ExternalClass .ecxhmmessage P {
padding:0px;
}

.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:Calibri;
}

--></style>
      <div dir="ltr">
        <div style="color:rgb(38, 114, 236);">I am using opensips as an
          edge proxy on Amazon EC2 (server behind NAT) and it works fine
          if It only works on UDP or TCP. but if I need to translate
          from TCP -&gt; UDP, ACK does not reach proxy server due to
          private IP in record-route.&nbsp;</div>
        <div style="color:rgb(38, 114, 236);"><br>
        </div>
        <div style="color:rgb(38, 114, 236);">EdgeProxy -&gt; B#&nbsp;</div>
        <div style="color:rgb(38, 114, 236);"><br>
        </div>
        <div style="color:rgb(38, 114, 236);">
          <pre style="box-sizing:border-box;overflow:auto;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:11.9px;font-stretch:normal;line-height:1.45;padding:16px;border-radius:3px;word-wrap:normal;color:rgb(51, 51, 51);background-color:rgb(247, 247, 247);"><code style="box-sizing:border-box;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:11.9px;padding:0px;border-radius:3px;word-break:normal;border:0px;display:inline;max-width:initial;overflow:initial;line-height:inherit;word-wrap:normal;background:transparent;">INVITE <a class="ecxmoz-txt-link-abbreviated" href="mailto:sip:923003000200@182.185.200.42:46488;transport=tcp;line=fd2af176e9c88c3">sip:923003000200@182.185.200.42:46488;transport=tcp;line=fd2af176e9c88c3</a> SIP/2.0
Record-Route: &lt;sip:52.76.50.195:6080;transport=tcp;r2=on;lr;ftag=ae2b3a03&gt;
Record-Route: &lt;sip:192.168.26.180:6080;r2=on;lr;ftag=ae2b3a03&gt;
Record-Route: <a class="ecxmoz-txt-link-rfc2396E" href="mailto:sip:+923003000200@192.168.26.181:8000;lr;ftag=ae2b3a03;did=077.9923f675;nat=yes">&lt;sip:+923003000200@192.168.26.181:8000;lr;ftag=ae2b3a03;did=077.9923f675;nat=yes&gt;</a>
<b>Record-Route: &lt;sip:52.76.50.195:6080;r2=on;lr;ftag=ae2b3a03;EdgeProxy=true&gt;
Record-Route: &lt;sip:192.168.26.180:6080;transport=tcp;r2=on;lr;ftag=ae2b3a03;EdgeProxy=true&gt;</b>
Via: SIP/2.0/TCP 52.76.50.195:6080;branch=z9hG4bK4a7b.55d0e535.0
Via: SIP/2.0/UDP 192.168.26.181:8000;branch=z9hG4bK4a7b.0b4f27b4.0
Via: SIP/2.0/UDP 52.76.50.195:6080;rport=6080;received=192.168.26.180;branch=z9hG4bK4a7b.45d0e535.0;i=2
Via: SIP/2.0/TCP 103.255.5.24:47590;received=103.255.5.24;branch=z9hG4bK-524287-1---74668ff8d4027b7c;rport=47590
Max-Forwards: 67
Contact: <a class="ecxmoz-txt-link-rfc2396E" href="mailto:sip:923007777777@103.255.5.24:47590;transport=TCP">&lt;sip:923007777777@103.255.5.24:47590;transport=TCP&gt;</a>
To: <a class="ecxmoz-txt-link-rfc2396E" href="mailto:sip:+923003000200@52.76.50.195:6080;transport=TCP">&lt;sip:+923003000200@52.76.50.195:6080;transport=TCP&gt;</a>
From: "+923007777777"<a class="ecxmoz-txt-link-rfc2396E" href="mailto:sip:+923007777777@52.76.50.195">&lt;sip:+923007777777@52.76.50.195&gt;</a>;tag=ae2b3a03</code></pre>
        </div>
        <div style="color:rgb(38, 114, 236);"><br>
        </div>
        <div style="color:rgb(38, 114, 236);">EdgeProxy -&gt; A#</div>
        <div style="color:rgb(38, 114, 236);"><br>
        </div>
        <div style="color:rgb(38, 114, 236);">
          <pre style="box-sizing:border-box;overflow:auto;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:11.9px;font-stretch:normal;line-height:1.45;padding:16px;border-radius:3px;word-wrap:normal;color:rgb(51, 51, 51);background-color:rgb(247, 247, 247);"><code style="box-sizing:border-box;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:11.9px;padding:0px;border-radius:3px;word-break:normal;border:0px;display:inline;max-width:initial;overflow:initial;line-height:inherit;word-wrap:normal;background:transparent;">SIP/2.0 200 OK
Via: SIP/2.0/TCP 192.168.10.13:6060;received=182.185.200.42;rport=47103;branch=z9hG4bK801489929
Record-Route: &lt;sip:52.76.50.195:6080;transport=tcp;r2=on;lr;ftag=1252633513&gt;
Record-Route: &lt;sip:192.168.26.180:6080;r2=on;lr;ftag=1252633513&gt;
Record-Route: <a class="ecxmoz-txt-link-rfc2396E" href="mailto:sip:+923007777777@192.168.26.181:8000;lr;ftag=1252633513;did=755.1859af64;nat=yes">&lt;sip:+923007777777@192.168.26.181:8000;lr;ftag=1252633513;did=755.1859af64;nat=yes&gt;</a>
<b>Record-Route: &lt;sip:52.76.50.195:6080;r2=on;lr;ftag=1252633513;EdgeProxy=true&gt;
Record-Route: &lt;sip:192.168.26.180:6080;transport=tcp;r2=on;lr;ftag=1252633513;EdgeProxy=true&gt;</b>
Contact: <a class="ecxmoz-txt-link-rfc2396E" href="mailto:sip:923007777777@103.255.5.24:48469;transport=TCP">&lt;sip:923007777777@103.255.5.24:48469;transport=TCP&gt;</a>
To: <a class="ecxmoz-txt-link-rfc2396E" href="mailto:sip:+923007777777@52.76.50.195:6080">&lt;sip:+923007777777@52.76.50.195:6080&gt;</a>;tag=12b65b6d
From: <a class="ecxmoz-txt-link-rfc2396E" href="mailto:sip:923003000200@52.76.50.195:6080">&lt;sip:923003000200@52.76.50.195:6080&gt;</a>;tag=1252633513</code></pre>
        </div>
        <div style="color:rgb(38, 114, 236);"><br>
        </div>
        <div style="color:rgb(38, 114, 236);">A# -&gt; EdgeProxy</div>
        <div style="color:rgb(38, 114, 236);"><br>
        </div>
        <div style="color:rgb(38, 114, 236);">
          <pre style="box-sizing:border-box;overflow:auto;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:11.9px;font-stretch:normal;line-height:1.45;padding:16px;border-radius:3px;word-wrap:normal;color:rgb(51, 51, 51);background-color:rgb(247, 247, 247);"><code style="box-sizing:border-box;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:11.9px;padding:0px;border-radius:3px;word-break:normal;border:0px;display:inline;max-width:initial;overflow:initial;line-height:inherit;word-wrap:normal;background:transparent;">ACK <a class="ecxmoz-txt-link-abbreviated" href="mailto:sip:923007777777@103.255.5.24:48469;transport=TCP">sip:923007777777@103.255.5.24:48469;transport=TCP</a> SIP/2.0
Via: SIP/2.0/TCP 192.168.10.13:6060;rport;branch=z9hG4bK184821964
<b>Route: &lt;sip:192.168.26.180:6080;transport=tcp;r2=on;lr;ftag=1252633513;EdgeProxy=true&gt;
Route: &lt;sip:52.76.50.195:6080;r2=on;lr;ftag=1252633513;EdgeProxy=true&gt;</b>
Route: <a class="ecxmoz-txt-link-rfc2396E" href="mailto:sip:+923007777777@192.168.26.181:8000;lr;ftag=1252633513;did=755.1859af64;nat=yes">&lt;sip:+923007777777@192.168.26.181:8000;lr;ftag=1252633513;did=755.1859af64;nat=yes&gt;</a>
Route: &lt;sip:192.168.26.180:6080;r2=on;lr;ftag=1252633513&gt;
Route: &lt;sip:52.76.50.195:6080;transport=tcp;r2=on;lr;ftag=1252633513&gt;
From: <a class="ecxmoz-txt-link-rfc2396E" href="mailto:sip:923003000200@52.76.50.195:6080">&lt;sip:923003000200@52.76.50.195:6080&gt;</a>;tag=1252633513
To: <a class="ecxmoz-txt-link-rfc2396E" href="mailto:sip:+923007777777@52.76.50.195:6080">&lt;sip:+923007777777@52.76.50.195:6080&gt;</a>;tag=12b65b6d</code></pre>
        </div>
        <div style="color:rgb(38, 114, 236);"><br>
        </div>
        <div>
          <div style="color:rgb(38, 114, 236);">Client send ACK to
            Private IP of Edge proxy. While it should send it to its
            Public IP.</div>
          <div style="color:rgb(38, 114, 236);"><br>
          </div>
          <div><font color="#ac193d">opensips inserts routes inversely
              incase of protocol translation. It should insert Double
              route with private IP first and public IP afterwards
              INSTEAD of public IP first for OUTBOUND INVITEs.</font></div>
        </div>
        <br>
        <b><font face="Times New Roman" color="#5133ab" size="3"><i>Hamid
              R. Hashmi</i></font></b>
        <div><font size="2">Software Engineer - VoIP</font></div>
        <div><font style="font-size:10pt;" color="#008a17" size="2">Vopium
            A/S</font></div>
      </div>
      <br>
      <fieldset class="ecxmimeAttachmentHeader"></fieldset>
      <br>
      <pre>_______________________________________________
Users mailing list
<a class="ecxmoz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="ecxmoz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br></div></div>                                               </div></body></html>