Daniel Thanks a lot for your response, in my case i don'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're the best.</div><div><div><br></div><div>originador >>>kamailioA >>>>asterisk >> KamilioB>>> 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="<a href="http://mysip.com">mysip.com</a>" </div>
<div>alias="Internal IP:5060" </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="modules_k:modules" </div><div>#!else </div><div>mpath="/usr/lib64/kamailio/modules_k/:/usr/lib64/kamailio/modules/" </div>
<div>mpath="/usr/lib64/kamailio/modules_k/:/usr/lib64/kamailio/modules/" </div><div>#!endif </div><div>loadmodule "tm.so" </div><div>loadmodule "sl.so" </div><div>loadmodule "rr.so" </div>
<div>loadmodule "maxfwd.so" </div><div>loadmodule "textops.so" </div><div>loadmodule "pv.so" </div><div>loadmodule "dispatcher.so" </div><div>loadmodule "usrloc.so" </div>
<div>loadmodule "registrar.so" </div><div>loadmodule "siputils.so" </div><div>loadmodule "sanity.so" </div><div>loadmodule "ctl.so" </div><div>loadmodule "mi_rpc.so" </div>
<div>loadmodule "acc.so" </div><div>loadmodule "avpops.so" </div><div>#!ifdef WITH_NAT </div><div>loadmodule "nathelper.so" </div><div>loadmodule "rtpproxy.so" </div><div>#!endif </div>
<div>loadmodule "xlog.so" </div><div><br></div><div>modparam("tm", "failure_reply_mode", 3) </div><div>modparam("tm", "fr_timer", 30000) </div><div>modparam("tm", "fr_inv_timer", 120000) </div>
<div><br></div><div>modparam("dispatcher", "list_file", "/etc/kamailio/dispatcher.lst") </div><div><br></div><div><br></div><div>#!ifdef WITH_NAT </div><div># ----- rtpproxy params ----- </div>
<div>modparam("rtpproxy", "rtpproxy_sock", "udp:<a href="http://127.0.0.1:7722">127.0.0.1:7722</a>") </div><div><br></div><div># ----- nathelper params ----- </div><div>modparam("nathelper", "natping_interval", 30) </div>
<div>modparam("nathelper", "ping_nated_only", 1) </div><div>modparam("nathelper", "sipping_bflag", FLB_NATSIPPING) </div><div>modparam("nathelper", "sipping_from", "<a href="mailto:sip%3Apinger@kamailio.org">sip:pinger@kamailio.org</a>") </div>
<div><br></div><div># params needed for NAT traversal in other modules </div><div>modparam("nathelper|registrar", "received_avp", "$avp(RECEIVED)") </div><div>modparam("usrloc", "nat_bflag", FLB_NATB) </div>
<div>#!endif </div><div><br></div><div><br></div><div><br></div><div> #subst_uri('/^sip:1([23456789][0-9]+)@(.*)$/sip:\1@\2/i'); </div><div><br></div><div>request_route { </div><div>#checking for loops</div>
<div> if (!mf_process_maxfwd_header("10")) { </div><div> sl_send_reply("483","Too Many Hops"); </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("INVITE")) { </div><div> record_route(); </div><div> append_hf("X-Src-IP: $src_ip\r\n"); </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("ip internal", "5060")) { </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"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></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>