Hi,
Yes, sorry. My setup is my own server (Ubuntu 14.04) that I have installed Asterisk and FreePBX. It is running on a cloud instance (Openstack) with one network interface. One private IP (10.0.5.174) and one Wan IP (x.x.x.x) are assigned. Traffic on the Wan side is filtered with a firewall.
All the extensions are numbered XXXX eg: 6004. When I call 6004 from 6002 or 6001, the incoming SIP address at 6004 is displayed as 6002@10.0.5.174. This is ok when all the sip clients are on the local network as the IP address can be resolved. If a client is outside the network on the internet, the sip address will not work as the 10.0.5.174 address cannot be resolved. If all outgoing calls contain a domain name that resolves to the Wan IP, things should work fine. 6002@sip.domain.com should work from the internet side. I have looked through the FreePBX interface and I cannot find anywhere that an outgoing call can be set to contain a domain name instead of an IP address. After searching as mentioned above, a 'fromdomain' option can be set that adds a domain name after the '@' part of the sip address.
Thanks all for your help.