Patrick's Forum

How to Connect your Bot to a phone through Interactive Voice Response

by patricktdavies posted May 6 2020, 13:18

Through Bot Libre, you can now have a bot talk on the phone through Interactive Voice Response. You can use a bot to automate a voice phone call centre, create your own personal virtual receptionist, or automate phone calls. Bot Libre integrates with Twilio.com to allow SMS and IVR. This "How To" will give you a step by step process to connect your bot with Twilio to allow for Interactive Voice Response.

Step 1 - Create a Bot 

First you must create a bot that you want to connect to IVR, or you can use one of your existing bots. To create a bot, follow the instructions here: How to create your own chat bot in 10 clicks

Step 2 - Create a Twilio account

Click here to go the Twilio website. To create a trial account, click on the "Sign up and start building" button in the middle of the website.

Enter your information on the following form, then click the "Start your free trial" button.

You will then need to verify your email address. Check your email and click on the link.

You will also need to verify your cell phone number. Enter your cell number and click "Verify".

Once you have received your verification code, enter it on the website and press "Submit" to complete your account creation.

Answer the questions from Twilio or click "Skip to dashboard".

Step 3 - Get a phone number from Twilio

From the menu on the left side of the Twilio website, select the circle and three dots icon, shown in red below, and then select "Phone Numbers"

 

Click the "Get Started" button to begin. Next, click the "Get your first Twilio phone number".

A screen will pop up with a phone number that has been chosen for you. You can accept this phone number by clicking the "Choose this Number" button. If you want to try again for a different phone number, you can click the underlined "Search for a different number" link. Ensure the number you select has voice capabilities.

Step 4 - Connect webhook

Navigate to your bot's page on the Bot Libre website. Go to its admin console by clicking on the gear icon.

Click the "Twilio SMS & IVR" link to view your bot's Twilio settings. Copy the "Twilio Voice Webhook URL" to your clipboard.

Now return to the Console on the Twilio website and select "Phone Numbers"

Next, select "Manage Numbers"

Click the phone number you created to edit its settings.

Finaly, scroll down to the "Voice & Fax" select "Webhooks, TwiML Bins, Studio, or Proxy" from the "Configure with" dropdown menu. Paste the Webhook Voice URL from your bot's Twilio SMS & IVR admin page into the "A call comes in" Webhook field.

Your bot should now be able to answer voice calls to the phone number you set up on Twilio. Trial accounts on Twilio can only send messages to phone numbers you have verified in the phone numbers section of your account portal. To remove this restriction, you will need to upgrade your Twilio account.

Step 5 - Accessing IVR from a script

 To start a voice call from a bot's script, you will need to enter your Twilio account's SID, Auth Token and phone number into your bot's Twilio admin page. You can find your Twilio Account SID and Auth Token on your Account Dashboard on the Twilio site.

Return to your bot's Twilio admin page and enter your Account SID into the Twilio SID field, the Auth Token into the Twilio Secret field and your Twilio phone number into the Twilio Phone Number field. Press "Save".

Step 6 - Implementing a greeting

As of the current version, introductions must be implemented using the default response feature, as opposed to the greetings feature. Heres how its done.

First, navigate to your bot's page on the Bot Libre website. Go to its admin console by clicking on the gear icon.

Next, click the "Training & Chat Logs" section. Then select, "add a new default response." Tick the "Repeat" box in the show section, and enter your greeting.

Because we only want the greeting to occur the first time, enter a default response in the "On Repeat:" section.

Then click save, and thats it!

Optionally

To increase the default timeout length or change the language, the following:

{ "twiml" : { "Say" : { "language" : "en-CA" }, "Gather" : { "language" : "en-CA", "timeout" : "3"}}} is an example of what could be entered into the command option of a response. 

In summary, your bot should now be able to send and receive voice phone messages. If you encountered any issues, or would like help setting up your bot please email us at support@botlibre.com or upgrade to our Platinum service and we can build your bot for you.

 


Id: 11567018
Posted: May 6 2020, 13:18
Updated: May 6 2020, 16:51
Replies: 0
Views: 181, today: 1, week: 1, month: 1
0 0 0.0/5