How Outbound Calls Work
When you initiate an outbound call through your SIP trunk, here is the complete flow:You Trigger a Call via API
You send a request to the Bolna Call API with your agent ID, the recipient’s phone number, and the
from_number (your SIP trunk phone number to use as the caller ID).Bolna Resolves the Trunk
Bolna looks up the
from_number in its database to find the associated SIP trunk and its gateway configuration (address, credentials, codecs).SIP INVITE Sent via Asterisk
Bolna’s Asterisk/PJSIP server sends a SIP INVITE to your trunk’s gateway address (e.g.,
bolna-trunk.pstn.twilio.com or XXXX.zt.plivo.com) with the appropriate authentication.Provider Routes to PSTN
Your SIP trunk provider receives the INVITE, authenticates the request, verifies the caller ID, and then routes the call to the recipient’s phone number on the PSTN.
Prerequisites
Before making outbound calls, make sure you have completed all previous steps:- Created a SIP trunk on your provider (Plivo guide or Twilio guide)
- Registered the trunk on Bolna and confirmed
is_activeistrue - Added your phone numbers to the trunk on Bolna
- Created a Bolna AI agent via the Dashboard or the Agent API
Step 1: Configure the Agent’s Telephony Provider
Before your agent can place calls through your SIP trunk, you need to tell it to use SIP trunking instead of the default telephony provider. Settelephony_provider to "sip-trunk" in your agent’s configuration:
Setting
telephony_provider to "sip-trunk" tells Bolna to:- Route all outbound calls through your SIP trunk’s gateway instead of Twilio’s or Plivo’s standard API
- Use ulaw audio encoding (G.711 u-law) as required by SIP trunks
- Authenticate using the credentials stored in your trunk configuration
Step 2: Place an Outbound Call
Use the standard Call API to place a call. The key difference from a regular Bolna call is thefrom_number field, which must be a phone number registered on your SIP trunk.
Field Reference
| Field | Description |
|---|---|
agent_id | UUID of the Bolna agent that will handle the conversation |
recipient.phone_number | The recipient’s phone number in E.164 format (+ followed by country code and number) |
recipient.name | The recipient’s name. This is available to the AI agent during the conversation for personalized interactions. |
from_number | Your SIP trunk phone number to use as the caller ID. This number must be registered on your SIP trunk. |
Step 3: Verify Call Status
After placing a call, you can monitor its status using the Call Status API:Batch Outbound Calling
For high-volume outbound campaigns where you need to call many people automatically, Bolna supports batch calling through your SIP trunk. Use the Batch API to schedule and manage large call campaigns. Key points for batch calling with SIP trunks:- Ensure the agent’s
telephony_provideris set to"sip-trunk"as described in Step 1 - Each call in the batch should use a
from_numberthat is registered on your trunk - Monitor concurrency limits, which depend on your SIP trunk provider’s capacity and plan
Troubleshooting Outbound Calls
Call fails to connect
Call fails to connect
If the call never rings on the recipient’s phone:
- Check trunk status. Verify your trunk’s
is_activeistrue:
- Verify
from_number. Ensure thefrom_numberyou used in the call request is registered on the trunk. - Check gateway credentials. For
userpassauth, verify the username and password in your trunk configuration are correct and match what you set up on your provider. - Check IP whitelist. For
ip-basedauth, ensure13.200.45.61is whitelisted on your provider’s side. - Review provider logs. Check your provider’s call logs for SIP error codes (e.g.,
401 Unauthorized,403 Forbidden,404 Not Found).
Call connects but there is no audio
Call connects but there is no audio
This is almost always caused by an SRTP mismatch:
- Disable SRTP / Secure Trunking on your SIP provider. Bolna does not support SRTP, and if it is enabled, the media negotiation fails silently.
- Verify codec settings. Ensure
ulawis in theallowlist on your Bolna trunk. - Check
rtp_symmetric. This should betrue(which is the default). - Check
force_rport. This should betrue(which is the default).
One-way audio (only one side can hear)
One-way audio (only one side can hear)
If you can hear the agent but the caller cannot, or vice versa:
- Enable Symmetric RTP. Set
rtp_symmetrictotrueon your Bolna trunk (this is the default). - Enable force_rport. Set
force_rporttotrue(this is the default). - Check NAT traversal. Confirm your provider’s RTP IP ranges are reachable from Bolna’s IP
13.200.45.61. - Keep direct_media disabled. Ensure
direct_mediaisfalse(the default). Enabling it bypasses Bolna’s media server, which often causes one-way audio.
Leading plus (+) issues with phone numbers
Leading plus (+) issues with phone numbers
Some carriers require the
+ prefix on dialed numbers (E.164 format), while others reject it.- Twilio requires the
+prefix. Keepoutbound_leading_plus_enabledastrue(default). - Plivo generally accepts both formats.
- Other providers: Check your provider’s documentation for their preferred number format.
Caller ID rejected by your provider
Caller ID rejected by your provider
If the provider rejects the call because of an invalid caller ID:
- Twilio: The
from_numbermust be either a Twilio DID number on your account or a verified Caller ID number. - Plivo: The
from_numbermust be a number in your Plivo account. - Ensure the number format matches what your provider expects. E.164 (with
+) is recommended for all providers.
Next Steps
Receive Inbound Calls
Route incoming calls to your Bolna AI agents
Batch Calling
Run high-volume outbound AI call campaigns
Monitor Call Status
Track call status and outcomes in real-time
SIP Trunk API Reference
Full API reference for managing trunks and numbers

