A different precondition than SIP trunks: what WebRTC requires from browser voice agents
If you only ever designed your callbot loop inside the PSTN, SIP trunk failover was enough. A voice agent that connects directly from a browser or mobile app, though, moves its media over WebRTC. In March 2026, AWS added WebRTC bidirectional streaming to Bedrock AgentCore Runtime, and the announcement was explicit on two points: the feature first ships in only 14 AWS Regions, and media cannot flow at all without a TURN relay in place. The options are Kinesis Video Streams' managed TURN (credentials issued through the GetIceServerConfig API), a third-party TURN provider, or self-hosted TURN such as coturn on EC2 or ECS — and whichever you pick, the VPC has to allow outbound UDP to the TURN endpoint before a connection can even form.
How a single TURN server becomes the whole call's single point of failure
ICE first tries a direct connection using host or server-reflexive candidates, and only falls back to a TURN-relayed candidate when that direct path is blocked. Inside corporate networks and many carrier NATs, direct UDP paths are blocked often enough that a meaningful share of sessions end up depending on the relay candidate — and when the TURN server listed in the ICE server config goes down or saturates, that session's audio drops with no other path to take. SIP trunk failover works by moving to one of several carrier routes; on the WebRTC side, the ICE server list handed over at connection setup is the entire recovery path. Register only one TURN endpoint, and that one endpoint becomes the single point of failure for the whole browser voice agent channel.
From design to monitoring: building a WebRTC TURN relay recovery system
Start by pinning numbers at design time rather than leaving them implicit: finish ICE candidate gathering and connectivity checks within 3 seconds, detect a TURN allocation failure or response delay within 2 seconds, and complete the switch to a backup TURN server within 1 second. Set a baseline of 99.5% monthly session-establishment rate — the share of attempts that connect and exchange a first audio frame — and treat any week that falls under that line as the signal to re-examine the TURN chain.
The most commonly missed pattern is listing only a single TURN server in the ICE server config. If the region or availability zone that TURN sits in goes down, every session depending on the relay drops at the same time, which is why you need at least two TURN servers from different regions or providers in the list, so ICE negotiation has a second candidate to try in order.
A second pattern is setting a TURN credential's TTL shorter than the expected call length. Credentials issued through an API like GetIceServerConfig trigger an ICE restart if they expire mid-call, and if a fresh credential isn't already renewed ahead of that point, the renegotiation itself fails and the audio stays dropped.
Before shipping, force a VPC outbound UDP block, a TURN outage, and a credential expiry, each as its own scenario test, to confirm ICE renegotiation and the backup switch both complete within the times you designed. Logs need the candidate pair type (host, server-reflexive, or relay), the selected TURN server ID, round-trip time, and the renegotiation count as required fields.
As relayed sessions grow, so does the bandwidth cost of traffic passing through the TURN server, so keep relay rate and cost on the same dashboard. Because call audio is structurally forced through the TURN server as an intermediary, confirming that DTLS-SRTP end-to-end encryption still holds across the relayed hop belongs on the pre-launch checklist — it's not optional.
Weekly, tally average latency and relay failure rate per TURN server and re-rank them; a TURN endpoint in a given region that's repeatedly slow should drop down the chain. For the extreme case where a corporate firewall blocks even TURN over TLS on port 443, keep a PSTN or SIP fallback line available for when WebRTC can't connect at all — that belongs in this same improvement loop.
What to check right now
The WebRTC path for a browser or mobile voice agent starts with not betting all of your recovery on a single TURN relay. List multiple TURN servers from different regions in the ICE server config, renew credentials ahead of expected call length rather than after, and log candidate type and renegotiation counts to adjust the chain weekly — do that, and one TURN server going down no longer takes the entire callbot session with it.
References
Amazon Bedrock AgentCore Runtime adds WebRTC support for real-time bidirectional streaming — AWS
Bidirectional streaming with WebRTC — Amazon Bedrock AgentCore Developer Guide
Ask AI about this article
The assistant has read this article. Ask anything — it answers from the text and says so when something isn't in it.
Loading the chat…