Skip to main content
A phone number is the entry and exit point for voice calls. Each number carries two independent slots — one inbound agent version and one outbound agent version — and is attached to exactly one trunk that brokers connectivity to the carrier. Calls flow over SIP through LiveKit, so the same number can answer incoming calls with one agent and originate outbound calls with another.

The model

Three objects make up the telephony layer: A phone number record (/core/phone-numbers) has two slots that are set independently: Setting one slot does not affect the other. A number can answer inbound calls without ever placing outbound calls, and vice versa.
Agents are reached over SIP. Each org has a dedicated inbound trunk that hosts agent SIP endpoints of the form sip:<agent-uuid>@<host>, and LiveKit bridges the carrier leg to the agent leg.

Trunks: managed vs BYOC

Every number sits on a trunk. There are two kinds.
Managed trunks cannot be created, updated, or deleted through the API, and you cannot create a phone number directly against a managed trunk — buy numbers through the managed account instead. BYOC trunks you own are fully editable.
A BYOC outbound configuration carries the carrier’s SIP details:

Getting numbers

There are two ways to get a number onto a trunk:
Search the shared Anyreach Twilio account and purchase a number. Search defaults to country_code US and number type local; the search filters voice, SMS, MMS capability, area code, region, and postal code. Purchased numbers land on your managed trunk automatically.

Inbound routing

Once a number has an inbound agent version, every call to it reaches that agent. For static routing, that is all you need — the number maps to one agent. For dynamic routing, configure an inbound routing config for the org. It runs a workflow_definition at call time to pick the agent, with a fallback_agent_id / fallback_agent_version used when the workflow does not select one. There is one config per org, and it has an enabled flag (default true).

Next steps

Buy a number

Search the Anyreach Twilio account and purchase a US local, voice-enabled number.

Assign agents to numbers

Set the inbound and outbound agent-version slots on a number.

Inbound routing

Route incoming calls statically or with a routing workflow.

SIP and BYOC

Bring your own carrier with a SIP trunk and import existing numbers.