Trixbox/Free PBX with Dynamic IP issues

Hey All,

Ok, so I am trying to use SIP with a dynamic IP. I have set up a no-ip redirect that gets updated directly through my router.

I have set the IP on the trixbox statically to 192.168.2.114 . My default gateway is set to 192.168.2.1 and my subnet is 255.255.255.0 .

I set NAT to true for my test extension and can connect if I use the internal IP address of my network with the softphone.

I did follow several tutorials including Trixbox Without Tears. I modified my sip_nat.conf to

nat= yes
externhost= mydomain.no-ip.org
localnet= 192.168.2.1/255.255.255.0
externrefresh= 10

All appropriate ports are forwarded on my router.

The x-lite softphone discovers my network through the domain name but, can’t register. It gets a 408 request timeout error. Again, works fine at local internal IP.

Now, I know that you can have better results using IAX2 as a protocol instead, but, my question would be, if I get a DID Sip provider, would that prevent the extensions from being able to get calls from the DID?

Any other ideas?

localnet= 192.168.2.1/255.255.255.0 should be localnet= 192.168.2.0/255.255.255.0

My router’s local IP is set to 192.168.2.1 not 192.168.2.0. This is why I set it that way. The default gateway IP is different than the standard…

or, is the localnet supposed to be the IP address of the Trixbox…?

localnet is basically the same thing as subnet.

localnet is supposed to be the network address not an address of any host.

In a /24 network (which would have a subnet mask of 255.255.255.0) the network address contains a 0 in the fourth octet.

IE: 192.168.1.0 192.168.2.0 10.0.0.0 10.1.0.0

The network number refers to all of the hosts in the network (collision domain).

Bottom line is the localnet is excluded from the NAT translation.

This is not a Linux/FreePBX/CentOS concept, it’s networking 101.

Ok,

I changed the address to 192.168.2.0 with the same results. The phone finds the network but, still can’t authenticate. However, it authenticates fine when using the local IP.

I am going to play with the QOS settings on the router to direct priority to the Trixbox MAC and IP address and see if that does anything. Again, all ports are forwarded properly in the router…

Any other ideas?

got it working. When I tried to change some settings on my router it froze. When I rebooted it, it wouldn’t allow any of my computers to get online, despite getting an IP from my ISP.

I restored the factory defaults, re-did everything and now…it works…weird…