External and Internal Devices: Network Topology

The 3CX Phone System frequently communicates across LANs and establishes calls between devices (softphones, hardphones, gateways, VoIP providers, and PBX bridges) which are located on different networks. The PBX communicates both with devices that are inside the PBX’s LAN (internal devices), as well as with devices that are outside the PBX’s LAN (external devices). 3CX needs to adjust the SIP packets depending on whether a device is external or internal. Since 3CX Phone System will need to communicate with external devices by crossing a NAT device, firewall configuration comes in to play as well, since this may affect packet routing.

When is a device internal and when external?

Since the composition of a SIP message for an internal device and that for an external device is different, the PBX must decide whether the device it is communicating with is internal or external, in oder to correctly interpret incoming SIP messages, and to correctly build outgoing SIP messages.

An internal device is a device which:

  1. Resides on the same LAN as the PBX.
  2. Can be reached by the PBX, and which can reach the PBX, directly without the need to cross a NAT device.
  3. Can receive an IP packet from, and send an IP packet to, the PBX, where the IP header information for Source IP/Port and Destination IP/Port remain unchanged.

An external device is any device which does not fall within the definition of an internal device as specified above.

When a device is external

When a device is external, the public resolved IP will be used in the contact, as supplied by the STUN clients query to the configured STUN server. The STUN Servers which will be queried for resolution are set via the 3CX Management Console under “Settings” > “Network” > “STUN Server” tab.

Default behaviour to identify Internal and External Devices

By default the PBX will assume that it is behind a NAT device, and will treat devices on certain IP addresses as internal, as per parts of RFC_3330 and RFC_1918. (Refer: http://www.ietf.org/rfc/rfc3330.txt, Refer: http://www.ietf.org/rfc/rfc1918.txt)

The PBX will treat all devices as internal when they are inside the following address spaces:


The PBX will enumerate all the IP Addresses on its network stack and attempt to resolve the PBXs IP/Port combination on each of the detected interfaces.