[OpenSIPS-Users] OpenSIPS behind Static NAT (Amazon EC2)

Brett Nemeroff brett at nemeroff.com
Tue Apr 27 22:47:23 CEST 2010


Hello Brendan,
I'm doing a test of OpenSIPs in EC2 as well.. All is working with the
exception of ACK received for 500 type errors which are being retransmitted.
Error logs seem to indicate that the dialog should have been destroyed and
I'm not sure why I'm getting the retrans. I posted this question a few weeks
ago..

I didn't try record_route_preset, but I did try "advertised_address", which
may help.

I'll let you know if I get a resolution on my side.

On Tue, Apr 27, 2010 at 3:39 PM, Brendan Sterne <brendan at callvine.com>wrote:

> Greetings,
>
> I am experimenting with using OpenSIPS in Amazon EC2 to distribute
> calls to Asterisk instances (also running in Amazon EC2).  The
> challenge is that servers on Amazon EC2 have private IPs to
> communicate with each other, but different public IPs when accessed
> from without EC2.   Basically Amazon has a Static NAT setup that does
> IP translation (but not port translation).  Amazon provides a public
> DNS name that resolves to the public host IP outside of Amazon EC2,
> and to the private host IP inside of Amazon EC2.
>
> I know that it is not recommended to use OpenSIPS behind a NAT, but
> I'm curious if I can make this work.  Right now I'm focusing on
> inbound calls, SIP call control only (I will use nathelper / rtpproxy
> as necessary to help with media later).
>
> Here's the scenario for the invite:
> Soft Phone   -------> EC2 Firewall ----->  OpenSIPS  -----> Asterisk
>
> The INVITE,100,200 works fine - I have opensips redirect to the
> Asterisk using
>       rewritehostport(<asterisk_dns_name>);
> And I use record_route_preset() to record the Public DNS in the
> route.  This will create a Route Set that will work both ways (from
> the Soft Phone, and from the Asterisk).
>      record_route_preset(<opensips_dns_name>)
>
> The problem I'm having is with the ACK.  It is being routed from the
> Soft Phone to the OpenSIPS via it's Amazon DNS name (
> ec2-204-236-245-16.compute-1.amazonaws.com
> ), but the OpenSIPS isn't recognizing the name as a local alias.  I
> have alias set:  alias="ec2-204-236-245-16.compute-1.amazonaws.com:
> 5060", but the opensips log shows "Topmost URI is NOT myself" (you can
> see more below).  I have attached my config, logs, and a sip trace.
>
> Any suggestions are appreciated.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20100427/94606a57/attachment-0001.htm 


More information about the Users mailing list