TURN Servers Explained: How WebRTC Delivers Reliable Calls Anywhere
If you have ever joined a video meeting that refused to connect, suffered from one-way audio, or dropped unexpectedly, there is a good chance the problem occurred before the call even started — at the network layer.
Modern browser-based telephony depends not only on codecs and encryption but also on how media packets find their way through networks, firewalls and carrier-grade NAT systems. This is where TURN servers become essential.
TURN is not optional “infrastructure polish”. Any WebRTC or VoIP system that expects reliable connectivity at scale needs a TURN relay for the users who cannot connect directly.
What Is a TURN Server?
TURN (Traversal Using Relays around NAT) is a protocol that allows voice, video and data streams to be relayed through an intermediate server when a direct peer-to-peer connection fails.
WebRTC was designed to connect users directly whenever possible. But path discovery does not always succeed. Corporate networks, ISP-level NAT, VPN layers and mobile networks often block inbound traffic.
When that happens, TURN becomes the fallback:
Instead of two users exchanging media directly, both connect to a relay server which passes traffic between them. Because the media is end-to-end encrypted, the relay cannot read it.
TURN is defined in the IETF specification:
https://datatracker.ietf.org/doc/html/rfc8656 (RFC 8656, which replaced RFC 5766)
TURN vs STUN: What’s the Difference?
You will usually see TURN mentioned alongside STUN, but their roles are very different.
STUN servers
• Discover the public IP address behind NAT
• Assist in direct routing
• Do not relay traffic
TURN servers
• Relay encrypted media
• Overcome firewall restrictions
• Maintain connectivity in hostile networks
• Carry actual voice and video traffic
If STUN is the map, TURN is the bridge.
Why TURN Matters for WebRTC and VoIP
TURN servers solve three fundamental problems:
1. Connectivity in Locked Networks
Enterprise firewalls routinely block UDP and dynamic port ranges. TURN forces traffic through predictable ports (typically 443 or 3478), which lets many calls work even where UDP is blocked.
2. Reliability on Mobile Networks
Mobile providers use aggressive NAT strategies that frequently break peer-to-peer flows. TURN keeps sessions stable as IP addresses change.
3. Carrier-Grade NAT (CGNAT)
Some ISPs place thousands of users behind shared public IPs. TURN avoids the need for a direct route between the two users.
The webrtc.org project documents how to set up TURN:
https://webrtc.org/getting-started/turn-server
How TURN Fits Into a WebRTC Call
When a WebRTC session begins:
- ICE begins path discovery, gathering direct, STUN and TURN relay candidates
- Connectivity checks test the direct routes first
- If no direct path works, the TURN relay path is used
- Both parties send encrypted media to the relay
- The TURN server passes packets between peers
From the user’s perspective — nothing changes.
Under the hood — everything changes.
Security: TURN Does Not “See” Your Calls
TURN servers do not decrypt media.
WebRTC encrypts voice and video using DTLS-SRTP before data leaves the browser. TURN simply forwards packets. It never sees the content or the keys, although it can see metadata such as IP addresses and traffic volume.
Encryption is defined by the WebRTC stack, not the relay.
The WebRTC security architecture is specified in:
https://www.rfc-editor.org/rfc/rfc8827.html
Performance: Does TURN Reduce Quality?
TURN introduces:
• Additional latency (usually modest if the relay is close to the users)
• Increased bandwidth usage
• Higher infrastructure cost
But without TURN:
• Some calls fail
• Media never connects for affected users
• User trust suffers
A working call that is slightly slower is better than no call at all.
Where TURN Is Used in Real Systems
TURN is commonly used in:
• Browser softphones
• Cloud PBX platforms
• Call centre applications
• Web-based SIP clients
• Mobile VoIP apps
• Video conferencing tools
• Real-time web applications
Most enterprise WebRTC deployments include TURN, even if users never realise it.
Open-Source TURN: What Platforms Use
Many deployments rely on coturn, the most widely used open-source TURN server (github.com/coturn/coturn).
Popular VoIP stacks commonly deployed alongside a TURN server:
• FreeSWITCH
• Asterisk
• Kamailio
• OpenSIPS
• Janus Gateway
TURN is where media reliability meets protocol engineering.
Common Mistakes When Deploying TURN
Despite its importance, TURN is frequently misconfigured.
Port Blocking
Not allowing TCP fallback on port 443 is the most frequent failure.
No Authentication
Unprotected TURN servers quickly become public relay targets (and run up large bandwidth bills).
No Redundancy
Without regional relays, users experience unpredictable latency.
Insufficient Capacity
Once media starts flowing, TURN behaves like a bandwidth product — not a signalling server.
TURN in the Future
TURN continues evolving alongside WebRTC:
• IPv6 relay handling
• QUIC transport exploration
• Automation via orchestration platforms
• Edge relay deployment
• Geo-distributed routing
TURN is likely to remain as background infrastructure that users never see.
Final Thoughts
TURN servers make browser calling dependable.
Without them:
• WebRTC would be unreliable for users on restrictive networks
• Some enterprise VoIP calls would fail
• Mobile users behind strict NAT would see dropped or silent calls
TURN is not an optimisation; it is the safety net for connectivity.
If your WebRTC deployment does not account for TURN, it is unlikely to be production-ready.
For more articles like this, visit SoftpageCMS.