How to configure a callbot on CSML Studio with Twilio Voice

Setup Twilio

Step 1: Purchase a Twilio phone number compatible with Programmable Voice

To get started, you will need to create a Twilio account and purchase a phone number in the country of your choice. Twilio has a documentation on this topic. The only point of attention is that you must make sure that the number you purchase has Voice capabilities. Please keep in mind that depending on your country of origin, the requirements may differ, and Twilio may ask you for business verification. Keep track of this phone number (including the country code) as you are going to need to add it later to CSML Studio!

Step 2: Configure a TwiML App

TwiML is Twilio's own markup language for connecting with their programmable interfaces. You will need to create a new app by visiting the TwiML dashboard and clicking on Create a new app, then fill the Voice Request URL and provide with this URL:

Once you have created this app, find its Application SID by clicking on its name again on the list of TwiML apps, and keep this information for later.

You will then need to link this Application with the phone number you created earlier. To do so, visit the Phone Numbers sections of the Twilio console, and click on your number to configure it. Under Voice & Fax, select Accept incoming voice calls, configure with TwiML App and pick the TwiML App we provided earlier.

Step 3: Security and Authorization

The last step is to provide CSML Studio with means to make sure that the requests that are sent to the Twilio Voice endpoint are indeed coming from Twilio. To do so, visit your Twilio Project Settings and copy your Account SID and Auth Token, found under API Credentials:

Setup CSML Studio

To setup your Twilio Callbot in CSML Studio, you will simply need to visit the Channels section and create a new Twilio (Voice) channel. Then simply fill the required fields with the information you gathered earlier.

About the Language field: as Twilio provides Speech-To-Text and Text-To-Speech capabilities, it must know in advance in what language the user is supposed to speak. The list of all supported languages is available in Twilio's documentation. You must specify the full ISO locale code (i.e en-US, fr-FR...).

Once you click on Submit, your bot is ready to use!

Last updated