Skip to main content
POST
Register Phone Number

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

agent_id
string<uuid>
required

Body

application/json

Request to register a phone number for an agent.

Provide phone number and trunk details - LiveKit handles the SIP infrastructure.

For LiveKit phone numbers (provider='livekit'):

  • Purchase your number through LiveKit Cloud dashboard first
  • No trunk configuration needed - LiveKit manages the infrastructure
  • Just provide the phone number and it will be configured automatically

For external providers (twilio, vonage, etc.):

  • You must own the number already
  • SIP trunk configuration is required
  • You'll receive a SIP URI to configure in provider's dashboard

IMPORTANT FOR VONAGE USERS: Vonage Elastic SIP Trunking requires your trunk domain in the outbound_address. Format: {your-trunk-domain}.sip-{region}.vonage.com Example: mrassistant-developer.sip-us.vonage.com Find this in Vonage Dashboard → SIP Trunks → Your Trunk → Outbound Calling section.

phone_number
string
required

E.164 format phone number (e.g., +15551234567)

provider
string
required

SIP provider: livekit, twilio, vonage, telnyx, bandwidth, or custom

trunk_numbers
string[] | null

Phone numbers on this trunk (defaults to [phone_number])

allowed_addresses
string[] | null

Allowed IP addresses (empty = allow all)

allowed_numbers
string[] | null

Allowed caller numbers (empty = allow all)

auth_username
string | null

SIP authentication username (REQUIRED for Vonage outbound)

auth_password
string | null

SIP authentication password (REQUIRED for Vonage outbound)

enable_outbound
boolean
default:false

Enable outbound calling (frontend may also send as 'outbound_enabled')

outbound_address
string | null

Provider's SIP termination URI for outbound calls. REQUIRED for outbound calling. Get this from your provider's dashboard. Examples: - Vonage: sip-us.vonage.com - Twilio: pstn.twilio.com - Telnyx: sip.telnyx.com

outbound_numbers
string[] | null

Phone numbers for outbound caller ID

outbound_transport
string
default:AUTO

SIP transport protocol: AUTO, UDP, TCP, or TLS

Pattern: ^(AUTO|UDP|TCP|TLS)$
destination_country
string | null

Two-letter country code (e.g., 'US', 'IN'). Required for India compliance.

Required string length: 2
media_encryption
string
default:ALLOW

Media encryption: DISABLE, ALLOW, or REQUIRE (ALLOW recommended)

Pattern: ^(DISABLE|ALLOW|REQUIRE)$
krisp_enabled
boolean
default:true

Enable Krisp noise cancellation for better call quality

ringing_timeout_seconds
integer
default:30

Maximum time for call to ring (1-300 seconds)

Required range: 1 <= x <= 300
max_call_duration_seconds
integer
default:3600

Maximum call duration (60-86400 seconds)

Required range: 60 <= x <= 86400
hide_phone_number
boolean
default:false

Hide caller phone number from participant attributes for privacy

custom_headers
Custom Headers · object | null

Custom SIP X-* headers to include in requests

headers_to_attributes
Headers To Attributes · object | null

Map SIP headers to participant attributes

dtmf_config
Dtmf Config · object | null

DTMF and IVR configuration

Example:
transfer_config
Transfer Config · object | null

Call transfer configuration

Example:
agent_features
Agent Features · object | null

Agent-specific telephony features

Example:
metadata
Metadata · object | null

Additional metadata

provider_config
Provider Config · object | null

Provider-specific configuration (stored in database as JSON)

Response

Successful Response

Response for phone number registration.

agent_id
string
required
phone_number
string
required
provider
string
required
sip_uri
string
required
dispatch_rule_id
string
required
outbound_enabled
boolean
required
status
string
required
created_at
string
required
instructions
Instructions · object
required
outbound_trunk_id
string | null

LiveKit outbound trunk ID if outbound is enabled

outbound_address
string | null

SIP address used for outbound calls (e.g., sip.telnyx.com)

provider_config
Provider Config · object | null
room_pattern
string | null

LiveKit room naming pattern for this agent's calls

livekit_sip_domain
string | null

LiveKit SIP domain for this deployment

inbound_addresses
string[] | null

LiveKit inbound SIP server addresses

supported_providers
Supported Providers · object[] | null

List of supported SIP providers with default addresses