The SIP signalling plane is an internal B2BUA with its own built-in registrar.
There is no separate SIP proxy or registrar service to run. Your PBX talks
to it as an ordinary SIP peer.
Option A — Peer with a tenant PBX over SIP
The internal realm reaches your PBX as a SIP peer. You define a trunk whoserealm is internal. You point it at your PBX’s SIP address. You then route
calls across it in either direction. Media is G.711 (PCMU/PCMA) on the wire.
The engine decodes it to the runtime’s PCM16 bus and transcodes it back. Any
PBX that speaks standard SIP + RTP interoperates.
1
Create an internal-realm trunk to the PBX
Add a trunk that matches on the PBX’s source IP (or a DID map) and carries
its SIP/RTP addressing. Set
realm: "internal" so the engine treats the
trunk as a trusted peer, not as a carrier edge. Internal-realm INVITEs
bypass the registrar ACL. Trunks are sealed at rest and hydrated to the
engine. See
SIP Trunking and the
full field list in admin trunks.2
Send calls from the PBX to an agent
In your PBX dialplan, route the extensions or DIDs that you want AI-handled
to the trunk. In Asterisk, that is a
Dial(PJSIP/${EXTEN}@pbx-hq). In
FreeSWITCH, that is a bridge to the gateway. The INVITE lands on the SIP
gateway, which resolves the trunk by source IP. Because inbound_rule is
HANDLE_AI, the gateway starts the bound agent and answers with early
media. The answer sequence is 100 Trying → 183 with SDP → 200 with the same
SDP. An SDP-less 180 makes some carriers drop the call, so the gateway
always offers early media.3
Send calls from an agent back to the PBX
Outbound originations and transfers can target the same trunk. An AI
agent can therefore hand a caller to a PBX extension — a human on a
deskphone that the PBX already manages. Use the SDK’s
Calls.originate
with the pbx-hq trunk_id, or use an in-call transfer. The platform
sends a blind or attended transfer as SIP REFER.- TypeScript
- Python
Inbound peer
REFER (RFC 3515) is acknowledged (auto-202), and it emits a
transferred lifecycle event. But execution of the outbound leg from a
PBX-originated REFER is only partially implemented. Platform-side
operator-initiated transfer (the SDK transfer call above) is fully wired.
Drive transfers from the platform side for now.Option B — Route through the built-in ACD
The ACD is Avaya-shaped. A VDN maps an inbound number to an entry point. A vector runs an IVR program. Skill queues distribute matched calls to agents. The ACD works for AI agents, human agents, or a warm AI→human handoff in the same queue.The routing objects
VDN
Maps a DID to a routing entry point, plus a
default_skill_id /
default_hotline_id. An inbound number lands here before any IVR.Vector
The IVR program: an ordered list of steps —
announcement, wait, collect_digits, check_skill, queue_to_skill,
route_to_vdn, goto_step, busy, disconnect.Skill
A competency tag. Agents are members of skills. The ACD queues calls to a
skill, and the picker matches the best available agent.
Queue / callback
A queued request carries a
queue_priority (1–4). It moves through
queued → matched → accepted → completed, or ends at abandoned /
expired.Wire up a queue
1
Define a VDN for the number
Point the DID at a VDN with a default skill. Manage VDNs, vectors, skills,
and hotlines from the voice console at
agent.clutchcall.dev. The
corresponding admin API routers back the same objects.2
Author the vector (IVR)
Sequence the caller experience: play an announcement, optionally
collect_digits, then queue_to_skill. The prompt-playback service
renders announcements from pre-recorded 8 kHz prompt clips. There is no
TTS or GPU in the IVR path, so prompts are deterministic and low-latency.3
Choose a distribution algorithm
The picker supports Avaya-style algorithms:
ead_mia (expected-agent-delay
with most-idle-agent, the default), mia, ucd (round-robin), loa,
lar, and manual. Set the algorithm per skill.4
Let agents accept offered calls
The ACD offers a queued call to a picked agent. The agent accepts, and the
media bridges. Browser softphone agents accept over their control channel.
SIP deskphone agents are rung with an INVITE. The accept signal is unified
across both endpoint types. Unaccepted offers re-queue (RONA) with a
first-wins glare guard.
Human agent endpoints
An agent can be a browser softphone, a real SIP deskphone/softphone, or a PSTN callback. SIP-phone agents REGISTER to the internal registrar with their AOR credentials (sealed at rest). On an ACD claim, the gateway looks up the registration, sends the INVITE, and bridges RTP on the caller’s own shard. The ring strategy isall or first. The gateway transcodes PCMU↔PCMA as
needed. This is how the ACD puts a call on a deskphone that your PBX would
otherwise own — without the PBX in the path. See
Number Provisioning
for the per-tenant <workspace-id>.sip.clutchcall.dev domain that agents
register against.
Let an AI agent hand off into a queue
A tool bridges the two worlds. An AI agent in the runtime can call the route-to-skill telephony tool to place the live caller into an ACD queue for a human. This is the platform’s warm-handoff pattern for regulated verticals: the LLM does intake, qualification, and compliance capture, then routes to a human before audio cuts in.The ACD data model, picker algorithms, queue/accept flow, and SIP-phone agent
endpoints are shipped. The DID “buy a number” catalog is currently a demo
stub. Import existing numbers, or point real DIDs from your carrier / PBX. Do
not rely on the in-console number search. See
Number Provisioning.
Which one should you use?
Peer with your PBX
The PBX still answers the PSTN and owns extensions and voicemail. You hand
selected calls to agents over a SIP trunk. You can transfer calls back to
PBX extensions. This is the lowest-friction way to add AI to an existing
deployment.
Built-in ACD
The platform owns the number, IVR, queues, and agents (AI + human). Use it
when you want the contact-center brain — skills, VDN vectors, and warm
AI→human handoff — to live here.
Related
SIP Trunking
Trunk fields, realms, and carrier interop.
AI-to-Human Handoff
How the live-call handoff bridges audio.
Migrate from Asterisk / FreeSWITCH
Full cutover: re-point trunks and agents.

