Add an AI phone agent with Twilio
Setup guide · Phone calls
Point a Twilio number at Dchat and the AI answers calls by voice from the same knowledge as your chat. When a caller needs a person, it transfers the call or promises a call back.
Before you start
- Difficulty: Medium
- Time: 15 minutes
- You need: A Twilio account and a voice-capable phone number
- You need: Admin or owner access to your Dchat workspace
Steps
Add the channel in Dchat
In Dchat, open Settings → Channels and choose + Add channel. Pick "Phone (voice AI agent)", enter your Twilio number, and paste the credentials. TransferNumber, Greeting and Language are optional.
{ "AccountSid": "AC...", "AuthToken": "...", "TransferNumber": "+14155550100", "Language": "en-US" }Point the number at Dchat
In Twilio, set the phone number's "A call comes in" webhook to the URL below, method HTTP POST.
https://api.dchat.com/api/inbound/voice/twilio
Call the number
The AI greets the caller and answers by voice. Each call becomes a conversation in your inbox with the transcript.
What goes in each field
AuthToken: Checks Twilio's signature on every call. Calls are rejected without it.TransferNumber: Optional. When a caller asks for a person, the call is transferred here.Greeting: Optional. What the AI says when it picks up.Language: Optional. The speech language, for example en-US (the default) or es-ES.
Good to know
- If AI is off for your workspace, calls transfer straight away.
- Without a TransferNumber, a caller who asks for a person hears that a teammate will call them back on that number.
- Spoken answers are capped in length, and web links are not read out.
- Your workspace needs at least one enabled site; new workspaces have one already. Messages are dropped while every site is switched off.
- Credentials are encrypted when you save them and are never shown again. To change one, paste the full credentials again.
Try it on a spare Twilio number first, and listen to a few calls before you move your main line.