Prerequisites
Before creating a trunk in Bolna, configure the following on your SIP trunk provider’s portal.1. Whitelist Bolna’s IP Address
Bolna’s SIP media server IP is:ip-based authentication, this is the IP you will add as your identifier — Bolna will be recognized solely by its source IP.
2. Set the Origination URL (for inbound calls)
If you want calls to your DID numbers to ring through to Bolna, point your SIP trunk’s origination URI to one of the following, depending on the transport you’ve chosen for the trunk:- Origination URI or Origination URL
- Inbound SIP URI
- SIP Termination Point
- Route to / Forward to
sip:13.200.45.61:5060 for UDP/TCP. TLS inbound requires a hostname so the carrier can validate Bolna’s TLS certificate.3. Codec Configuration
Bolna’s SIP layer uses G.711 u-law (ulaw) audio by default. Ensure your trunk allows ulaw, or at minimum alaw, in its codec preferences. G.729 and other compressed codecs are not recommended.4. Decide on media encryption (optional)
Bolna supports two media modes for BYOT trunks:- Plain RTP (default) — works on every transport. No setup needed on your side.
- SDES (encrypted RTP) — supported on the TLS transport only, since the encryption keys travel inside the SIP signaling channel. To use SDES, your carrier must also have SDES/SRTP enabled on its end.
Create your trunk
Each step below shows the same action in the Dashboard (under SIP Trunks → Create SIP Trunk, a 5-step wizard) and via the API (a single Create SIP Trunk request whose fields map 1:1 to the wizard).Open the trunk form
- Dashboard
- API

The SIP Trunks page with the Create SIP Trunk button
Basics: name and provider
- Dashboard
- API
- Trunk Name — a label only you see, e.g.
Twilio Production. - Provider — pick your carrier tile (Plivo, Telnyx, Twilio, Vobiz, Vonage) or Custom for any other carrier. Selecting a provider pre-fills its gateway address and the recommended transport in the later steps.
- Description — optional, for internal reference.

Step 1 of the wizard: Basics
Authentication
- Dashboard
- API
- Username / Password — enter the SIP credentials your carrier issued. Works behind NAT.
- IP-Based — enter one trusted IP or CIDR per line in Trusted Source IPs / CIDRs. Your carrier must also whitelist Bolna’s IP (see Prerequisites).

Step 2: Username / Password authentication

Step 2: IP-Based authentication
Gateways
- Dashboard
- API
5060 for UDP/TCP, 5061 for TLS) and a Priority (lower = tried first). If you picked a known provider in Basics, the first gateway is pre-filled. Click Add Gateway for failover targets, then Continue.
Step 3: Gateways, pre-filled for Twilio
Advanced: codecs, transport and encryption
- Dashboard
- API
- Allowed / Disallowed Codecs — defaults
ulaw,alawandall. Always keepulaw.
- Transport Protocol —
- UDP — the default, used by most carriers.
- TCP — avoids UDP fragmentation when SIP INVITEs carry long headers (multiple Diversion / P-Asserted-Identity / Route entries). Pick this if outbound calls intermittently fail to negotiate media.
- TLS (encrypted signaling) — encrypts the SIP signaling channel. Required for SDES (SRTP) media encryption. Use port
5061on your gateways.
- Media Encryption (SRTP) — Disabled keeps plain RTP. SDES (RTP/SAVP, AES-128) encrypts the audio stream end-to-end with your carrier and requires TLS transport.
- SIP OPTIONS Ping Interval — how often Bolna pings the carrier for trunk health. Default
60seconds;0disables it.

Step 4: Advanced, with TLS transport and SDES media encryption
- RTP Symmetric / Force rport — keep enabled for NAT traversal.
- Enable Inbound Calling — turn on if you want Bolna to receive calls on this trunk.
- Prepend + to Outbound Numbers — typically on (E.164 dialing).
- Trunk Active — the master switch; turn off to pause the trunk.

Step 4: NAT & Behavior toggles
Review and create
- Dashboard
- API

Step 5: Review, before clicking Create Trunk
Full API examples
Complete Create SIP Trunk requests for the most common setups.Example — Twilio Elastic SIP Trunk (userpass)
Example — Plivo Elastic SIP Trunk (ip-based)
Example — Twilio Elastic SIP Trunk, TLS + SDES (encrypted)
Add Phone Numbers to Your Trunk
After creating a trunk, add your DID phone numbers using the Add Phone Number API.+ prefix. Use a consistent format across your trunk and inbound DID configuration.Create Trunk field reference
Troubleshooting
Inbound calls connect but the caller hears silence (one-way audio)
The most common cause is an SRTP mismatch between Bolna and your carrier. If the trunk hasmedia_encryption="sdes" but the carrier has SRTP disabled (or vice versa), the SIP call sets up but the media path never establishes.
- Confirm SRTP is enabled on your provider’s side.
- If you need a quick test, set
media_encryption_optimistic=true— Bolna will fall back to clear RTP if the carrier does not offer crypto in its SDP. - If you don’t need encrypted media, set
media_encryption="no"and use UDP or TCP transport.
422 from Create / Update with media_encryption='sdes' requires transport='transport-tls'
SDES exchanges its keys inside SDP, so it must travel over an encrypted signaling channel. Either:
- Switch
transportto"transport-tls"(and update the gateway port to5061), or - Set
media_encryptionback to"no".
Outbound INVITE fails or rings forever on a particular carrier
If your carrier sends large SIP headers (long Diversion, P-Asserted-Identity, multiple Route headers), the INVITE may exceed the UDP MTU and get fragmented or dropped silently.- Switch
transportto"transport-tcp"— this avoids UDP fragmentation. You don’t need TLS for this; TCP alone is enough.
Next steps
- Set up inbound calls to route incoming calls to your AI agents
- Make outbound calls from your SIP trunk numbers
- Manage your trunk using the full SIP Trunk API

