WebRTC Voice Clients and STUN/TURN Requirements
Browser-based voice clients are attractive because they remove installation and work across devices. They also operate under a different set of network rules from a traditional softphone. A browser cannot open arbitrary ports on a user's machine, and it must discover how it can be reached before a media path can be built. STUN and TURN exist to solve that problem. When they are missing or misconfigured, calls fail in ways that look like general connectivity problems rather than voice-specific ones.
What STUN and TURN Each Do
STUN lets a client discover the public address and port that a NAT device has assigned to it. With that information it can offer a direct media path to the other party. This works for many home and office networks, but not for all. Symmetric NATs and restrictive firewalls can prevent a direct path from being established, because the address discovered through STUN is not the one the far end is permitted to send to.
TURN provides a relay. When a direct path is impossible, media is sent through a server that both parties can reach. This adds bandwidth cost and a little delay, but it makes calls work on networks where direct connectivity is blocked. A production WebRTC voice deployment needs a TURN service; relying on STUN alone means a predictable share of users - those on corporate firewalls, hotel networks or mobile data - will have failing or one-way audio.
| Network condition | STUN result | TURN needed |
|---|---|---|
| Simple home NAT | Direct path usually works | Rarely |
| Symmetric NAT | Direct path fails | Yes |
| Corporate firewall | Often blocked | Yes |
| Hotel or guest Wi-Fi | Unpredictable | Usually |
| Mobile data | Varies by operator | Often |
ICE Tells You Which Path Was Chosen
The process of gathering candidate paths and selecting one is called ICE. A call can end up on a host candidate, a server-reflexive candidate discovered via STUN, or a relayed candidate through TURN. Understanding which was selected is the fastest way to diagnose a WebRTC call problem. If the call uses a relayed candidate, audio quality depends on the TURN server's capacity and location. If it uses a direct candidate and one side hears nothing, the problem is likely a local firewall or a media policy.
Diagnostics in a browser are more limited than a packet capture, but the information is still useful. Browser developer tools show candidate types and the selected pair, and the voice platform's own logs can show which leg was relayed. Combining the two answers common questions: did the client find any candidates at all, did it choose a relay, and did the failure happen before or after media started flowing.
Capacity and Geography
A TURN server carries media for every call that uses it, so its bandwidth requirement grows with concurrent relayed calls, not with registered users. Planning from user counts alone underestimates the need. Geography also matters: a relay on the other side of the country adds delay to every word for users who need it. Placing relays close to the user population, or using several regionally, improves the experience for the calls that cannot take a direct path.
- Deploy TURN as well as STUN for any production browser voice service
- Size relay bandwidth from concurrent relayed calls
- Place relays close to the users who will need them
- Check which ICE candidate type a failed call selected
- Test from hotel, mobile and corporate networks, not only the office
- Allow the required UDP and TLS ports through firewalls
- Monitor relay usage so capacity is planned from evidence
Security and Credentials
An open relay is an attractive target because it can be used to carry traffic unrelated to your service. TURN should require credentials, and those credentials should be time-limited where the deployment supports it. Long-lived static credentials shared in a client application can leak and be reused. The configuration should also restrict which addresses the relay will forward to, so it cannot be used as a general-purpose proxy.
Encryption is a separate but related decision. WebRTC encrypts media by default, which is one of its strengths, but it also means a relay sees encrypted packets it cannot inspect. That is normally desirable. The operational effect is that quality investigations must rely on metrics and candidate information rather than deep packet content, so the platform should expose sufficient call data for a team to identify where a problem begins.
| Concern | Risk | Control |
|---|---|---|
| Open relay | Abuse and bandwidth cost | Require credentials |
| Static credentials | Leak and reuse | Use time-limited credentials |
| Distant relay | Added call delay | Deploy regionally |
| Under-sized relay | Poor audio under load | Plan from concurrent calls |
Redstone Approach
Redstone voice platforms support browser and softphone clients alongside desk endpoints, and their SIP and media configuration can be aligned with WebRTC deployments that use STUN and TURN. Because browser media paths depend heavily on the user's network, Redstone deployments pair client configuration with call quality reporting so that teams can see when a call was relayed and respond to the networks that actually cause problems.
Redstone Systems, Inc. founded in Delaware, USA in December 2002, has been the ODM vendor for many well-known communications companies, serving the Southeast Asian market. In 2020, Redstone Systems will begin to return to the North America market with its self-developed brand.
Redstone has a complete product line of intelligent voice gateways, providing IP-PBXs, analog VoIP gateways (FXS/FXO), digital VoIP gateways (E1/T1), border appliances, and session boundary controllers (SBCs).
With advanced technology in digital signal processor (DSP), speech coding and speech processing, as well as efficient operational tools such as cloud remote management, auto provisioning, Redstone gateways are widely used in markets of enterprise communications, cloud communications, call centers, operators’ IMS/SIP trunks, bringing users friendly, efficient and reliable communication experience.
For more information about Redstone, You can follow us on Facebook, Linkedin, and Youtube to be the first to get the latest news.

Current Location :

