Overview
Integrating Twilio with Chatbase lets your AI agent handle inbound phone calls, answering with its configured voice, personality, and data sources. In a few minutes you can connect your Twilio account, import your phone numbers, and assign them to your AI agent.What you can do:
Have your AI agent pick up the phone with the same knowledge, same actions, same instructions as your chat AI agent, in a voice you choose.
Don’t use Twilio? You can also connect an existing number from your own PBX, SIP provider, or GSM gateway using the SIP trunk method.
Before you start
- A Twilio account. If you don’t have one, sign up for Twilio.
- At least one phone number purchased in your Twilio account.
- Your Twilio Account SID and Auth Token, available on your Twilio Console dashboard.
- A Chatbase AI agent set up with the voice settings you want callers to hear. Configure voice, language, and greeting under your AI agent’s Settings > Voice tab.
- The phone channel supported on your plan. Check the pricing page for details.
How to connect Twilio
1
Connect your Twilio account
- Navigate to your Chatbase dashboard and select the AI agent you want to enable phone calls for.
- Go to the Integrations tab in the left sidebar.
- Find the Twilio card and click Connect.
- Enter your Account SID and Auth Token from the Twilio Console.
- Account SID starts with
ACfollowed by 32 characters (for example,ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx). - Auth Token is a 32-character string.
- Account SID starts with
- Click Connect Twilio.
Your Twilio credentials are encrypted before being stored. Chatbase never displays your Auth Token after the initial connection. Each AI agent has its own Twilio connection, so you can use the same or different Twilio accounts for different AI agents.
2
Import phone numbers
- On the same Twilio integration page, click Import from Twilio.
- A dialog shows all available phone numbers from your Twilio account.
- Select the numbers you want to import. For each, you can optionally set a friendly name to help identify it later, such as “Sales line” or “Support US”.
- Click Import selected.
Each phone number can only be imported to one AI agent at a time. Numbers that are already imported appear grayed out in the import dialog.
3
Enable a phone number
- Navigate to your AI agent’s Channels page.
- Find the Phone channel card and click Setup, or Manage if you’ve already enabled numbers.
- Click Assign number.
- Select one or more numbers from the list of imported numbers.
- Click Assign selected.
Call one of your enabled numbers and confirm your AI agent answers with the greeting from its voice settings.
How calls work
Once a phone number is enabled for an AI agent:- Inbound calls to that number are automatically routed to the assigned AI agent.
- The AI agent uses its configured voice settings (voice provider, model, and language) to speak with the caller.
- The AI agent greets the caller with the first message defined in its voice settings.
- The conversation follows the AI agent’s instructions, knowledge base, and actions, just like a chat conversation.
- Each call creates a conversation entry in Activity > Conversations with the source marked as Phone.
Managing phone numbers
Disable a number
- Go to your AI agent’s Channels page and click Manage on the Phone channel card.
- Click the menu icon on the number card and select Unassign.
Remove a number from the AI agent
- Go to your AI agent’s Integrations tab and click Manage on the Twilio card.
- In the phone numbers table, click the menu icon next to the number and select Remove.
Disconnect Twilio
- Go to your AI agent’s Integrations tab and click Manage on the Twilio card.
- Click Disconnect in the danger zone at the bottom.
Limitations
- One AI agent per number. A phone number can only be imported to one AI agent at a time.
- The phone channel is plan-gated. Check the pricing page for availability.
- Disconnecting is destructive. It removes every imported number and deletes the SIP trunk from your Twilio account.
Next steps
SIP trunk
Connect a number you already own from a PBX, SIP provider, or GSM gateway.
Transfer to phone number
Let the AI agent hand a live call to a human.
