How Inbound Calls Work
When someone calls your DID phone number, here is the complete flow:Caller Dials Your Number
A caller on the PSTN (regular phone network) dials your DID phone number, for example
+919876543210.Provider Routes to Bolna
Your SIP trunk provider (Plivo or Twilio) receives the call and forwards a SIP INVITE message to Bolna’s SIP server at
sip:13.200.45.61:5060, based on the origination settings you configured in the previous steps.Bolna Matches the Number
Bolna receives the INVITE and looks at the called number in the SIP headers. It matches this number against your registered phone numbers to find the associated trunk and agent.
Prerequisites
Before setting up inbound calls, make sure you have completed all these previous steps:- Created a SIP trunk on your provider (Plivo guide or Twilio guide)
- Configured origination settings so your provider knows to route inbound calls to
sip:13.200.45.61:5060 - Registered the trunk on Bolna with
inbound_enabledset totrue - Added your phone numbers to the trunk on Bolna
- Created a Bolna AI agent via the Dashboard or the Agent API
Map a Phone Number to an AI Agent
This is the key step where you tell Bolna which AI agent should answer calls on a specific phone number. Use the Set Inbound Agent API:Where to find these values
| Field | Type | Where to Find It |
|---|---|---|
agent_id | string | The UUID of your Bolna agent. Found in the Bolna Dashboard by clicking on your agent, or returned by the Create Agent API. |
phone_number_id | string | The ID of the phone number on Bolna. This must be a number you purchased on your SIP provider and then added to your trunk on Bolna. Use the id from the Add Number response, not the phone number itself. |
One number can only be mapped to one agent at a time. If you map a number to a new agent, it is automatically unmapped from the previous agent. When a number is mapped to an agent via SIP trunk, Bolna automatically sets the audio format to ulaw (G.711) to match the trunk’s requirements.
Test Your Inbound Setup
After mapping your number, test the complete flow:Dial Your DID Number
From any phone (a mobile phone will do), call the DID number you mapped to the agent. For example, dial
+919876543210.Verify the Agent Answers
You should hear your AI agent’s greeting message. Try having a brief conversation to confirm the agent is responding correctly.
Check Call Logs
After the call, verify it appeared in:
- Your Bolna Dashboard call history
- Your SIP provider’s call logs (Plivo logs or Twilio logs)
Unlink a Number from an Agent
To stop an agent from answering calls on a specific number (without removing the number from the trunk entirely), use the unlink endpoint:Troubleshooting Inbound Calls
Calls are not arriving at Bolna
Calls are not arriving at Bolna
If calls ring on the caller’s end but never reach Bolna:
- Check your provider’s origination settings. Confirm the origination URI is set to
sip:13.200.45.61:5060on your provider. - Check the phone number assignment on your provider’s side:
- Plivo: Ensure the Application Type is set to
Zentrunkand the correct inbound trunk is selected for the number. - Twilio: Ensure the number is associated with the correct trunk in the Numbers tab.
- Plivo: Ensure the Application Type is set to
- Review your provider’s call logs for error codes or rejection reasons (e.g.,
404 Not Foundor403 Forbidden).
Calls connect but there is no audio
Calls connect but there is no audio
If the call connects (no ringing tone stops) but neither party can hear anything:
- SRTP is likely enabled. This is the most common cause. Ensure Secure Trunking / SRTP is disabled on your SIP provider.
- Check codec settings. Verify that
ulawis in theallowlist on your Bolna trunk configuration. - Check Symmetric RTP. Ensure
rtp_symmetricis set totrueon your Bolna trunk.
Calls are rejected by Bolna
Calls are rejected by Bolna
If the call fails immediately with an error:
- Phone number not registered. Confirm the number has been added to the trunk on Bolna using the Add Number API.
- Number not mapped to an agent. Confirm you have mapped the number to an agent using the inbound setup API.
- Inbound is disabled. Check your trunk configuration and verify that
inbound_enabledis set totrue. - Number format mismatch. The number in the SIP INVITE’s
Toheader should match what you stored. Bolna performs flexible matching (with/without+), but try to keep the format consistent.
Agent is not responding or call drops immediately
Agent is not responding or call drops immediately
If the call connects to Bolna but the agent doesn’t speak:
- Verify the agent is active. Open the Bolna Dashboard, find your agent, and confirm it is in an active state.
- Check provider connections. Make sure all required AI providers (transcriber, LLM, and voice synthesizer) are properly configured and connected in the agent’s settings.
Next Steps
Make Outbound Calls
Place outbound calls from your SIP trunk numbers using AI agents
SIP Trunk API Reference
Full API reference for managing SIP trunks and phone numbers

