User Tools

Site Tools


voip:3cx:stun_01

When and How Can I Switch Off STUN Resolution?

STUN resolution is necessary for the PBX to understand what it’s public IP Address is, and what port mappings are in effect for Media (to attempt NAT traversal when port forwarding is not implemented). STUN resolution may be disabled when:

  • No External entities are in use (no bridges, voip providers, extensions)- AND/OR
  • Static Port Forwarding is in place for reliable media exchange with external entities (External Extensions, VoIP Providers, Bridges etc)

Disabling STUN may also be useful to resolve issues such as

  • very long delays for a call to be delivered
  • issues with 1 way audio

Disabling STUN resolution

  1. Click “Network” under “Settings” and click on the “STUN Server” tab.
  2. Enable the check box called “Turn off STUN server”.
  3. In the “Public IP to use in Contact and SDP” field enter the public IP address of your 3CX Server / Network.
  4. In the “Select Network Card Interface” drop down select the IP address of the 3CX NIC card that has access to the external network / internet OR that allows you to connect to your VoIP Provider / ITSP / CLEC
  5. Click “OK” at the bottom of the page.

<hi #fff200>Tweaking VoIP Provider settings so as not to use STUN</hi>

  1. In the 3CX Management Console, expand the “VoIP Provider” section in the left hand navigation panel.
  2. Click on the friendly name you gave your VoIP Provider.
  3. Now, expand the “Advanced” tab.
  4. In the option labeled “Which IP to use in ‘Contact’ field, select “Specified IP” and insert into the adjacent text box your Public IP Address.
Additional Information

Stun is irrelevant for PSTN Gateways because PSTN gateways are on the local network so they communicate to the 3CX Phone System using the local network interface not the public ip address.

It is always a good option to test the stun server before using it. 3CX provides it’s own stun servers (stun.3cx.com and stun2.3cx.com) but it is very important that if you have a VoIP Provider from VoIP Company XYZ, to use the stun server address provided by VoIP Company XYZ. You can use the 3CX Stun server but probably the stun server of your VoIP telecom company will be closer to you and might have less traffic so the response you get back will be quicker.

<hi #b5e61d>…and the most important… </hi>

Since the STUN resolution is the source of many (if not the most…) problems concerning 3CX configuration, disabling it is your primary goal. Unfortunately you cannot do it the easy way because you will be expected to enter your fixed public IP before saving configuration, and if you don't have it (if you are on any kind of ADSL, you probably don't….) you cannot disable STUN !!

But…

If you have properly configured your router (forwarded all the neccesary ports to your 3CX server…) there is no need for STUN and there is the way to disable it. (Description is for the 3CX version 12 and 12.5 but hopefully there are no major differences on newer versions).

Open Voip Providers. Choose provider and open Advanced tab.

Under Registration SettingsWhich IP to use in 'Contact' field for registration: click on Specified IP and type in the local IP address of your 3CX server !

voip/3cx/stun_01.txt · Last modified: 2016/07/13 18:34 (external edit)