Voice
Telephony & WebRTC
How audio actually reaches the agent: phone networks (SIP) or browsers and apps (WebRTC).
What it is and why it exists
Phone calls arrive via SIP trunks or providers (Twilio, Telnyx) at 8 kHz audio; browsers and apps use WebRTC with better audio, echo cancellation and NAT traversal; WebSockets are simpler but worse on bad networks.
Quick prototype
Browser mic over a WebSocket.
In production, at scale
WebRTC via a media server for apps, SIP integration for phone, call transfer to humans, recording consent handling, and regional media servers to cut latency.
Vendors and tools
| Twilio / Telnyx | Telephony |
|---|---|
| LiveKit / Daily | WebRTC infrastructure |
On AWS: Amazon Connect, Chime SDK (WebRTC), Kinesis Video Streams.
How it fails
- Ignoring call-recording consent laws
- Media server far from users
What the interviewer asks next
WebRTC or WebSockets for voice?
WebRTC: built for real-time media over lossy networks, with echo cancellation and jitter buffers. WebSockets are simpler but TCP head-of-line blocking hurts on bad connections.