Voice AI agent stack · L2 · 20 min
Telephony and WebRTC
Learn in five minutes
- The W3C WebRTC Recommendation of 13 March 2025 defines APIs so media can be sent to and received from another browser or device.
- Wikipedia's WebRTC page says the API does not include signaling, and that an application may use SIP or another protocol.
- RFC 3261 defines SIP, the Session Initiation Protocol.
- The xAI Speech to Speech page says you can connect via SIP, WebSocket, or LiveKit, and names native G.711 μ-law and A-law support.
- That page says PSTN, contact-center, or PBX calls can be routed into a session. This lab places no call.
WebRTC carries media. SIP is a signaling protocol. Put them in different boxes. Leave the API key off the page.
Visual
Two boxes, no call
- Box 1: WebRTC, media in the browser, from the W3C Recommendation.
- Box 2: SIP, signaling, from RFC 3261.
- A note: xAI's page also names WebSocket and LiveKit as ways to connect.
- Stop. Do not open a socket and do not buy a number.
Quiz
Ecosystem
- Signaling
- How the ends find each other. WebRTC's Wikipedia page says the media API does not include it.
Sisters: Speech-to-text, Language model, Text-to-speech, WebRTC, SIP.
A cascaded pipeline and a speech-to-speech model are two shapes the LiveKit docs name. The xAI Speech to Speech API is a hosted speech-to-speech session.
Pin the model id, the voice, and the date you read the docs.
Config
- Write the goal in one sentence.
- Name the input and the allowed output.
- Save the trace next to the result.
Troubleshooting
- The answer looks fluent and is wrong. Check whether a source passage actually contains the claim.
- The loop never stops. Set a step cap and stop when the tool result repeats.
Sources and go deeper
- W3C, WebRTC Recommendation, 13 March 2025 spec last checked 2026-10
- WebRTC — Wikipedia wikipedia last checked 2026-10
- RFC 3261, SIP: Session Initiation Protocol spec last checked 2026-10
- Speech to Speech, docs.x.ai vendor The page title is Speech to Speech. The body names the Grok Speech to Speech API and also calls the site SpaceXSI Docs. last checked 2026-10