Documentation Index
Fetch the complete documentation index at: https://docs.vocobase.com/llms.txt
Use this file to discover all available pages before exploring further.
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)
- A phone number with voice capabilities from your chosen provider
Inbound calling is supported with Twilio, Plivo, and Vobiz. MCube inbound is not yet available. The flow below uses Twilio as the example; for Plivo and Vobiz, use the V2 phone-numbers API at the bottom of this page to manage DIDs and agent assignment programmatically.
Set up inbound calling
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.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:
| Setting | Value |
|---|---|
| When a call comes in | Webhook |
| URL | Your Vocobase inbound webhook URL |
| HTTP Method | POST |
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.
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
| Feature | Inbound | Outbound |
|---|---|---|
agent_type | "inbound" | "outbound" |
| Who initiates | Caller dials your number | You call via API |
| Telephony trigger | Twilio webhook | POST /calls/start |
intro_message | Spoken when agent answers | Spoken when callee picks up |
Webhook direction | "inbound" | "outbound" |
| Billing | Same per-tier ₹/min, 15s buckets | Same per-tier ₹/min, 15s buckets |
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)
For Plivo and Vobiz, you don’t need to paste an answer URL into the carrier’s portal. Use the V2 phone-numbers endpoints — Vocobase will pull or accept your DID inventory, then auto-bind each DID to a carrier Application pointing at our inbound URL the moment you assign an agent.API tester quickstart
Use this as a copy-paste runbook when testing the V2 inbound flow.successistruedata.statusisactivedata.telephony.vobiz.configuredistruefor Vobiz, ordata.telephony.plivo.configuredistruefor Plivo- the provider appears in
data.allowed_telephony_providers
data.id as AGENT_ID.
Sync your DIDs to Vocobase
Plivo — Vocobase pulls your inventory directly from Plivo’s REST API:Plivo response:Vobiz — pass an explicit Vobiz response:
numbers list (Vobiz has no inventory pull):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.Assign an agent to a DID
PUT /api/v2/phone-numbers/:id with agent_id. For both Plivo and Vobiz, Vocobase configures the carrier-side routing for the DID automatically — no portal paste needed.502 VOBIZ_SYNC_FAILED or 502 PLIVO_SYNC_FAILED. Retry after confirming the credentials and DID ownership.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: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, 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
| Symptom | Likely cause | Fix |
|---|---|---|
400 VOBIZ_NOT_CONFIGURED or 400 PLIVO_NOT_CONFIGURED | Partner has no active telephony connection for that provider | Run PUT /api/v2/config/telephony/vobiz or PUT /api/v2/config/telephony/plivo, then retry |
400 VALIDATION_ERROR on Vobiz sync | Body used phone_numbers, omitted numbers, or sent invalid E.164 values | Send { "provider": "VOBIZ", "numbers": ["+918065480085"] } |
400 AGENT_NOT_FOUND | Agent ID belongs to another user, is deleted, or is not a valid UUID | Use an active agent owned by the same partner user |
404 phone number not found | PHONE_NUMBER_ID is from another partner/provider or was not imported | Re-run GET /api/v2/phone-numbers?provider=VOBIZ and use that id |
502 VOBIZ_SYNC_FAILED | Carrier-side assignment failed | Confirm Vobiz credentials and DID ownership, then retry |
| Assignment succeeds but call reaches the wrong destination | Carrier-side Application binding may be stale | Run POST /api/v2/phone-numbers/resync and call again |
| Call connects but no webhook arrives | Partner webhook is not configured or endpoint rejects delivery | Configure POST /api/v2/config/webhooks and check your webhook server logs |
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.
Twilio Setup
Configure Twilio credentials for your account.
Webhook Payloads
See the full payload structure for completed calls.