What are STUN and TURN in SIP?
Answer
STUN and TURN are two essential protocols that ensure your SIP softphone (like CommPeak’s Softphone) can successfully make and receive calls when your device is behind a router or firewall. They work together to overcome common network restrictions.
NOTECheck the Network Options section of the following guides to learn how to enable STUN and TURN protocols in different CommPeak Softphone options to enjoy clear audio and uninterrupted calls from anywhere:
🧊STUN (Session Traversal Utilities for NAT)
STUN's goal is to help your softphone figure out its public address on the internet.
| Feature | Explanation |
|---|---|
| What it does | It's a lightweight tool that tells your SIP softphone exactly how it looks to the outside world (its public IP address and port). |
| Why it matters | This information is crucial for call setup. It allows the SIP softphone to tell the person you are calling where to send the voice data (RTP stream). |
| The benefits | When STUN works, the voice traffic can flow directly between the two callers (peer-to-peer), resulting in the fastest, clearest audio. |
| The drawback | STUN only works with certain "friendly" types of NATs (Network Address Translation). It fails when facing very strict or symmetric NATs or restrictive firewalls. |
🔄 TURN (Traversal Using Relays around NAT)
TURN's goal is to guarantee media flow when a direct connection is impossible.
| Feature | Explanation |
|---|---|
| What it does | TURN acts as a relay server for your voice traffic. It is used as a necessary fallback when the simpler STUN method fails because of strict NATs or firewalls. |
| Why it matters | The SIP softphone is instructed to send all voice traffic through the dedicated TURN server instead of trying to send it directly. This guarantees that the media stream flows and the call connects. |
| The benefits | Connection reliability is much higher. This ensures your calls work smoothly in the most restrictive environments (e.g., corporate networks, strict mobile hotspots). |
| The drawback | Since voice packets must travel an extra hop through the TURN server, there might be a slight increase in latency and bandwidth usage. |
Enabling STUN and TURN in your softphone is crucial for reliable voice communication, especially when you're working remotely or traveling.
NOTEPlease check the Why Enable STUN/TURN in CommPeak Softphone? article for more details about the benefits of enabling STUN and TURN in your Softphone app.
Updated 8 days ago