---
title: "Handle Twilio Call"
method: POST
path: "/telephony/call"
tags: ["Telephony"]
---

# Handle Twilio Call

`POST /telephony/call`

Handle inbound calls from Twilio via WebSocket Media Streams.

Flow:
1. Parse Twilio webhook (To, From, CallSid)
2. Lookup customer by To number -> sip_number
3. Get customer's pipecat_agent_id and AgentToken
4. Check agent availability via router API
5. If no agent: return hold music TwiML with <Redirect> to re-check
6. If agent available: return <Connect><Stream> TwiML
7. Twilio opens WebSocket directly to bot -> bot speaks immediately

On hold music redirects (attempt > 1), steps 3-4 (call creation, CNAM, status
callback) are skipped since they were already done on the first attempt.

## Response `200`

Successful Response

- unknown

---

[API](https://skmtc.dev/openintake/apis/fastapi.md) · [All operations](https://skmtc.dev/openintake/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/openintake/fastapi/revisions/b642b91e0a5c/schema)
