Create a SIP trunk, give your carrier the values Bolna needs, add carrier IPs, gateways and numbers, then confirm the connection with a test call.
This guide takes you from nothing to a working trunk: you create the trunk in Bolna, set Bolna’s values in your carrier’s console, and place a test call in each direction.
In the sidebar, under Deploy, open SIP Trunks and click Create trunk. If your account still has legacy SIP trunks, that page lists them: click Open new SIP trunks first.
The SIP Trunks page
2
Pick your carrier
The Provider step asks Which carrier is this trunk for? Pick Plivo, Telnyx, Twilio, Exotel, Vobiz, Vonage, or Custom for any other carrier. Then fill in:
Trunk name, a label only you see.
Channels, the number of simultaneous calls the trunk allows. The default is 10.
Gateway we dial, the host Bolna sends outbound calls to. The Telnyx and Exotel presets fill this in. For the others, enter the host your carrier gave your account; the field shows the expected shape.
Click Continue.
Provider step with the Plivo preset
3
Add your carrier's IPs
The Carrier IPs step asks Which addresses does your carrier call from? Add every signalling IP or CIDR range your carrier publishes, one at a time. Bolna accepts an inbound call only from these addresses. The Plivo and Exotel presets prefill the addresses those carriers publish, and every preset links to its carrier’s IP page.Under Carrier credentials (optional), enter the Username and Password only if your carrier issued them for the calls Bolna places. Enter both or neither. Click Continue.
Carrier IPs step
4
Add your numbers
The Numbers step asks Which numbers arrive on this trunk? Enter each number in E.164 format, starting with +, and click Add. This step is optional; you can add numbers later. Click Continue.
Numbers step
5
Review and create
The Review step summarizes the trunk and shows the first thing to do in your carrier’s console for each direction. Click Create trunk. The trunk page opens, and its health reads Waiting for carrier until the first call crosses it.
Open the trunk’s Overview tab. Under Carrier setup, the Inbound, carrier to Bolna and Outbound, Bolna to carrier cards list every value your carrier needs, each with a copy button. Expand the steps under each card, for example Plivo inbound trunk steps, for a checklist written for your carrier’s console.
Set these on your carrier’s origination (inbound) trunk:
Setting
Value
Origination URI
sip:trunk.bolna.ai:5060 for UDP, or sip:trunk.bolna.ai:5060;transport=tcp for TCP
If the carrier accepts only an IP
15.252.21.46, port 5060
Number format
E.164, with or without the +
Codecs
PCMU and PCMA. Turn off any others, such as G.729.
DTMF
RFC 2833
Your carrier must send each INVITE with an SDP offer, from an address on the trunk’s carrier IPs. Assign your numbers to this origination trunk in the carrier’s console.
The trunk’s Connection tab holds both directions. Changes take effect on live traffic.
The Connection tab
Inbound: carrier IPs. Click Add IP to add an address or CIDR range. Changes apply within 5 seconds. Each entry must be a public IPv4 address or range, no broader than /16, and a trunk holds up to 32. With no carrier IPs, every inbound call is refused.Outbound: gateways. Click Add gateway and enter the Host, Port and Priority. A trunk holds up to 8 gateways, tried in priority order, lowest first. The host must be a public IPv4 address or a DNS name. If a gateway times out, answers 408 or 478, or answers with a 5xx, Bolna tries the next gateway. Any other answer, such as busy, a decline or no answer within 60 seconds, ends the call.
Dial with leading plus sends the number you call as +<digits>. Off, the default, sends the digits alone. Pick whichever your carrier expects.
Carrier credentials holds the username and password Bolna sends when your carrier challenges an outbound call with 401 or 407. The password is stored encrypted and never shown again.
Advanced. Click Edit to change the Transport (UDP or TCP) Bolna uses to reach your gateways, the Channels, and the Codecs (PCMU, PCMA, or both). DTMF is always RFC 2833.
If another trunk on Bolna dials the same gateway host or address, both trunks must have carrier credentials. Without them, the carrier cannot tell the trunks apart by Bolna’s shared IPs, so Bolna refuses the gateway with 409 gateway_conflict.
Number is the number in E.164 format, starting with +.
Destination key is the called number exactly as your carrier puts it in the Request-URI. Leave it blank to use the number’s digits without the +. Set it when your carrier sends something else, such as a national format.
An inbound call matches a number when the called number equals the E.164 number, with or without the +, or equals the destination key. A number can be on only one trunk at a time; adding one that is already on a trunk fails with 409 number_taken.
The trunk tests itself without an agent. Open the Activity tab, or click Test trunk at the top of the trunk page.
1
Test inbound
Under Test inbound, click Start listening, then dial the number shown from any phone within five minutes. Bolna answers and plays your voice back to you about a second later. While the trunk is listening, the next call to any of its numbers reaches the test instead of your agent. Stop listening cancels the test before a call arrives.
2
Test outbound
Under Test outbound, enter a phone number you can answer and click Place echo call. Bolna calls it from the trunk’s first number, through its gateways in priority order. Answer, speak, and you hear yourself about a second later. The call ends after a minute.
3
Read the result
Each test shows its state, ending in Completed or Failed. A failed test shows the SIP code and cause the carrier returned. See Troubleshooting for what each one means.
Self-tests on the Activity tab
A trunk runs one test at a time and allows five tests every ten minutes. A test uses one of the trunk’s channels while it runs. Tests do not appear in Call History or under Recent calls, and they do not change the trunk’s health, which stays Waiting for carrier until a real call crosses the trunk.
preset records which carrier template the trunk came from. The API does not fill any values from it; send the gateways, transport and carrier IPs yourself.
transport is udp (the default) or tcp.
codecs is PCMU, PCMA, or both, comma-separated.
auth_username and auth_password are set together and cleared together. To clear them, send both as null.
destination_key is required when adding a number through the API. Send the number’s digits without the + unless your carrier sends something else.
gateway.priority is 0 to 100, lowest tried first.
The trunk’s health field reads waiting_for_carrier until the first call, ready after it, degraded after three outbound calls in a row fail at the carrier (an answered call resets this), and disabled while is_active is false.