{"id":18038,"date":"2018-02-02T11:00:43","date_gmt":"2018-02-02T11:00:43","guid":{"rendered":"http:\/\/developer.kore.ai\/v8-0\/?post_type=docs&#038;p=13204"},"modified":"2021-03-25T16:12:15","modified_gmt":"2021-03-25T16:12:15","slug":"adding-the-twilio-voice-channel","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v8-0\/docs\/bots\/channel-enablement\/adding-the-twilio-voice-channel\/","title":{"rendered":"Adding the Twilio Voice Channel"},"content":{"rendered":"<section class=\"l-section wpb_row height_auto\"><div class=\"l-section-h i-cf\"><div class=\"g-cols vc_row type_default valign_top\"><div class=\"vc_col-sm-12 wpb_column vc_column_container\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\">\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<p>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 <em>Twilio Voice<\/em> accounts. To add the Twilio Voice channel to your Bot, you will need to:<\/p>\n<ol>\n<li><b>Get a Twilio Number- <\/b>To enable Twilio Voice channel, you will need to create a Twilio phone number to be associated with this bot.<\/li>\n<li><b>Setup Integration- <\/b>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 \u2018Request URL\u2019 for Voice to activate channel.<\/li>\n<li><b>Associate TwiML App with Twilio Phone Number<\/b>&#8211; To associate TwiML App with Twilio Phone Number, you will need to configure your preferred active Twilio number with TwiML App.<\/li>\n<li><b>Optional Configuration for Setting-up Agent Transfe<\/b>r- To use Agent Transfer functionality you will need to setup the Kore.ai Agent Transfer SDK.<\/li>\n<li><b>Enable Channel- <\/b>Once you setup integration and complete configuration, you will need to enable channel.<\/li>\n<\/ol>\n<div class=\"alert alert-info\">\n<p><b>Note:<\/b> 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:<\/p>\n<ol>\n<li>Enterprise Bots that require user\u2019s authorization to communicate with the bot are not supported on Twilio Voice.<\/li>\n<li>Tasks that require user\u2019s authorization to communicate with external systems should ideally be not included.<\/li>\n<li>Webhook Nodes work asynchronously and are currently are not supported on Twilio Voice.<\/li>\n<li>Use only dialog tasks for best user experience on Twilio Voice channel.<\/li>\n<li>Ensure that the bot responses you are going to configure for Twilio Voice are brief, plain text messages only.<\/li>\n<li>Bot receives user\u2019s voice response from Twilio Voice only after few moments of silence at user\u2019s end and this could appear as a lag to end user.<\/li>\n<\/ol>\n<\/div>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h5><strong>Pre-requisites to add the Twilio Voice Channel<\/strong><\/h5>\n<ol>\n<li><a href=\"https:\/\/www.twilio.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">Login to your Twilio Voice account<\/a> to create a new Twilio number to be associated with your bot.<\/li>\n<li>To get a Twilio Number:\n<ol>\n<li>Navigate to <b>Products and Services<\/b> menu and select <b>Phone Numbers<\/b>.<\/li>\n<li>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.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/16\/Getting-Started.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-13219\" src=\"\/wp-content\/uploads\/sites\/16\/Getting-Started.png\" alt=\"\" width=\"500\" height=\"225\" \/><\/a>Please note that the image may change depending on your Twilio account type.<\/li>\n<\/ol>\n<\/li>\n<li>To setup integration,\n<ol>\n<li>navigate to the <b>Tools<\/b> section of <b>Phone Numbers<\/b> menu.<\/li>\n<li>Select <b>TwiML Apps<\/b> to create a new TwiML App.<\/li>\n<li>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 <b>Request URL<\/b> for Voice.<\/li>\n<li>Click on <b>Save<\/b> to complete the app creation.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/16\/Create-TwiML-App.png2_.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-13220\" src=\"\/wp-content\/uploads\/sites\/16\/Create-TwiML-App.png2_.png\" alt=\"\" width=\"500\" height=\"231\" \/><\/a><\/li>\n<\/ol>\n<\/li>\n<li>To associate TwiML App with Twilio Phone Number:\n<ol>\n<li>Navigate to <b>Manage Numbers<\/b> menu under Phone Numbers<b>. <\/b><\/li>\n<li>From <b>Active Numbers<\/b> section, select the number you would like to associate the TwiML App.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/16\/manage-numbers.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-13221\" src=\"\/wp-content\/uploads\/sites\/16\/manage-numbers.png\" alt=\"\" width=\"500\" height=\"287\" \/><\/a><\/li>\n<li>Under <b>Voice &amp; Fax<\/b> section, select <b>TwiML App<\/b> as the choice in <b>Configure With<\/b> field.<\/li>\n<li>A new field <b>TWIML APP<\/b> will be displayed and from this, select the app you have configured in the previous steps.<\/li>\n<li>Click on Save to complete this app association.<\/li>\n<\/ol>\n<\/li>\n<li>Optionally, you can also setup <b>Agent Transfer<\/b> functionality to transfer user\u2019s call conversation to another Twilio number. For this, you need to configure the Kore.ai Agent Transfer SDK.\n<ol>\n<li>You may download the <b>Agent Transfer SDK<\/b> from Kore.ai GitHub repository and define \u2018data.message\u2019, \u2018transferCallToAgent\u2019 and \u2018agentPhonenumber\u2019 parameters.\n<ul>\n<li><b>\u2018data.message\u2019:<\/b> Define the message to be read out to the end user when call is transferred to agent is initiated.<\/li>\n<li><b>\u2018transferCallToAgent\u2019<\/b>: Set this flag to <b>True<\/b> to enable Agent Transfer and <b>False<\/b> to disable.<\/li>\n<li><b>\u2018agentPhonenumber\u2019<\/b>: Provide your Twilio phone number to which the user call conversation is to be transferred to.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<div class=\"alert alert-info\">\n<p><strong style=\"font-size: 20px\">To <b>Enable <\/b>Twilio Voice Channel<\/strong><\/p>\n<\/div>\n<ol>\n<li>In the <b>Bots<\/b> section of the Bot Builder, click the Bot that you want to add the Twilio Voice channel.<\/li>\n<li>On the <b>Channels<\/b> tab, click the <b>Twilio Voice<\/b> icon. The <b>Twilio Voice<\/b><b> Channel<\/b> page gets displayed.<\/li>\n<li>To complete the Channel setup, navigate to the <strong>Configurations tab<\/strong>.\n<ol>\n<li>\u00a0Enter your Twilio Number to be associated with Kore.ai bot.<\/li>\n<li>Select a <b>Language<\/b> to be used for communication with the bot by end-users.<\/li>\n<li>In the <b>Enable Channel<\/b> section, select <b>Yes<\/b>, and then click <b>Save<\/b> to complete user creation process and channel activation.<\/li>\n<\/ol>\n<\/li>\n<li id=\"properties\">From the <strong>Voice Call Properties<\/strong> tab,\u00a0 enter the details to configure the channel level voice properties, <a href=\"\/docs\/bots\/bot-builder-tool\/dialog-task\/voice-call-properties\/#Channel_Settings\" target=\"_blank\" rel=\"noopener noreferrer\">see here for more details<\/a>.<\/li>\n<li>Once you have enabled the Twilio channel, we recommend configuring the <strong>Telephony Welcome Event<\/strong> for Voice Call Settings. This would play a welcome message for users when they connect to the Bot via the Twilio channel.<br \/>\nFor this:<\/p>\n<ol>\n<li>From\u00a0<strong>Natural Language -&gt; Default Conversation -&gt; Event Handlers<\/strong> configure <strong>Telephony Welcome <\/strong><strong>Event<\/strong><\/li>\n<li>Click the <strong>Use Voice Call Properties<\/strong> button to open the Voice Call settings section<\/li>\n<li>Under the <strong>Initial Prompts<\/strong> text box, enter the message that needs to be played when the user connects to the Bot.<\/li>\n<li>For details regarding other configuration fields, refer to the <a href=\"\/docs\/bots\/bot-builder-tool\/dialog-task\/voice-call-properties\/#Dialog_Node_Settings\" target=\"_blank\" rel=\"noopener noreferrer\">Configuring Voice Call Settings for a Node<\/a> section.<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<div class=\"alert alert-info\"><\/div>\n<h1><span class=\"ez-toc-section\" id=\"Editing_the_Twilio_Voice_Channel\">Editing the Twilio Voice Channel<\/span><\/h1>\n<p>To edit the Twilio Voice channel, hover your mouse over the channel to modify, and then click the <b>Settings<\/b> icon to display the command menu as shown in the following illustration.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/16\/Edit-Twilio-V.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-13222\" src=\"\/wp-content\/uploads\/sites\/16\/Edit-Twilio-V.png\" alt=\"\" width=\"450\" height=\"210\" \/><\/a><br \/>\nSelect one of the following commands to modify the channel:<\/p>\n<ul>\n<li><b>Disable\/Enable<\/b> \u2013 Click <b>Disable<\/b> to temporarily disable use of the Twilio Voice for your Bot.To enable use of the Twilio Voice channel, Click <b>Enable.<\/b><\/li>\n<li><b>Delete<\/b> \u2013 Click <b>Delete<\/b>, and then click <b>OK<\/b> in the <b>Delete Confirmation<\/b> dialog to permanently delete the Bot channel configuration.<\/li>\n<\/ul>\n<div class=\"alert alert-warning\"><b>Warning:<\/b> This operation is permanent, and cannot be undone.<\/div>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/section>\n","protected":false},"excerpt":{"rendered":"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...","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[],"class_list":["post-18038","post","type-post","status-publish","format-standard","hentry","category-channel-enablement"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v8-0\/wp-json\/wp\/v2\/posts\/18038","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v8-0\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v8-0\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v8-0\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v8-0\/wp-json\/wp\/v2\/comments?post=18038"}],"version-history":[{"count":4,"href":"https:\/\/developer.kore.ai\/v8-0\/wp-json\/wp\/v2\/posts\/18038\/revisions"}],"predecessor-version":[{"id":24885,"href":"https:\/\/developer.kore.ai\/v8-0\/wp-json\/wp\/v2\/posts\/18038\/revisions\/24885"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v8-0\/wp-json\/wp\/v2\/media?parent=18038"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v8-0\/wp-json\/wp\/v2\/categories?post=18038"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v8-0\/wp-json\/wp\/v2\/tags?post=18038"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}