sid unchanged:
attach an agent, open an audio bridge, transfer, or hangup. For the full
answer sequence and routing model, read
Inbound calls. Each snippet
assumes a Voice client:
- TypeScript
- Python
Route a number to an AI agent
This is the common case. Point a number or trunk at a server-side agent, and you are done. The gateway answers, attaches the runtime, and connects both audio legs. Your process never touches the media. On a native core, set the trunk’s inbound rule toHANDLE_AI. For TypeScript apps, do this in the console
at agent.clutchcall.dev instead.
- Python (native core)
- Go (native core)
set_inbound_routing is a low-level RPC on the native SDK cores (Python, Go,
Rust). The browser/TypeScript SDK does not carry it. Configure inbound routing
in the console or in your provisioning pipeline. Then handle the resulting call
with the high-level Voice client. See
Build a voice agent.Attach an agent to a live inbound call
You possibly already have thesid from a webhook or your event stream. You can
bind an agent to it in the middle of the call, for example after your own IVR
gathers intent. The engine connects the bridge for you.
- TypeScript
- Python
Route to a human or a skill queue
To send callers to people, point the number at a skill queue or an IVR program (VDN) instead of an agent. This is configuration, with no media code. The gateway answers and runs your IVR steps. The ACD then picks the next eligible agent on a browser softphone or a real SIP deskphone.PBX / ACD
Skills, VDNs, IVR vectors, and the agent picker behind human routing.
AI → human handoff
Answer with AI to qualify the caller, then warm-transfer to a person.
Bridge caller audio into your own code
When you want your own service to drive the call, set the inbound rule toNOTIFY_AND_HANGUP. The flow is:
- The gateway tells your app about each incoming call.
- You answer the call.
- You subscribe
uplinkto hear the caller. - You publish
downlinkto talk back. Both go through an audio bridge on thatsid.
- Python (native core)
- TypeScript (bridge by sid)
The
attach bridge is written from the server’s point of view. You
subscribe uplink and publish downlink. This is the same handle that
an outbound call gives you. Configure a webhook_url to receive incoming-call
events. See Webhooks.Pick a codec to skip transcoding
For a PSTN-direct call, ask for G.711. The bridge then passes the caller’s audio through without transcoding. Ask forpcm16 when a realtime model wants raw
audio.
Play a greeting back to the caller
Push encoded frames ontodownlink as your TTS produces them. See
Speak back to the caller.
- TypeScript
- Python
Transfer an inbound caller
The samesid continues across a transfer. For this reason, any recording or
analytics keyed on the sid stay intact. See
Transfer to a human.
Hang up and clean up
End the call. Then release the bridge to close both tracks.Related
Inbound calls
The full guide: how the gateway answers and where routing decisions live.
Stream to your ASR
Feed caller uplink into your own recognizer.
Place an outbound call
The mirror of this page: originate from code.
Audio bridge API
Full signatures for attach, publishDownlink, and onUplink.

