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 credits used
Prerequisites
- An approved Vocobase partner account with an API key
- Twilio configured in your Vocobase account (Twilio Setup guide)
- A Twilio phone number with voice capabilities
Inbound calling is currently supported with Twilio only. MCube inbound is not yet available.
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 webhook URL:
| Setting | Value |
|---|---|
| When a call comes in | Webhook |
| URL | https://api.vocobase.com/api/twilio/inbound |
| 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" |
| Credit cost | Same (1 credit / 60 seconds) | Same (1 credit / 60 seconds) |
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 is set to
https://api.vocobase.com/api/twilio/inbound - 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 credit 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"
Next steps
Knowledge Base
Upload documents to improve your agent’s answers.
Credits & Billing
Understand how call credits are calculated.
Twilio Setup
Configure Twilio credentials for your account.
Webhook Payloads
See the full payload structure for completed calls.