Hey Klaus<div><br></div><div>The way you described works for me (on EC2) and I think is a good solution.</div><div><br></div><div>Be sure to set mhomed=1 in your config.</div><div><br></div><div>Richard</div><div><br><div class="gmail_quote">
On 4 January 2013 17:57, Ovidiu Sas <span dir="ltr"><<a href="mailto:osas@voipembedded.com" target="_blank">osas@voipembedded.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello Klauss,<br>
<br>
I use record_route_preset for this kind of scenarios:<br>
<a href="http://kamailio.org/docs/modules/3.3.x/modules_k/rr.html#id2550086" target="_blank">http://kamailio.org/docs/modules/3.3.x/modules_k/rr.html#id2550086</a><br>
That was the main reason that I enhanced record_route_preset with the<br>
second parameter (see the Note on string2).<br>
<br>
I haven't tried your idea with two sockets. Let us know if it's working.<br>
If you need to use the same port on the internal and external<br>
interface, you could add a new IP to the host and listen on two<br>
sockets on the same port and force the socket when sending a request<br>
out.<br>
listen=udp:10.10.0.2<br>
listen=udp:10.10.0.3 advertise pu.bl.ic.ip<br>
<br>
<br>
Regards,<br>
Ovidiu Sas<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
VoIP Embedded, Inc.<br>
<a href="http://www.voipembedded.com" target="_blank">http://www.voipembedded.com</a><br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Thu, Jan 3, 2013 at 5:11 AM, Klaus Darilion<br>
<<a href="mailto:klaus.mailinglists@pernau.at">klaus.mailinglists@pernau.at</a>> wrote:<br>
> Hi!<br>
><br>
> Up to now I could avoid Kamailio setups with Kamailio behind NAt. But this<br>
> time I have to deal with it. That's why I want to ask what others did as<br>
> best practice.<br>
><br>
> The scenario is:<br>
><br>
><br>
> Asterisk 1----\ Kamailio+RTPPROXY<br>
> \ |10.10.0.2<br>
> Asterisk n------\ |<br>
> --------|------------- FW --SIP-trunk--- ITSP<br>
> Freeswitch 1----/ 10.10.0.1 public-IP<br>
> /<br>
> Freeswitch n--/<br>
> 10.10.0.x<br>
><br>
> Kamailio and rtpproxy have a private IP. Internal communication uses private<br>
> IPs, external communication uses a public IP which is NATed 1:1 to<br>
> Kamailio's IP address. No registrations, just forwarding of messages.<br>
><br>
> Using the global "advertised_address" setting with the public IP does not<br>
> work, as there is also internal communication. Using<br>
> set_advertised_address() is also cumbersome.<br>
><br>
> So it seems, the easiest solution would be to use 2 sockets on Kamailio,<br>
> e.g. port 5050 and port 5060. Then I could use the listen with dedicated<br>
> advertised addresses:<br>
> listen=udp:<a href="http://10.10.0.2:5050" target="_blank">10.10.0.2:5050</a><br>
> listen=udp:<a href="http://10.10.0.2:5060" target="_blank">10.10.0.2:5060</a> advertise pu.bl.ic.ip:5060<br>
><br>
> If I understand it correctly, this should solve all issues with<br>
> Record-Routing and Via-headers.<br>
><br>
> For RTP-Proxy it seems necessary to detect the direction of each message and<br>
> set the IP address in rtpproxy_manage("","ip.add.re.ss") manually.<br>
><br>
> Thus, it seems straight forward - or do I miss something? Any comments and<br>
> practical experience?<br>
><br>
> Thanks<br>
> Klaus<br>
<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>
</div></div></blockquote></div><br></div>