Skip to contentSkip to navigationSkip to topbar
On this pageProducts used

Use Twilio Voice as a Channel


(warning)

Twilio Alpha - Developer Preview

AI Assistants is a Twilio Alpha(link takes you to an external page) project that's in Developer Preview.

View the current limitations for details about feature limits during developer preview.

(warning)

Legal Notice

AI Assistants, including connecting AI Assistants to Twilio Voice, is currently available as a developer preview and the information contained in this document is subject to change. As a developer preview release, AI Assistants is made available to a limited number of customers for testing purposes only and should not be used in production environments or use real personal data. Some features are not yet implemented and others may be changed before the product is declared as Generally Available. Developer preview products are not covered by the Twilio Support Terms or Twilio Service Level Agreement.

AI Assistants, including connecting AI Assistants to Twilio Voice, is not PCI compliant or a HIPAA Eligible Service and should not be used in Voice workflows that are subject to HIPAA or PCI.

This guide will show you how to trigger your AI Assistant via an incoming call by connecting your Assistant with Twilio Voice. To get started, you will need the following:


Setup

setup page anchor

To trigger your AI Assistant via an incoming call, you will configure a TwiML Bin and connect it to your Twilio phone number to begin a voice session on an incoming call.

  1. Note the Assistant ID of your configured AI Assistant.
  2. Go to TwiML Bins(link takes you to an external page), create a new TwiML Bin, and give it a name.
  3. Copy the following into the TwiML Bin, and replace "{{YOUR_ASSISTANT_ID}}" with your Assistant ID. You can also add a custom greeting.
1
<Response>
2
<Connect>
3
<Assistant id="{{YOUR_ASSISTANT_ID}}" welcomeGreeting="Welcome To Twilio, How can I help you?"></Assistant>
4
</Connect>
5
</Response>
  1. Go to Phone Numbers and click on the number you'd like to connect your Assistant to.
  2. Under Voice Configuration , configure with a "Webhook, TwiML Bin, Function, Studio Flow, Proxy Service". When a call comes in, select "TwiML Bin" and choose the TwiML Bin you created above.
    Phone number configuration in Twilio Console where user has selected the AI Assistants TwiML Bin for incoming calls.

Configure your Voice experience

configure-your-voice-experience page anchor

Under the hood, Twilio AI Assistants uses Twilio ConversationRelay and can make use of the attributes outlined for the <ConversationRelay> TwiML verb.

See the ConversationRelay documentation for the full list of options.