Problem with installation on AWS EC2 virtual machine

Hi all,

I have a problem with fresh new installation of FusionPBX 4.5 on a AWS EC2, the installation scrip have use local IP for the installation and now when the Fusion want make a call, the IP address are wrong and i don't have sound .. ... where i can change, because in variable it's change but i have this log again ...

call-id ca3e06a0-58cf-1238-1992-024960480542
SIP UDP message remote=15.222.7.91:5080 -> local (private IP)=172.31.2.180:5060
v=0
o=- 1569241620 1569241621 IN IP4 172.31.27.153
s=-
c=IN IP4 172.31.27.153
t=0 0
m=audio 20404 RTP/AVP 9 0 8 101 13
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20

Blue = nice
Red = wrong IP
 
You can set you public IP information in Advanced>Variables>IP Address or directly in the Sofia profiles.
You will have to restart the profile after making changes.

I have try, but I have again internal AWS IP in log .... but it’s better ... i have erase fews internal by public but not all and I don’t have sound when the call answered
 
More info here:
https://freeswitch.org/confluence/display/FREESWITCH/Amazon+EC2

Advanced > XML Editor : vars.xml
Replace [AWS EIP] with your instance public IP
Code:
<X-PRE-PROCESS cmd="set" data="bind_server_ip=[AWS EIP]"/>
<X-PRE-PROCESS cmd="set" data="external_rtp_ip=[AWS EIP]"/>
<X-PRE-PROCESS cmd="set" data="external_sip_ip=[AWS EIP]"/>
And in autoload_configs/switch.conf.xml, uncomment these...
Code:
param name="rtp-start-port" value="16384"
param name="rtp-end-port" value="32768"
Important: Restart the EC2 instance to take affect.
 
I have the same problem here with a fresh install and a similar setup but on GCP.

The above variables are well configured and FusionPBX been rebooted several times. The extension is receiving the local server IP in the SDP c line. I can work around the problem on PSTN-to-extension calls by configuring the extension in the Bypass Media mode. Or, on extension-to PSTN-calls with the extension configured in the Bypass Media After bridge mode. In those cases the SDP c line is set with the public IP. Obviously I am unable to get successful inbound and outbound calls with a single config and nevertheless I suspect that the SIP Bypass Media option is not the right approach to fix NAT issues.

So, it seems that external_rtp_ip has no effect on my setup or the Freeswitch auto-nat feature is not working. Should I do anything special to enable it the auto-nat? Any idea about what is wrong?

Many thanks!

UPDATE
Replaced the default ext-rtp-ip=$${local_ip_v4} value of the internal SIP profile with my public IP and now my problems are gone. Not sure why does not pick my $${external_rtp_ip} variable.
 
Last edited: