Why your voice agent connects but nobody hears a thing
Port 443 can load the page while WebRTC audio has no way out; candidates and connection pairs show whether to call the network team or fix your code.
In brief
- A page that loads proves only that HTTPS gets through; the UDP path for audio can be blocked separately.
- STUN reveals the public address, ICE checks which pairs actually work, and TURN relays when there is no other option.
- Always have TURN/TLS on port 443 ready as a fallback, but still ask for UDP to be opened for the best quality.
A firewall that lets only port 443 through can show a voice agent as connected while carrying none of its audio. Take a hypothetical go-live morning at a call center. The demo ran well on your laptop and on the project manager’s 4G phone. Inside the client’s corporate network, the interface reports a connection, the agent has joined the room, and nobody hears anything.
The natural reflex is to suspect the model or reopen the prompt. Hold off. When the page loads but the sound does not, the first question must be whether the audio packets have a path at all.
Filing a ticket and waiting will not help at this point. If you sit with the client’s IT team, identify the blocked path and ask for the right ports, the go-live may be saved that same morning.
The page gets through; the voice may not
Split the call into two streams. The first is the web page, which travels over HTTPS: if the interface appears, that stream works. The second is audio, and it does not necessarily take the same route.
The port list in LiveKit’s self-hosting documentation makes the separation plain: 443 serves HTTPS and TURN/TLS, while WebRTC also needs 3478/UDP, the 50000-60000/UDP range and 7881 for the TCP path.
Say a firewall allows only 443 and your system has not enabled TURN/TLS. The interface stays green because HTTPS has no problem, while the audio packets have no way out.
Three players: ICE, STUN and TURN
MDN describes ICE as a framework that helps a browser connect to a peer: getting past firewalls, obtaining an address when the device has no public IP, and relaying data when necessary. Think of ICE as a pathfinder. It gathers every address that might be usable, called a candidate, then tests which pairs work.
There are three main types of candidate. host carries the machine’s actual address. srflx is the address that NAT assigns when a packet passes through it on the way to a server; STUN is the protocol that helps you discover your public address and any restrictions imposed by your router. relay is an address obtained from a TURN server, used to relay media between two peers.
Having a public address is still not enough. TURN gets past symmetric NAT by relaying all data through a server. That adds cost, so both MDN and RFC 8656 advise using TURN only when no other path can be found.
On a corporate network, suspect blocked UDP first and consider NAT second. The test below answers the UDP question in a few minutes.
Reading the client’s network in a few log lines
Back to the go-live morning. Open DevTools on a real machine inside the client’s network and try each path separately. Replace the server names and credentials with those of your own system.
function probe(url, creds = {}) {
const pc = new RTCPeerConnection({ iceServers: [{ urls: url, ...creds }] });
pc.createDataChannel('probe'); // needed to trigger candidate gathering
pc.onicecandidate = (e) => {
if (e.candidate) console.log(url, e.candidate.type);
};
pc.createOffer().then((offer) => pc.setLocalDescription(offer));
}
const creds = { username: 'TEMP_USER', credential: 'TEMP_PASS' };
probe('stun:media.example.com:3478');
probe('turn:media.example.com:3478?transport=udp', creds);
probe('turns:media.example.com:443?transport=tcp', creds);
Suppose the output looks like this:
stun:media.example.com:3478 host
turn:media.example.com:3478?transport=udp host
turns:media.example.com:443?transport=tcp host
turns:media.example.com:443?transport=tcp relay
Read it line by line. host is always there, so it tells you nothing yet. The STUN path returns no srflx and TURN over UDP returns no relay: both UDP paths are silent. Only TURN/TLS on port 443 answers, so the reasonable conclusion is that outbound UDP is blocked while 443 remains open.
If the 443 path also shows only host, review the TURN configuration on your side first, then call the client’s IT team with the logs.
A candidate, however, is only an address that might receive data; it does not prove that a path works. RFC 8445 says the purpose of ICE is to discover which pairs of addresses work, and each check is a STUN transaction on a specific pair.
So place a real call, then look in the client and server logs for a successful ICE pair. If there is none, the audio still has no path and the problem still belongs to the network: call the client’s IT team with the logs, and ask whoever runs the media server on your side to look at them too.
The last layer lies outside the network. If there is a successful pair but you hear nothing, do not call IT yet. Say a sentence into the microphone and check the agent’s log. Did it register your words? Did it generate a reply?
If the agent received nothing, suspect the outbound direction: the microphone or browser permissions. If the agent replied but the speaker is silent, suspect the return direction: the browser blocking autoplay, or audio playback in the agent’s pipeline.
What should you ask IT to open?
“Please open the firewall” gives an IT team nothing to approve. A specific list of ports does. LiveKit’s deployment documentation is a good example for learning how to read one; if you use another system, look up that provider’s ports.
| Path | Ports, per LiveKit | What to do with IT |
|---|---|---|
| UDP | 3478/UDP, 50000-60000/UDP | Always ask for these: this is the path to the best quality |
| WebRTC over TCP | 7881 | Ask for this as well, but not as a substitute for UDP |
| TURN/TLS | 443 | Confirm that users’ machines can get out on it, as a fallback when UDP is not viable |
LiveKit uses TURN/TLS on TCP 443 when UDP is not viable, but still recommends opening the UDP ports for the best audio and video quality.
If you have deployed TURN/TLS and the probe on 443 returns relay, tell IT so: there is a fallback path over 443 today, and you are asking for UDP to make conversations smoother. If you have not deployed it, an open port 443 will not save the call, and the first task is yours.
Start earlier with the next client
Do not wait for go-live day. In the first week, ask for a machine with the same configuration as an end user’s, connected to the network they use rather than the guest Wi-Fi. Run the probe and save the results in the project documentation.
Then place a real call and record whether ICE has a successful pair and whether the agent hears and replies. Send IT the port table with the logs as evidence. Once they have made the changes, test again with iceTransportPolicy: 'relay' in the RTCPeerConnection configuration to make sure the fallback path works in practice and does not exist only on paper.
Mistakes that cost you the morning
A familiar trap is configuring only STUN and testing from home. According to web.dev, most WebRTC calls connect with STUN alone, so a home network can easily turn everything green. WebRTC.org’s guide, by contrast, says plainly that a direct socket between clients is often not possible, and that the common solution is TURN.
The next trap is having TURN that runs only over UDP. When a firewall blocks UDP, it blocks that TURN path too, which is why you need TURN/TLS on TCP 443. Going the other way and forcing every call through a relay to be safe adds cost on networks that never needed it, something RFC 8656 advises against.
Do not stop at candidates, either. Seeing srflx or relay is not enough to declare the network healthy, because only checks on individual pairs can answer that. And do not blame the network before you have read the agent’s log, or you may send the client’s IT team hunting for a fault that is not theirs.
How should this skill appear on your CV?
The skill belongs on a CV as long as it is specific. When reading voice AI job descriptions, look for the terms WebRTC, TURN and NAT traversal. When describing a project, replace “WebRTC experience” with an account of what the network blocked, which logs proved it and which ports you asked to have opened.
Exercise: block UDP on your own machine
Build a small WebRTC app, or use a provider’s demo, then set a firewall rule on your own machine to block outbound UDP, leaving DNS open. Place a call before TURN/TLS is enabled, and note the candidate types from the probe and whether the call has sound. Then enable TURN/TLS on 443 and call again.
After an evening of this, a silent call is no longer a mystery, because you have caused one yourself. The next time the whole meeting room turns to look at you, you will know which log to open first.
Was this article useful?
Thanks for the feedback!
8 sources
- Introduction to WebRTC protocols - Web APIs | MDN
- RFC 8445: Interactive Connectivity Establishment (ICE)
- RFC 8656: Traversal Using Relays around NAT (TURN)
- RTCIceCandidate: type property | MDN
- WebRTC infrastructure (web.dev)
- Configuring firewalls | LiveKit docs
- Virtual machines | LiveKit docs
- TURN server | WebRTC