Skip to main content
SIP trunking connects your existing telephony infrastructure directly to Cartesia Agents, so your agents can take and place calls on numbers from your own carrier.

Cartesia SIP endpoint

Point your carrier’s origination at Cartesia’s SIP endpoint using the transport your carrier supports. TLS encrypts call signaling.
If your carrier or firewall restricts SIP signaling by IP address, contact support@cartesia.ai for Cartesia’s static IP ranges to allowlist.

How SIP trunking works

Inbound calls

Your carrier sends traffic to Cartesia’s SIP endpoint. Cartesia routes each call to the agent assigned to the dialed number.

Outbound calls

Cartesia places calls through your carrier’s SIP endpoint. Your carrier determines the caller ID shown to the recipient.

Authentication

Restrict inbound traffic with digest authentication, a source-IP allowlist, or both.

Signaling and media

Call setup uses TCP or TLS. The media_encryption setting controls SRTP negotiation for call audio: disabled, allowed, or required.

Configure your carrier

Complete these steps with your carrier before registering the trunk with Cartesia.
1

Point origination at Cartesia

For inbound calls, set the trunk’s origination URI to the Cartesia SIP endpoint for your transport.
2

Restrict inbound traffic

Configure digest credentials, or collect your carrier’s SIP signaling IP ranges to use as allowed_addresses.
3

Accept outbound calls from Cartesia

Configure your carrier to accept calls from Cartesia with credentials or another authentication method it supports. If your carrier or firewall restricts SIP traffic by IP address, allowlist Cartesia’s static IP ranges.
4

Enable encryption

If you use TLS with media_encryption: required, enable secure trunking and SRTP with your carrier. Configuring Cartesia alone does not enable encryption on the carrier side.
Do not leave credentials, allowed_addresses, and allowed_numbers all empty on an inbound trunk. Configure at least one access-control method before accepting calls.
Twilio Elastic SIP Trunking does not support digest authentication for inbound origination. Use allowed_addresses with Twilio’s current signaling IP ranges. For outbound calls with TLS and required media encryption, enable Secure Trunking and create a matching credential list in Twilio.
Once the carrier side is configured, register the trunk with Cartesia. The example uses digest authentication in both directions. Replace the hostname and credentials with the values configured at your carrier. See Create Provider for every field.
The response contains the provider id and the trunk configuration without passwords. Each configured username is returned as auth_username.

Import a number

Import a carrier number using the provider id from the previous step. See Import Phone Number for every field.
Expected response:

Assign to an agent

Assign the imported number to an agent so inbound calls are routed to it, from the number’s detail page in the Playground or through the Phone Numbers API. To assign in the same request as the import, pass agent_id to Import Phone Number.

Transfer calls

Cartesia supports cold transfers to E.164 phone numbers and SIP URIs over SIP REFER. Enable Transfer call in the Playground, or configure the transfer_to_number system tool through the API. Each rule can target a phone number or a direct SIP address such as sip:user@host. Cartesia sends phone destinations as tel:+E.164 and SIP destinations as the configured URI. Your carrier must support SIP REFER transfers to the selected destination type. For Twilio Elastic SIP Trunking, set the trunk’s transfer mode to enable-all. If the carrier rejects the transfer, Cartesia keeps the original call connected.

Place outbound calls

Use the imported number as from_number_id when you place an outbound call. Cartesia places the call through the configured trunk, and your carrier determines the caller ID shown to the recipient.