Skip to main content
This guide walks you through creating and configuring a Twilio Elastic SIP Trunk to work with Bolna’s Voice AI platform. Twilio’s Elastic SIP Trunking provides cloud-based PSTN connectivity. You will configure termination (for outbound calls), origination (for inbound calls), and associate your Twilio phone numbers with the trunk.

Prerequisites

Make sure you have the following ready before starting:

Twilio Account

A Twilio account is required to create trunks. Sign up for Twilio if you don’t have one. A free trial can be used for initial testing.

Phone Number

You need at least one Twilio phone number. Buy a number from the Twilio Console. This will be associated with your trunk.

Bolna Account

An active Bolna account with SIP trunking access enabled. Contact enterprise@bolna.ai if you don’t have access yet.

Bolna API Key

Your Bolna API key from the Bolna Dashboard. You will need this when registering the trunk on Bolna.
Bolna’s SIP Server IP Address: You will need Bolna’s SIP media server IP throughout this guide: 13.200.45.61. Keep this handy.

Step 1: Create a New SIP Trunk

1

Navigate to Elastic SIP Trunking

Log in to the Twilio Console and navigate to Elastic SIP Trunking > Trunks in the left sidebar. You can also go directly to twilio.com/console/sip-trunking/trunks.
2

Create the Trunk

Click Create new SIP Trunk (or the + button) and enter a friendly name for your trunk:
Bolna Voice AI Trunk
Click Create. Twilio will assign a unique Trunk SID (e.g., TKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx). Note this down for reference.

Step 2: Configure Termination (Outbound Calls)

Termination settings control how Bolna sends outbound calls through Twilio to the PSTN. You need to set up a Termination URI (the address Bolna will call) and configure authentication so Twilio knows the requests are legitimate.
1

Set the Termination URI

Go to the Termination tab in your trunk’s configuration. Enter a unique domain name in the Termination URI field:
bolna-trunk.pstn.twilio.com
Click Save. This URI is the gateway address you will provide to Bolna when registering the trunk.
Choose a descriptive name using dashes for readability. The full format is {your-name}.pstn.twilio.com. This must be unique across all Twilio accounts.
2

Create an IP Access Control List (ACL)

An IP ACL tells Twilio which IP addresses are allowed to send SIP traffic to your trunk. You need to add Bolna’s SIP server IP so Twilio accepts call requests from Bolna.In the Authentication section, find IP Access Control Lists:
  1. Click Create IP Access Control List
  2. Enter a friendly name: Bolna SIP Server
  3. Click Create, then click Add IP Address and fill in:
FieldValueWhat it means
Friendly NameBolna ProductionA label for this IP entry
IP Address13.200.45.61Bolna’s SIP server IP
CIDR32Single IP address (no range)
  1. Save and then associate this ACL with the trunk by selecting it from the dropdown on the Termination page
Without Bolna’s IP in the ACL, Twilio will reject all outbound SIP INVITE requests from Bolna with a 403 Forbidden error. Your calls will fail to connect.
3

Create a Credential List (Recommended)

In addition to IP-based security, Twilio recommends also using credential-based authentication. When configured, Bolna will include a username and password with every outbound call request.In the Authentication section, find Credential Lists:
  1. Click Create Credential List
  2. Enter a friendly name: Bolna Credentials
  3. Add a username (e.g., bolna_trunk) and a strong password
  4. Click Create, then associate the Credential List with the trunk
Save your username and password securely. You will need both when registering the trunk on Bolna. Twilio will not show the password again after creation.
When both an IP ACL and Credential List are configured, Twilio enforces both: the request must come from a whitelisted IP and include valid credentials. This is the most secure setup.

Step 3: Configure Origination (Inbound Calls)

Origination settings control how Twilio delivers inbound calls (calls from the PSTN) to Bolna’s SIP server. This is what enables your AI agent to answer incoming phone calls.
1

Add Bolna's SIP URI as the Origination URI

Go to the Origination tab in your trunk’s configuration. Click Add new Origination URI and fill in:
SettingValueWhat it means
Origination SIP URIsip:13.200.45.61:5060Where Twilio sends incoming calls (Bolna’s server)
Priority10Lower number = higher priority. Use 10 for primary.
Weight10Load balancing weight. Use 10 for a single trunk.
EnabledYesMust be enabled for calls to route
Click Add.
Failover setup: You can add multiple Origination URIs with different priorities. If the primary URI fails (e.g., Bolna’s server is unreachable), Twilio will try the next URI in priority order.
Do NOT add transport=tcp or transport=tls to the URI. Bolna’s SIP server requires UDP transport (the default). Adding TCP or TLS will cause inbound calls to fail.

Step 4: General Settings

These settings apply to the entire trunk and affect both inbound and outbound calls.
1

Disable Secure Trunking (SRTP)

Go to the General tab. Find Secure Trunking and set it to Disabled. Click Save.
This is critical. Bolna does not support SRTP (Secure RTP). If Secure Trunking is left enabled, media negotiation between Twilio and Bolna will fail. Calls may appear to connect, but you will experience no audio or one-way audio.
2

Enable Symmetric RTP

Set Symmetric RTP to Enabled and save. This helps prevent one-way audio issues that can occur due to NAT (Network Address Translation) between Twilio’s and Bolna’s servers.
3

Configure Call Recording (Optional)

If you want Twilio to record calls on its side, choose your preference:
  • Do Not Record (default): No recording on Twilio
  • Record from ringing: Recording starts when the phone rings
  • Record from answer: Recording starts when the call is answered
Bolna also offers its own call recording feature. You can use either or both depending on your needs.

Step 5: Associate Phone Numbers

You need to associate at least one Twilio phone number with your trunk. This tells Twilio to route calls to that number through your SIP trunk instead of handling them with TwiML or Studio.
1

Open the Numbers Tab

In your trunk’s configuration page, click the Numbers tab.
2

Associate an Existing Number

If you already have a Twilio phone number:
  1. Click Associate a Number with this Trunk
  2. Select your phone number from the list
  3. The number’s Voice configuration will automatically be updated to SIP Trunking
One number, one trunk: A Twilio phone number can only be associated with one trunk at a time. Associating it with a new trunk automatically removes it from the previous one.
3

Verify the Number Configuration

To confirm everything is set up correctly:
  1. Go to Phone Numbers > Manage > Active Numbers in the Twilio Console
  2. Click on your number
  3. Under Voice Configuration, confirm that Configure With is set to SIP Trunk and the correct trunk name is shown

Configuration Summary

Here is a complete reference of everything you configured:
SettingValue
Trunk NameBolna Voice AI Trunk (or your chosen name)
Trunk SIDTKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (auto-assigned)
Termination URIbolna-trunk.pstn.twilio.com (your chosen domain)
IP ACLBolna IP 13.200.45.61/32 in Bolna SIP Server ACL
Credential ListUsername + Password (saved securely)
Origination URIsip:13.200.45.61:5060 (Priority: 10, Weight: 10)
Secure TrunkingDisabled (SRTP not supported by Bolna)
Symmetric RTPEnabled
TransportUDP (default)
Associated NumbersYour Twilio phone number(s)

Twilio-Specific Notes

Twilio requires all phone numbers to be in E.164 format (e.g., +12128675309). Numbers without the + prefix will be rejected with a 400 Bad Request response. Bolna’s outbound_leading_plus_enabled setting (default true) automatically ensures the + is prepended to outbound numbers.
For lower latency on outbound calls, you can use Twilio’s region-specific termination URIs instead of the global one. Replace bolna-trunk with your chosen domain name:
RegionURI
N. America (Virginia)bolna-trunk.pstn.ashburn.twilio.com
N. America (Oregon)bolna-trunk.pstn.umatilla.twilio.com
Europe (Ireland)bolna-trunk.pstn.dublin.twilio.com
Europe (Frankfurt)bolna-trunk.pstn.frankfurt.twilio.com
Asia Pacific (Singapore)bolna-trunk.pstn.singapore.twilio.com
Asia Pacific (Tokyo)bolna-trunk.pstn.tokyo.twilio.com
South America (Sao Paulo)bolna-trunk.pstn.sao-paulo.twilio.com
Asia Pacific (Sydney)bolna-trunk.pstn.sydney.twilio.com
For outbound calls, Twilio requires the from_number (caller ID) to be either a Twilio DID number on your account or a verified Caller ID number. If an invalid caller ID is used, Twilio will reject the outbound call.
Trial Twilio accounts have some restrictions: you can only call verified phone numbers, and outbound calls will play a Twilio trial message before your AI agent speaks. Upgrade your account to remove these limitations.
Twilio Elastic SIP Trunking supports call durations up to 24 hours (extended from the default 4 hours). This can be configured per-trunk in the General settings tab.

Next Steps

Your Twilio Elastic SIP Trunk is fully configured. Continue with these guides:

Register Trunk on Bolna

Register your Twilio trunk with Bolna and add your phone numbers via API

Make Outbound Calls

Place outbound calls through your Twilio trunk using Bolna AI agents