Daniel Thanks a lot for your response, in my case i don&#39;t want to provide so many ips to carriers acl because aws elastic ip are not consistent, that is the reason i wanted to proxy everything trough kamailio, here it is my setup <div>
i wont be doing any registration because of my setup does not required it, on hardware i had kamailio forwarding to freeswitch then distributed to asterisk and finish to a sbcswitch which i will be virtualizing on aws.</div>
<div><br></div><div>again thanks a lot for your advice you&#39;re the best.</div><div><div><br></div><div>originador &gt;&gt;&gt;kamailioA &gt;&gt;&gt;&gt;asterisk &gt;&gt; KamilioB&gt;&gt;&gt; Termination</div><div><br></div>
<div>debug=4 </div><div>log_stderror=yes </div><div>#!else </div><div>debug=2 </div><div>log_stderror=yes </div><div>#!endif </div><div><br></div><div>memdbg=5 </div><div>memlog=5 </div><div><br></div><div>log_facility=LOG_LOCAL0 </div>
<div><br></div><div>fork=yes </div><div>children=4 </div><div><br></div><div>auto_aliases=no </div><div><br></div><div><br></div><div>listen=udp:internal ip:5060 advertise external ip:5060 </div><div>mhomed=0 </div><div>alias=&quot;<a href="http://mysip.com">mysip.com</a>&quot; </div>
<div>alias=&quot;Internal IP:5060&quot; </div><div>alias=Internal IP:5060 </div><div>alias=Elastic IP </div><div>alias=Elastic IP:5060 </div><div><br></div><div>port=5060 </div><div><br></div><div>enable_tls=no </div><div>
<br></div><div>#tcp_connection_lifetime=3605 </div><div><br></div><div><br></div><div>#!ifdef WITH_SRCPATH </div><div>mpath=&quot;modules_k:modules&quot; </div><div>#!else </div><div>mpath=&quot;/usr/lib64/kamailio/modules_k/:/usr/lib64/kamailio/modules/&quot; </div>
<div>mpath=&quot;/usr/lib64/kamailio/modules_k/:/usr/lib64/kamailio/modules/&quot; </div><div>#!endif </div><div>loadmodule &quot;tm.so&quot; </div><div>loadmodule &quot;sl.so&quot; </div><div>loadmodule &quot;rr.so&quot; </div>
<div>loadmodule &quot;maxfwd.so&quot; </div><div>loadmodule &quot;textops.so&quot; </div><div>loadmodule &quot;pv.so&quot; </div><div>loadmodule &quot;dispatcher.so&quot; </div><div>loadmodule &quot;usrloc.so&quot; </div>
<div>loadmodule &quot;registrar.so&quot; </div><div>loadmodule &quot;siputils.so&quot; </div><div>loadmodule &quot;sanity.so&quot; </div><div>loadmodule &quot;ctl.so&quot; </div><div>loadmodule &quot;mi_rpc.so&quot; </div>
<div>loadmodule &quot;acc.so&quot; </div><div>loadmodule &quot;avpops.so&quot; </div><div>#!ifdef WITH_NAT </div><div>loadmodule &quot;nathelper.so&quot; </div><div>loadmodule &quot;rtpproxy.so&quot; </div><div>#!endif </div>
<div>loadmodule &quot;xlog.so&quot; </div><div><br></div><div>modparam(&quot;tm&quot;, &quot;failure_reply_mode&quot;, 3) </div><div>modparam(&quot;tm&quot;, &quot;fr_timer&quot;, 30000) </div><div>modparam(&quot;tm&quot;, &quot;fr_inv_timer&quot;, 120000) </div>
<div><br></div><div>modparam(&quot;dispatcher&quot;, &quot;list_file&quot;, &quot;/etc/kamailio/dispatcher.lst&quot;) </div><div><br></div><div><br></div><div>#!ifdef WITH_NAT </div><div># ----- rtpproxy params ----- </div>
<div>modparam(&quot;rtpproxy&quot;, &quot;rtpproxy_sock&quot;, &quot;udp:<a href="http://127.0.0.1:7722">127.0.0.1:7722</a>&quot;) </div><div><br></div><div># ----- nathelper params ----- </div><div>modparam(&quot;nathelper&quot;, &quot;natping_interval&quot;, 30) </div>
<div>modparam(&quot;nathelper&quot;, &quot;ping_nated_only&quot;, 1) </div><div>modparam(&quot;nathelper&quot;, &quot;sipping_bflag&quot;, FLB_NATSIPPING) </div><div>modparam(&quot;nathelper&quot;, &quot;sipping_from&quot;, &quot;<a href="mailto:sip%3Apinger@kamailio.org">sip:pinger@kamailio.org</a>&quot;) </div>
<div><br></div><div># params needed for NAT traversal in other modules </div><div>modparam(&quot;nathelper|registrar&quot;, &quot;received_avp&quot;, &quot;$avp(RECEIVED)&quot;) </div><div>modparam(&quot;usrloc&quot;, &quot;nat_bflag&quot;, FLB_NATB) </div>
<div>#!endif </div><div><br></div><div><br></div><div><br></div><div>         #subst_uri(&#39;/^sip:1([23456789][0-9]+)@(.*)$/sip:\1@\2/i&#39;); </div><div><br></div><div>request_route { </div><div>#checking for loops</div>
<div>        if (!mf_process_maxfwd_header(&quot;10&quot;)) { </div><div>                sl_send_reply(&quot;483&quot;,&quot;Too Many Hops&quot;); </div><div>                exit; </div><div>        } </div><div><br></div>
<div><br></div><div>        if (loose_route()) { </div><div>                if (!t_relay()) { </div><div>                        sl_reply_error(); </div><div>                } </div><div>                exit; </div><div>        } </div>
<div><br></div><div>        if (is_method(&quot;INVITE&quot;)) { </div><div>                record_route(); </div><div>                append_hf(&quot;X-Src-IP: $src_ip\r\n&quot;); </div><div>        } </div><div><br></div>
<div><br></div><div>#i a planning to send it to distpatcher module once i get calls flowing.</div><div>        if(!t_relay_to_udp(&quot;ip internal&quot;, &quot;5060&quot;)) { </div><div>                sl_reply_error(); </div>
<div>        } </div><div>        exit; </div><div>} </div><br><div class="gmail_quote">On Tue, Mar 26, 2013 at 5:13 AM, Daniel-Constantin Mierla <span dir="ltr">&lt;<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Hello,<div class="im"><br>
    <br>
    <div>On 3/26/13 2:38 AM, Felipe Ramos wrote:<br>
    </div>
    <blockquote type="cite">Can anyone please point me on a configuration example
      for kamailio when it is behind NAT, i need to change the contact
      ip from internal to external on sdp </blockquote>
    <br></div>
    you should not need that. Kamailio should do record routing,
    advertising the public IP, so the signaling from the other side is
    sent to Route headers, not to Contact address.<br>
    <br>
    Use:<br>
    <br>
    <div>listen=<a>udp:_internal_ip_:5060</a> advertise _external_ip_:5060 <br>
      <br>
    </div><div class="im">
    <br>
    <blockquote type="cite">and proxy all media from outside to internal asterisk
      farm.</blockquote></div>
    Asterisk has support for external IP, so it can advertise that IP in
    SDP and the media will go directly to the asterisk. Makes no sense
    to make a user space forwarding with rtpproxy.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <blockquote type="cite"><div class="im">
      <div><br>
      </div>
      <div>Please any help will be appreciated.</div>
      <div>most of documentation available is when client is behind Nat
        but not when Server behind Nat like is the case with Amazon aws
        vpc instances.</div>
      <div><br>
      </div>
      <div>
        Again thank you before hand.</div>
      <div><br>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </div><pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><span class="HOEnZb"><font color="#888888">
</font></span></pre><span class="HOEnZb"><font color="#888888">
    </font></span></blockquote><span class="HOEnZb"><font color="#888888">
    <br>
    <pre cols="72">-- 
Daniel-Constantin Mierla - <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
<a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a>
Kamailio World Conference, April 16-17, 2013, Berlin
 - <a href="http://conference.kamailio.com" target="_blank">http://conference.kamailio.com</a> -</pre>
  </font></span></div>

<br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br></div>