Skip to main content

How Phone Numbers Work

Phone numbers are the bridge between the public telephone network (PSTN) and your AI agents. When someone calls your number, the call flows through your telephony provider and LiveKit’s SIP gateway to reach your agent.

Provisioning a New Number

1

Choose a Provider

Twilio

Best for US/Canada numbers. Largest global coverage. Easy SIP trunk setup with automatic binding.

Vonage

Competitive international rates. SIP trunk setup requires application + termination URI configuration.
2

Search Available Numbers

  1. Go to Phone NumbersPurchase
  2. Select your provider and country
  3. Enter an area code (optional)
  4. Browse available numbers
3

Purchase and Auto-Provision

Click Purchase on a number. The system automatically:
  1. Buys the number from the provider
  2. Creates an Inbound SIP Trunk on LiveKit
  3. Creates a Dispatch Rule to route calls to your agent worker
  4. Creates an Outbound SIP Trunk for outgoing calls
  5. Saves the configuration to your workspace
All three LiveKit resources (inbound trunk, dispatch rule, outbound trunk) are created automatically. No manual SIP configuration needed.
4

Map to an Agent

After purchase, map the number to an agent:
  1. Click Map to Agent next to the number
  2. Select the agent from the dropdown
  3. Inbound calls to this number will now be handled by the selected agent

Registering an Existing SIP Trunk

If you already have a SIP trunk from another provider:
1

Gather SIP Credentials

You’ll need:
  • SIP address (domain)
  • Phone number (E.164 format: +1XXXXXXXXXX)
  • Auth username and password (if required)
2

Register the Trunk

Go to Phone NumbersRegister SIP Trunk and fill in:
FieldExampleRequired
SIP Addresssip.provider.com
Phone Number+16505551234
ProviderCustom
Auth Usernamemy_sip_userOptional
Auth Passwordmy_sip_passOptional
Krisp EnabledtrueOptional
Label”Main Office Line”Optional
When updating a SIP trunk’s configuration, the system deletes the old LiveKit resources and creates new ones. There may be a brief interruption during this process.

Managing Phone Numbers

ActionHow
View all numbersPhone Numbers page — shows all provisioned numbers with their status and mapped agent
Map to agentClick the number → select an agent
Update configClick the number → edit SIP address, auth credentials, or krisp settings
DeleteClick delete — removes the LiveKit trunks and the database record

SIP Trunk Anatomy

Each phone number creates three LiveKit resources:
ResourcePurpose
Inbound TrunkTells LiveKit to accept SIP calls from this number
Dispatch RuleRoutes matched calls to an available agent worker
Outbound TrunkAllows the agent to make outgoing calls via this number