Skip to main content
TurnCall supports browser-based voice calls via WebRTC using Pipecat’s SmallWebRTCTransport. Audio flows peer-to-peer at 16kHz.

SDP Signaling

Connect

Send an SDP offer and receive an answer:
curl -X POST http://localhost:8090/v1/webrtc/connect \
  -H "Authorization: Bearer tc_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "sdp": "v=0...",
    "type": "offer",
    "requestData": {
      "agent_id": "AGENT_UUID"
    }
  }'

ICE Trickle

curl -X PATCH http://localhost:8090/v1/webrtc/connect \
  -H "Authorization: Bearer tc_xxx" \
  -H "Content-Type: application/json" \
  -d '{"candidate": "...", "sdpMid": "0", "sdpMLineIndex": 0}'

Dynamic Routing

Pass server_url in requestData for pre-call initialization:
{
  "sdp": "v=0...",
  "type": "offer",
  "requestData": {
    "server_url": "https://your-server.com/turncall/init"
  }
}
See Pre-Call Init for response format.

Browser Client

See the examples/webrtc-client/ directory for a complete browser client using Pipecat JS SDK + WebRTC.

Video Avatar

WebRTC cascade agents can add a lip-synced video avatar (HeyGen or Tavus). See Video Avatar.