NAT Configuration - Unable to get the Audio - Call disconnected Automatically

I am using FreePBX 14.0.1.3 version.

From the different network can able to register and send call invite to Android Client (Zoiper).

But unable to get the voice data. Call disconnected automatically.

My Configuration details is below,

My FreePBX server is connected in LAN.My external IP is 121.123.234.345 and my server local IP is 192.168.4.23 means, what are the configuration is needed ?
I did the following

Settings > Asterisk SIP Settings > Chan SIP Settings > Nat Settings

Set NAT = yes
IP Configuration = Static IP
Override External IP = my static External IP
In General SIP Settings Tab
NAT Settings
External Address = my static External IP
Local Networks = 192.168.4.0 / 255.255.255.0

We just port forward 5060 and 5160 , 10000 to 20000 UDP ports

Other than that any settings is needed ?

Is STUN Server is needed to establish call ?

You set up your firewall to port forward the UDP ports you identified from the Internet interface to your FreePBX server, right?

Depending on your router type, sometimes SIP passthru interferes with connectivity.

Thanks for your reply @cynjut .
Yes, Exactly. From my internet Server I just port forward to my FreePBX server only.
We used Fortigate 30e firewall.

@mm999 and @cynjut

Is STUN Server is needed to established call ?

Not unless you are on a dynamic IP address.

If you’re using a static IP on the outside of the Fortigate, you should set up the SIP settings so that your external address is set correctly, then enable NAT on the server and use the internal address for the local network address.

Once that’s set up, you need to set up a passthrough that sends all incoming traffic on the Fortigate on the appropriate SIP ports to your server on the local network. This usually means (as a minimum) whatever port your ITSP is going to be sending your traffic to (e;g;, UDP 5060) and UDP ports 10000-20000.

I agree with cynjut.

I’ve never used a STUN server and I’m on a dynamic ip. My SIP/UDP ports are open (not NATed) but restricted by IP for my several remote extensions. Btw I have to update the external IP in SIP settings whenever my IP changes otherwise FreePBX gets messed up.

FreePBX and Asterisk support Dynamic DNS setups. You set up your system with a hostname instead of an IP address and every time you try to connect to the world, your IP address is re-evaluated to make sure it hasn’t changed. Even with a dynamic address, you wouldn’t typically use a STUN server.

Thanks for that, I’ve always wondered if FreePBX supported DDNS and now I know. I added my host name will give it a try.

Thanks for your reply @cynjut and @mm999.

If STUN is not Required, then what could be the reason for no audio but there is no problem in registration.

My outside extension is registered in PBX server with my firewall IP. (i.e.192.168.4.XX)

NAT is set to Yes and specified External IP and Internal IP in Asterisk SIP Settings.

I had enable NAT for the extension which is used on the other network extension

Ok, for the extensions you may need to have a STUN server, but you didn’t mention that your phones were outside your local network.

There are several reasons and ways that this may be failing. We need more information about your extensions setup.

I never needed a STUN server for my many remote extensions. Did you check to see if the SIP helper in the router is disabled (if you have one)?

In any event, the logs on both sides should help diagnose the problem.

1 Like