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, point it at your PBX’s SIP address, and route calls
across it in either direction. Media is G.711 (PCMU/PCMA) on the wire, decoded
to the runtime’s PCM16 bus and transcoded back — so any PBX that speaks
standard SIP + RTP interoperates.
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 trunk is treated as a
trusted peer rather than 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.Send calls from the PBX to an agent
In your PBX dialplan, route the extensions or DIDs you want AI-handled to
the trunk. In Asterisk that’s a
Dial(PJSIP/${EXTEN}@pbx-hq); in FreeSWITCH
a bridge to the gateway. The INVITE lands on the SIP gateway, resolves the
trunk by source IP, and — because inbound_rule is HANDLE_AI — 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.Send calls from an agent back to the PBX
Outbound originations and transfers can target the same trunk, so an AI
agent can hand a caller to a PBX extension (a human on a deskphone the PBX
already manages). Use the SDK’s
Calls.originate with the pbx-hq
trunk_id, or an in-call transfer. Blind/attended transfer from the platform
side is issued as SIP REFER.- TypeScript
- Python
Peer
REFER (RFC 3515) inbound is acknowledged (auto-202) and surfaces a
transferred lifecycle event, but executing 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, and skill queues distribute matched calls to agents. It 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. This is where an inbound number lands 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; calls are queued to a skill
and the picker matches the best available agent.
Queue / callback
A queued request carries a
queue_priority (1–4) and moves through
queued → matched → accepted → completed (or abandoned / expired).Wire up a queue
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.telequick.dev (the
corresponding admin API routers back the same objects).Author the vector (IVR)
Sequence the caller experience: play an announcement, optionally
collect_digits, then queue_to_skill. Announcements are rendered from
pre-recorded 8 kHz prompt clips by the prompt-playback service — there is no
TTS or GPU in the IVR path, so prompts are deterministic and low-latency.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 it per skill.Let agents accept offered calls
A queued call is offered 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, and 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. Ring strategy isall or first; PCMU↔PCMA is transcoded as needed. This is how the
ACD puts a call on a deskphone your PBX would otherwise have owned — without the
PBX in the path. See
Number Provisioning
for the per-tenant <workspace-id>.sip.telequick.dev domain that agents
register against.
Let an AI agent hand off into a queue
The bridge between the two worlds is a tool. An AI agent running the runtime can call the route-to-skill telephony tool to place the live caller into an ACD queue for a human — the platform’s warm-handoff pattern for regulated verticals, where 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 rather
than relying on 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/voicemail. You hand
selected calls to agents over a SIP trunk and can transfer back to PBX
extensions. 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.