Chatbot Overview
Conversational Bots
Intents & Entities
Intelligent Bots
Kore.ai's Approach
Kore.ai Conversational Platform
Bot Concepts and Terminology
Natural Language Processing (NLP)
Bot Types
Bot Tasks
Starting with Kore.ai Platform
How to Access Bot Builder
Working with Kore.ai Bot Builder
Building your first Bot
Getting Started with Building Bots
Using the Dialog Builder Tool
Creating a Simple Bot
Release Notes
Latest Updates
Older Releases
Deprecations
Bot Builder
Creating a Bot
Design
Develop
Storyboard
Dialog Task
User Intent Node
Dialog Node
Entity Node
Supported Entity Types
Composite Entities
Supported Time Zones
Supported Colors
Supported Company Names
Form Node
Logic Node
Message Nodes
Confirmation Nodes
Service Node
Custom Authentication
2-way SSL for Service nodes
Script Node
Agent Transfer Node
WebHook Node
Grouping Nodes
Connections & Transitions
Managing Dialogs
Prompt Editor
Alert Tasks
Alert Tasks
Ignore Words and Field Memory
Digital Forms
Digital Views
Knowledge Graph
Terminology
Building
Generation
Importing and Exporting
Analysis
Knowledge Extraction
Small Talk
Action & Information Task
Action Tasks
Information Tasks
Establishing Flows
Natural Language
Overview
Machine Learning
ML Model
Fundamental Meaning
NLP Settings and Guidelines
Knowledge Graph Training
Traits
Ranking and Resolver
NLP Detection
Bot Intelligence
Overview
Context Management
Session and Context Variables
Context Object
Dialog Management
Sub-Intents
Amend Entity
Multi-Intent Detection
Sentiment Management
Tone Analysis
Sentiment Management
Default Conversations
Default Standard Responses
Channel Enablement
Test & Debug
Talk to Bot
Utterance Testing
Batch Testing
Record Conversations
Publishing your Bot
Analyzing your Bot
Overview
Dashboard
Custom Dashboard
Conversation Flows
Bot Metrics
Advanced Topics
Bot Authorization
Language Management
Collaborative Development
IVR Integration
Data Table
Universal Bots
Defining
Creating
Training
Customizing
Enabling Languages
Smart Bots
Defining
Sample Bots
Github
Asana
Travel Planning
Flight Search
Event Based Bot Actions
koreUtil Libraries
Bot Settings
Bot Functions
General Settings
PII Settings
Customizing Error Messages
Bot Management
Bot Versioning
Using Bot Variables
API Guide
API Overview
API List
API Collection
SDKs
SDK Overview
SDK Security
SDK App Registration
Web SDK Tutorial
Message Formatting and Templates
Mobile SDK Push Notification
Widget SDK Tutorial
Widget SDK – Message Formatting and Templates
Web Socket Connect & RTM
Using the BotKit SDK
Installing
Configuring
Events
Functions
BotKit SDK Tutorial – Agent Transfer
BotKit SDK Tutorial – Flight Search Sample Bot
Using an External NLP Engine
Bot Administration
Bots Admin Console
Dashboard
User Management
Managing Users
Managing Groups
Managing Role
Bots Management
Enrollment
Inviting Users
Bulk Invites
Importing Users
Synchronizing Users from AD
Security & Compliance
Using Single Sign-On
Security Settings
Cloud Connector
Analytics
Billing
How Tos
Creating a Simple Bot
Creating a Banking Bot
Transfer Funds Task
Update Balance Task
Context Switching
Using Traits
Schedule a Smart Alert
Configure Digital Forms
Add Form Data into Data Tables
Configuring Digital Views
Add Data to Data Tables
Update Data in Data Tables
Custom Dashboard
Custom Tags to filter Bot Metrics
Patterns for Intents & Entities
Build Knowledge Graph
Global Variables
Content Variables
Using Bot Functions
Configure Agent Transfer
  1. Home
  2. Docs
  3. Bots
  4. Channel Enablement
  5. Adding the Twilio Voice Channel

Adding the Twilio Voice Channel

To add Twilio Voice as a channel to your Kore.ai bot, you will need to get a Twilio phone number and setup webhook integration to communicate with the bot. Adding the Twilio Voice channel to your Kore.ai Bot allows end users for your bot to interact with your bot using their Twilio Voice accounts. To add the Twilio Voice channel to your Bot, you will need to:

  1. Get a Twilio Number- To enable Twilio Voice channel, you will need to create a Twilio phone number to be associated with this bot.
  2. Setup Integration- To setup integration, you will need to create a TwiML App and get Webhook URL details from Configurations tab of Twilio Voice channel page to enter in the ‘Request URL’ for Voice to activate channel.
  3. Associate TwiML App with Twilio Phone Number– To associate TwiML App with Twilio Phone Number, you will need to configure your preferred active Twilio number with TwiML App.
  4. Optional Configuration for Setting-up Agent Transfer- To use Agent Transfer functionality you will need to setup the Kore.ai Agent Transfer SDK.
  5. Enable Channel- Once you setup integration and complete configuration, you will need to enable channel.

Note: Twilio Voice should ideally be enabled for bots that are specifically built to work on voice based channels. Please review the following constraints before enabling Twilio Voice as a channel for this bot:

  1. Enterprise Bots that require user’s authorization to communicate with the bot are not supported on Twilio Voice.
  2. Tasks that require user’s authorization to communicate with external systems should ideally be not included.
  3. Webhook Nodes work asynchronously and are currently are not supported on Twilio Voice.
  4. Use only dialog tasks for best user experience on Twilio Voice channel.
  5. Ensure that the bot responses you are going to configure for Twilio Voice are brief, plain text messages only.
  6. Bot receives user’s voice response from Twilio Voice only after few moments of silence at user’s end and this could appear as a lag to end user.
Pre-requisites to add the Twilio Voice Channel
  1. Login to your Twilio Voice account to create a new Twilio number to be associated with your bot.
  2. To get a Twilio Number:
    1. Navigate to Products and Services menu and select Phone Numbers.
    2. Create a new Twilio phone number to be associated with this bot. If you already have a Twilio phone number that you want to associate with this bot, then you can proceed to the next steps.
      Please note that the image may change depending on your Twilio account type.
  3. To setup integration,
    1. navigate to the Tools section of Phone Numbers menu.
    2. Select TwiML Apps to create a new TwiML App.
    3. Provide a name for the app and copy the Webhook URL provided in the Configurations tab of Twilio Voice Channel page and enter in the Request URL for Voice.
    4. Click on Save to complete the app creation.
  4. To associate TwiML App with Twilio Phone Number:
    1. Navigate to Manage Numbers menu under Phone Numbers.
    2. From Active Numbers section, select the number you would like to associate the TwiML App.
    3. Under Voice & Fax section, select TwiML App as the choice in Configure With field.
    4. A new field TWIML APP will be displayed and from this, select the app you have configured in the previous steps.
    5. Click on Save to complete this app association.
  5. Optionally, you can also setup Agent Transfer functionality to transfer user’s call conversation to another Twilio number. For this, you need to configure the Kore.ai Agent Transfer SDK.
    1. You may download the Agent Transfer SDK from Kore.ai GitHub repository and define ‘data.message’, ‘transferCallToAgent’ and ‘agentPhonenumber’ parameters.
      • ‘data.message’: Define the message to be read out to the end user when call is transferred to agent is initiated.
      • ‘transferCallToAgent’: Set this flag to True to enable Agent Transfer and False to disable.
      • ‘agentPhonenumber’: Provide your Twilio phone number to which the user call conversation is to be transferred to.

To Enable Twilio Voice Channel

  1. In the Bots section of the Bot Builder, click the Bot that you want to add the Twilio Voice channel.
  2. On the Channels tab, click the Twilio Voice icon. The Twilio Voice Channel page gets displayed.
  3. To complete the Channel setup, navigate to the Configurations tab.
    1.  Enter your Twilio Number to be associated with Kore.ai bot.
    2. Select a Language to be used for communication with the bot by end-users.
    3. In the Enable Channel section, select Yes, and then click Save to complete user creation process and channel activation.
  4. From the Voice Call Properties tab,  enter the following details to configure the channel level voice properties:
    Field Description
    End of Conversation Behavior This property can be used to define the bot behavior at the end of the conversation. The options are:

    • Trigger End of Conversation Behavior and configure the Task, Script or Message to be initiated. See here for details.
    • Terminate the call.
    Call Termination Handler Select the name of the Dialog task that you want to use as the call termination handler when the call ends in error.
    Timeout Prompt Enter the default prompt text to play when the user doesn’t provide the input within the timeout period. If you do not specify a Timeout Prompt for any node, this prompt take its place.
    Barge-In Select whether you want to allow a user input while a prompt is in progress. If you select no, the user cannot provide input until IVR completes the prompt.
    Timeout Select the maximum wait time to receive user input from the drop-down list, from 1 second up to 60 seconds.
    No. of Retries Select the maximum number of retries to allow. You can select from just 1 retry up to 10 retries.
  5. Once you have enabled the Twilio channel, we recommend configuring the Welcome Event for Voice Call Settings. This would play a welcome message for users when they connect to the Bot via the Twilio channel.
    For this:

    1. From Natural Language -> Default Conversation -> Event Handlers configure Welcome Event
    2. Select Show Message under Event Configuration
    3. Click the Add Voice Call Settings button to open the Voice Call settings window
    4. Under the Initial Prompts text box, enter the message that needs to be played when the user connects to the Bot.
    5. For details regarding other configuration fields, refer to the Configuring Voice Call Settings for a Node section below.

Dialog Settings

Setting Up Voice Call Properties for Dialog Nodes

On the Voice Call Properties panel for a node, you can enter node-specific prompts and parameters for call-flow behavior such as time-out and retries. If not enabled, you can use the enable button to enable the Voice Call settings for the Bot and then customize for the specific node.

Voice Call settings apply only for the following nodes and message types:

  • Entity Node
  • Message Node
  • Confirmation Node
  • Standard Responses
  • Welcome Message
Note: Most Voice Call settings are the same for all nodes, with a few exceptions.
Configuring Voice Call Settings for a Node

To configure Voice Call settings for a node, hover over the node in the Dialog task, and click the Settings icon. On the Properties panel, click the Voice Call icon.

Voice Call Settings Field Reference
The following sections provide detailed descriptions of each Voice Call setting, including descriptions, applicability to nodes, default values and other key information, as applicable to the Twilio channel

  • Prompts: 
    • You can enter prompts in one of these formats: Plain text, Scrip. If you want to define JavaScript, click the icon before the prompt text message box and select a mode. By default, it is set to Text mode.
      • You can enter more than one prompt messages of different types. You can define their order of sequence by dragging and dropping them.
      • Multiple prompts are useful in scenarios where the prompt has to be played more than once, to avoid repetition, since the prompts are played in order.
    • Initial Prompts
      Apply to: Entity, Confirmation, Message nodes; Standard Responses and Welcome Message
      Prompts that are played when the Twilio first executes the node. If you do not enter a prompt for a node, the default user prompt for the node plays by default. If you do not enter a prompt for Standard Responses and Welcome Message, the default Standard Response and Welcome Message are played by default.
    • Timeout Prompts
      Apply to: Entity, Confirmation; Standard Responses and Welcome Message
      Prompts that are played on the Twilio channel when the user has not given any input within the specified time. If you do not enter a prompt for a node, the default Error Prompt of the node is played. Standard Responses and Welcomes have a default Timeout Prompt that plays if you don’t define No Match Prompts.
    • No Match Prompts – Not applicable for Twilio channel
    • Error Prompts
      Apply to: Entity, Confirmation; 
      Prompts that are played on the IVR channel when user input is an invalid Entity type. If you do not enter a prompt here, the default Error Prompt of the node is played.
  • Grammar
    Applies to: Confirmation; Standard Responses and Welcome Message
    Define the grammar that should be used to detect the user’s utterance. You can define one or more grammars for a node.

    Transcription option is enabled by default for the bot along with specifying the source of the transcription engine, defining grammar isn’t mandatory.

    To define the grammar

    1. Select Speech as the input type. Input type DTMF is disabled for the Twilio channel.
    2. The Source of grammar is set to Custom. The link option is not available for the Twilio channel.
      Enter a list of words or phrases to be used as ‘hints’ in TwiML
  • Advanced Options
    These properties override the properties set in the Bot IVR Settings page.

    Field Description
    Timeout Select the maximum wait time to receive user input from the drop-down list, from 1 second up to 60 seconds. The default value is the same as defined in the Bot IVR Settings page.
    No. of Retries Select the maximum number of retries to allow. You can select from just 1 retry up to 10 retries.
    The default value is the same as defined in the Bot IVR Settings page.
    Behavior on Exceeding Retries
    (applies only to entity node)
    Define behavior when either the timeout or number of retry attempts exceed the specified limit. Options include:

    • Invoke CallTermination Handler
    • Initiate Dialog: Select a Dialog task from the list of bot tasks.
    • Jump to a specific node in the current task: Select a node from the list of nodes in the current Dialog task.
    Barge-In Select whether you want to allow a user input while a prompt is in progress. If you select no, the user input is not considered until the prompt is completed. The default value is No.

Editing the Twilio Voice Channel

To edit the Twilio Voice channel, hover your mouse over the channel to modify, and then click the Settings icon to display the command menu as shown in the following illustration.

Select one of the following commands to modify the channel:

  • Disable/Enable – Click Disable to temporarily disable use of the Twilio Voice for your Bot.To enable use of the Twilio Voice channel, Click Enable.
  • Delete – Click Delete, and then click OK in the Delete Confirmation dialog to permanently delete the Bot channel configuration.
Warning: This operation is permanent, and cannot be undone.
Menu