Box Will Only Work with Public IP Setting not Static IP Setting (Despite Static External IP)

Hi, I am at a loss as to why I can only get my FreePBX to work both at home and away without NAT issues WHEN the IP is set to public as opposed to static - despite the External IP Address actually being static and how to resolve it as I understand that my config is very insecure this way.

I am getting no audio at all when the IP is set to “Static” and calls hang up within a matter of seconds. Calls work absolutely fine when the IP address is set to “Public”.

The way I am currently testing it, from my server location (at home) is to connect to the server over the mobile network with my External IP on my iPhone (with WIFI turned off) using Zoiper (free version) and to connect to the server using my internal IP address from within Windows using the Portgo/PortSIP Softphone application. I am only using Softphones.

Does anybody have any ideas please?


Intention of the Network

  1. Multiple extensions from different locations connecting on domestic internet connections (behind routers) with dynamic external and internal IPs. Home working volunteers.

Basic Topology of the Network

  1. Router connected to ISP provided with an external static IP.
  2. Server connected to the Router with the Server configured to an internal static IP (192.168.1.109)

I have had a good look around to see if there are any settings in the FreePBX GUI that relate to NAT settings that may be set at a different value from “yes” - conclusion, there aren’t :smile:


Asterisk SIP Settings

NAT = "yes"
IP Configuration = "Static IP"
Local Networks = 192.168.1.0 (with a box containing /24)
External Address = 80.229* (removed for Security)
RTP Settings = 14291 - 2000 (Updated also on Router Port Forwarding)
Codecs Enabled = ulaw, alaw, gsm.


Advanced Settings

SIP NAT = Yes


Both Extension Settings

Can Reinvite = No
NAT = yes- force_rport_comedia
Transport = UDP Only
Host = Dynamic
Connection Type = Friend.

I tried to pull off some debug code from the “sip set debug on” command but with unregistered sip invites flashing past me and a limited scrollback terminal i’m struggling to get my head round, I haven’t been able to pull anything off that looks complete. I did notice “bad event” however and some weird stuff going on with a random [email protected]:5060 ip address. I can’t even put a link in this post so I’ve had to add the debug in at the end:

It’s been bugging me for months now (not being able to make my box more secure) and i’d be very grateful if maybe one or two of you could point me in the right direction as to diagnosing and remedying this issue.

Thanks,

Sambane.

The way you wrote this numbering is confusing… It needs to be 10,000 to 20,000.

Hi, thanks for your post.

The issue was apparent before I changed the RTP Ports - I was actually doing this for security? - do they need to be default as the system appears to work (save for the static//public ip issue).

I also can’t seem to be able to link to my pastebin to post some debug code :frowning:

Thanks :smile:

If you were having issues with it being on 10k to 20k and you changed it and are still having issues then I should just try to leave everything default until you find what works. Dont mess with changing the RTP ports.

PS You can now post links.

Thanks for this,

Well, I have actually changed those numbers for the purposes of the post but I understand that they need to be within the range of 10000 to 20000 - It was one of the things I read to improve security.

Before I changed these ports, my box IP was set to “Public” within Asterisk Sip Settings - after I changed them, my box continued to be set this way and worked before and after (all be it using a public IP)!

This is the debug - i’ve struggled with identifying the relevant parts though - there is something odd going on with a 10. IP Address? http://pastebin.com/gxynHEA4

Thanks :smile: