What Is NAT Traversal? STUN, TURN and ICE
NAT traversal lets voice and WebRTC media cross routers that hide private addresses. Learn how STUN, TURN and ICE fix one-way audio for browser-based agents.
إجابة سريعة
NAT traversal is the set of techniques that let voice and video cross routers that hide private addresses (NAT). STUN discovers your public address, TURN relays media when a direct path fails, and ICE tries the options in order and picks one that works. Without it, calls can connect with one-way audio.
Most devices sit behind a router that translates private addresses into a shared public one. That works well for browsing. It is awkward for a phone call, where the far end must send audio straight back to your device. NAT traversal is how real-time media finds its way through.
What is NAT traversal?
NAT stands for network address translation. Traversal is the work of getting media across it. RFC 8445 describes ICE as a protocol for NAT traversal for UDP-based communication, and says ICE uses STUN and its extension TURN. This is the machinery behind browser-based calling.
Why does NAT break voice calls?
SIP or WebRTC signalling tells the far end where to send audio. If a device behind a NAT announces its private address, the far end sends audio to an address that does not exist on the public internet. The call sets up, because signalling reached the server, but the media goes nowhere in one or both directions. That is the classic one-way audio symptom. The one-way audio troubleshooting guide walks through diagnosis.
What do STUN, TURN and ICE each do?
| اسم | What it does | Defined in |
|---|---|---|
| STUN | Lets an endpoint learn the public IP address and port a NAT gave it, check connectivity and keep bindings alive. A tool within a solution, not a full solution | RFC 8489 |
| TURN | Lets a host behind a NAT use a relay server to exchange packets with its peers when it cannot reach them directly | RFC 8656 |
| ICE | Gathers possible addresses, tests them and selects a working path, using STUN and TURN | RFC 8445 |
How does ICE pick a media path?
Each side collects candidates: addresses it might use. RFC 8445 names three kinds, host (on a directly attached interface), server-reflexive (the translated address on the public side of a NAT) and relayed (allocated from a TURN server).
- Gather. Each side collects its host, server-reflexive and relayed candidates.
- Prioritise. Candidates are ranked so more direct routes are preferred over indirect ones.
- Exchange. Each side sends its candidates to the other over the signalling channel.
- Check. The sides try pairs in priority order with STUN checks to find out which pairs work.
- Select. The controlling side picks a working pair and media flows over it.
A relayed path is the last resort: it works almost anywhere, but the audio takes an extra hop through the relay.
How does NAT traversal affect browser softphones?
A browser agent is behind some home or office router, and often a corporate firewall too. WebRTC implementations must support ICE and TURN (RFC 8835), so a call can use a direct path where one works and a relay where it does not. When an agent reports silence or one-way audio, the cause is often that no candidate pair worked, or that a firewall blocked the relay. The WebRTC agent audio problems guide covers what to check, and WebRTC vs SIP phones compares the two phone types. See also the هاتف برمجي بتقنية WebRTC entry.
On the carrier side, a وحدة تحكم في حدود الجلسات (SBC) commonly handles the same address problem for RTP media.
What should you check when audio fails?
- Which direction is silent? One direction points at the NAT or firewall on that side.
- Does it fail on one network only? A firewall that blocks UDP or relay traffic is a common cause.
- Is a relay available? Browser calls need a working TURN server for networks that block direct paths.
- Is the RTP port range open? For a PBX or session border controller you run yourself, the firewall must allow it both ways.
الأسئلة الشائعة
What is NAT traversal?
It is the set of techniques that let voice and video media cross routers that translate private addresses, so both sides can send audio to each other.
What is the difference between STUN and TURN?
STUN helps a device learn its public address so a direct path can be tried. TURN relays the media through a server when a direct path is not possible.
What is ICE in WebRTC?
ICE is the procedure that gathers candidate addresses, tests pairs of them with STUN checks and selects a working path, using TURN as a fallback.
Why do I get one-way audio behind a NAT?
Usually because one side was told a private address to send audio to. Without traversal the audio never reaches the device.
What is a TURN server?
A relay that forwards media between two endpoints that cannot reach each other directly. Media takes an extra hop, so it is used when direct paths fail.
مصادر
- RFC 8445, Interactive Connectivity Establishment (ICE): A Protocol for NAT Traversal, July 2018 (source, checked 2026-11-19)
- RFC 8489, Session Traversal Utilities for NAT (STUN), February 2020 (source, checked 2026-11-19)
- RFC 8656, Traversal Using Relays around NAT (TURN), February 2020 (source, checked 2026-11-19)
- RFC 8835, Transports for WebRTC, January 2021 (source, checked 2026-11-19)
قراءات ذات صلة: SIP one-way audio troubleshooting · WebRTC agent audio problems · هاتف برمجي بتقنية WebRTC · Session border controller · RTP · WebRTC vs SIP phones
مصطلحات ذات صلة
What Is Network Effectiveness Ratio (NER)?
Network effectiveness ratio (NER) measures how often the network did its job, counting busy and declined calls as successes. See the SIP formula and example.
ما هو مؤشر صافي الترويج (NPS)؟
NPS هو الفرق بين المؤيدين والمنتقدين في سؤال التوصية من صفر إلى عشرة. تعرّف على طريقة حسابه، ونطاقه، وكيف يختلف عن CSAT.
What Is Number Portability?
Number portability lets a customer keep the same phone number when switching carriers. How porting works, the legal definition, and what it means for lists.
ما الفرق بين القنوات المتعددة والقنوات الشاملة؟
تعني القنوات المتعددة وجود عدة قنوات؛ بينما تعني القنوات الشاملة إجراء محادثة واحدة عبرها. يكمن الفرق الحقيقي في مشكلة الهوية، وما يتغير بالنسبة للوكلاء.
What Is Packet Loss in VoIP Calls?
Packet loss is voice data that never arrives, heard as clipped or robotic audio. See how RTCP counts it, how it differs from jitter, and what to check first.
What Is Post-Dial Delay (PDD)?
Post-dial delay (PDD) is the wait between dialling and the first sign a call is progressing, such as ringing. See how SIP measures it and why it matters.
هل أنت مستعد لرؤية تطبيق DialerBee أثناء العمل؟
اطلب عرضًا توضيحيًا مباشرًا مدته 15 دقيقة، أو ابدأ تجربة مجانية لمدة 14 يومًا — دون شرائح عرض، ودون أي التزام. يبدأ الاتصال بمجرد ربط خط SIP أو نظام PBX الخاص بك واعتماده.
تجربة مجانية لمدة 14 يومًا · رصيد ذكاء اصطناعي مجاني · بدون بطاقة · 11 لغة · BYOC · ضوابط داعمة للامتثال