New: multiple lines, live AI transcription, queues and voicebots — early access now. More to come.See the roadmap →

List of STUN servers

Why WebRTC needs a STUN server when the PBX is behind NAT, how to configure one in Asterisk, and a list of public STUN servers.

View as Markdown

To receive audio when your phone system is behind NAT, you will most likely need a STUN server. The PBX asks the STUN server for its public IP address and port, and uses that information in the media negotiation (ICE) so that the browser can send audio to the right address.

Configuring STUN in Asterisk

In /etc/asterisk/rtp.conf (or rtp_custom.conf on FreePBX/Issabel):

ini
[general]
icesupport=true
stunaddr=stun.l.google.com:19302

Commonly used public STUN servers

ServerPort
stun.l.google.com19302
stun1.l.google.com19302
stun.stunprotocol.org3478
stun.cloudflare.com3478

A longer, community-maintained list of public STUN servers is available here.