transfer,
hangup — works on an inbound sid unchanged. 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
The common case: point a number (or trunk) at a server-side agent and you are done — the gateway answers, attaches the runtime, and wires both audio legs. Your process never touches the media. Set the trunk’s inbound rule toHANDLE_AI on a native core; for TypeScript apps, do this in the console at
agent.telequick.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 doesn’t carry it — configure inbound routing in
the console (or 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
Already have thesid (from a webhook or your event stream)? Bind an agent to it
mid-call — e.g. after your own IVR gathers intent. The engine wires 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 — configuration, no media code. The gateway answers, runs your IVR steps, and the ACD 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 gateway tells your app about each incoming call, you
answer it, then subscribe uplink (hear the caller) and publish downlink (talk
back) through an audio bridge on that sid.
- 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 — the same handle 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 and the bridge passes the caller’s audio through untranscoded. 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, so any recording or analytics keyed on
it stay intact (see Transfer to a human).
Hang up and clean up
End the call, then release the bridge to tear down 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.