Last updated
What is Twilio SIP trunking used for in a Bolna voice agent?
Twilio Elastic SIP Trunking connects your Twilio numbers to a Bolna voice agent, so the agent answers calls on those numbers and calls out from them through your Twilio trunk. It is different from the native Twilio integration, which connects your Twilio account to Bolna as a telephony provider. On the Twilio trunk, Termination carries the calls Bolna places and Origination carries calls to your numbers into Bolna.
How do I set up a Twilio SIP trunk with Bolna?
- In the Twilio Console, open Elastic SIP Trunking and create a trunk. On the Termination tab, set a Termination SIP URI such as
acme.pstn.twilio.com. This is the host Bolna dials. - Under Authentication on the same tab, add a credential list, an IP access control list with
15.252.21.46and13.206.230.198, or both. - On the Origination tab, add
sip:trunk.bolna.ai:5060as the origination URI. Then add your Twilio numbers on the trunk's Numbers tab. - In Bolna, under Deploy, open SIP Trunks, click Create trunk and pick Twilio. Enter your Termination SIP URI in Gateway we dial.
- On the Carrier IPs step, add all eight signalling ranges Twilio publishes, since a call can arrive from any region. Enter the credential list username and password if you made one.
- Add your Twilio numbers in E.164 format, such as
+14155550100, and create the trunk. On the Connection tab, turn on Dial with leading plus. - Assign an agent to each number for inbound calls, and set the agent's Telephony Provider to SIP Trunk for outbound calls.
Every screen is covered in the Twilio SIP trunk setup guide in the Bolna docs.
Which Twilio IP ranges do I add in Bolna?
| Twilio region | Signalling range |
|---|---|
| North America Virginia | 54.172.60.0/30 |
| North America Oregon | 54.244.51.0/30 |
| Europe Ireland | 54.171.127.192/30 |
| Europe Frankfurt | 35.156.191.128/30 |
| Asia Pacific Tokyo | 54.65.63.192/30 |
| Asia Pacific Singapore | 54.169.127.128/30 |
| Asia Pacific Sydney | 54.252.254.64/30 |
| South America Sao Paulo | 177.71.206.192/30 |
In the other direction, Twilio needs Bolna's IPs 15.252.21.46 and 13.206.230.198, codecs PCMU and PCMA, and UDP or TCP on port 5060.
What can you build with Twilio SIP trunking and Bolna?
AI agents on numbers you already own. Add existing Twilio numbers to the trunk and have a Bolna agent answer them, without moving the numbers.
Outbound calling at your Twilio rates. Single calls and batches run through your trunk. The caller ID must be a Twilio number on your account or a caller ID you verified in Twilio.
Gateway failover. Add up to 8 gateways on the Bolna trunk. Bolna tries them in priority order and moves to the next one on a timeout, 408, 478 or 5xx.
Carrier headers in the prompt. Bolna passes P-Asserted-Identity, Diversion, Call-ID and custom X- headers from inbound calls, which you can map to prompt variables.
To connect your Twilio account as a telephony provider instead, see Twilio telephony for Bolna. For any other carrier, see the generic SIP trunk page.