Inbound Calls
Inbound agents answer incoming phone calls automatically. When someone calls your configured phone number, Vocobase routes the call to the assigned agent, which handles the conversation using its prompt, voice, and knowledge base.How inbound calls work
- A caller dials your Twilio phone number
- Twilio forwards the call to Vocobase using a TwiML webhook
- Vocobase identifies the inbound agent associated with the phone number
- The agent greets the caller and handles the conversation
- When the call ends, a
session.completedwebhook is sent with the transcript, duration, and ₹ used
Prerequisites
- An approved Vocobase partner account with an API key
- One of the following providers configured in your Vocobase account:
- Twilio (Twilio Setup guide)
- Plivo (Plivo Setup guide)
- Vobiz (Vobiz Setup guide)
- Tata Smartflo (Tata Smartflo Setup guide)
- A phone number with voice capabilities from your chosen provider
Inbound calling is supported with Twilio, Plivo, Vobiz, and Tata Smartflo. MCube inbound is not yet available. The flow below uses Twilio as the example; for Plivo, Vobiz, and Tata Smartflo, use the V2 phone-numbers API section at the bottom of this page to manage DIDs and agent assignment programmatically.
If you create telephony connections through the V2 API, use the returned
connection_id when syncing DIDs or starting outbound calls. The same active DID can exist on multiple connections for outbound caller ID use, but only one active row can have inbound_enabled: true, which keeps inbound routing deterministic.Set up inbound calling
1
Create an inbound agent
Create an agent with
agent_type set to "inbound". This tells Vocobase that this agent should handle incoming calls rather than making outbound ones.2
Configure your Twilio phone number
In the Twilio Console, navigate to Phone Numbers > Manage > Active Numbers and select the phone number you want to use for inbound calls.Under Voice Configuration, set the inbound webhook URL provided by Vocobase for your account:
3
Link the agent to your phone number
After creating the inbound agent and configuring the Twilio webhook, Vocobase automatically routes incoming calls on your configured Twilio number to your inbound agent.If you have multiple inbound agents, the most recently created active inbound agent is used by default. Contact the Vocobase team if you need to route different phone numbers to different agents.
4
Test with a phone call
Call your Twilio phone number from any phone. You should hear your agent’s Notice the
intro_message, and then you can have a conversation with it.After the call ends, check your webhook endpoint for the session.completed event:direction field is "inbound" in the webhook payload, making it easy to distinguish from outbound calls.Inbound vs. outbound agents
An agent’s type is set at creation and determines how it handles calls. You cannot use the same agent for both inbound and outbound calls. Create separate agents for each purpose.
Adding a knowledge base
Inbound agents benefit greatly from a knowledge base. Upload your FAQs, product documentation, and support articles so the agent can answer caller questions accurately.Troubleshooting
Calls go to Twilio voicemail instead of the agent
- Verify the webhook URL in Twilio matches the inbound webhook URL provided by Vocobase
- Check that the HTTP method is
POST - Ensure your Twilio credentials are configured in Vocobase (Twilio Setup)
Agent does not answer
- Confirm you have an active inbound agent (
agent_type: "inbound",status: "active") - Check that your ₹ balance is not zero
- Review the Twilio Console error logs for any connection failures
Caller hears silence
- Make sure the
intro_messageis set on your inbound agent - Verify the
voice_idis valid — list available voices withGET /agent/voices
Webhook shows wrong direction
- If
directionshows"outbound"for an inbound call, ensure you created the agent withagent_type: "inbound", not"outbound"
Use the V2 phone-numbers API (Plivo + Vobiz + Tata Smartflo)
For Plivo, Vobiz, and Tata Smartflo, use the V2 phone-numbers endpoints to sync DIDs, list local inventory, and assign inbound agents. Plivo pulls inventory from the carrier, Vobiz accepts an explicitnumbers array, and Tata Smartflo pulls DIDs from Smartflo GET /v1/my_number.
Tata Smartflo inbound DIDs must also be routed in the Smartflo panel to the Voice-Bot streaming app so Smartflo invokes Vocobase’s Dynamic Voice-Bot resolver for incoming calls.
API tester quickstart
Use this as a copy-paste runbook when testing the V2 inbound flow.successistruedata.statusisactivedata.telephony.vobiz.configuredistruefor Vobiz,data.telephony.plivo.configuredistruefor Plivo, ordata.telephony.tata_smartflo.configuredistruefor Tata Smartflo- the provider appears in
data.allowed_telephony_providers
POST /api/v2/telephony/connections and save the returned connection_id; the older config endpoints update the default connection.
data.id as AGENT_ID.
1
Sync your DIDs to Vocobase
Plivo — Vocobase pulls your inventory directly from Plivo’s REST API:Plivo response:Vobiz — pass an explicit Vobiz response:Tata Smartflo — Vocobase pulls your DID inventory from Smartflo Tata Smartflo response:
numbers list (Vobiz has no inventory pull):GET /v1/my_number:2
List imported DIDs
List the partner’s imported phone numbers and save the Save the phone number
id for the DID you want to assign:id as PHONE_NUMBER_ID.3
Assign an agent to a DID
PUT /api/v2/phone-numbers/:id with agent_id. By default, assigning an agent also sets inbound_enabled to true. For outbound-only testing with the same DID on another account, send "inbound_enabled": false.502 VOBIZ_SYNC_FAILED, 502 PLIVO_SYNC_FAILED, or 502 TATA_SMARTFLO_SYNC_FAILED. Retry after confirming the credentials, DID ownership, and provider-side routing.4
Reconcile with one call
If you edit something in the carrier’s console directly or rotate credentials,
POST /api/v2/phone-numbers/resync refreshes the assignment for every DID on that provider:5
Receive the call
Call your DID. Vocobase routes the incoming call to the assigned agent and sends the same
session.completed webhook payload as the Twilio flow above, with provider in the metadata.Expected result:- caller hears the assigned agent’s greeting
- call creates an inbound session
session.completedwebhook fires after hangup- webhook
data.call.directionisinbound - webhook
data.call.to_numberis the DID - no
VOBIZ_SYNC_FAILED,PLIVO_SYNC_FAILED,TATA_SMARTFLO_SYNC_FAILED, or 5xx appears during the assignment or call
End-to-end Vobiz test script
This script assumes the agent already exists and the DID belongs to the partner’s Vobiz account.Troubleshooting V2 inbound
Next steps
Knowledge Base
Upload documents to improve your agent’s answers.
Billing (₹)
Understand how call ₹ is calculated, including 15s buckets and tier pricing.
Plivo Setup
Configure Plivo credentials and DIDs.
Vobiz Setup
Configure Vobiz credentials and DIDs.
Tata Smartflo Setup
Configure Tata Smartflo credentials and DID routing.
Telephony Connections
Create and manage multiple named BYOP connections.
Twilio Setup
Configure Twilio credentials for your account.
Webhook Payloads
See the full payload structure for completed calls.