{"id":18038,"date":"2018-02-02T11:00:43","date_gmt":"2018-02-02T11:00:43","guid":{"rendered":"http:\/\/developer.kore.ai\/v9-1\/?post_type=docs&#038;p=13204"},"modified":"2021-05-05T07:02:56","modified_gmt":"2021-05-05T06:02:56","slug":"adding-the-twilio-voice-channel","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v9-1\/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 must get a Twilio phone number and set up webhook integration to communicate with the bot. Adding the Twilio Voice channel to your Kore.ai bot allows end users of your bot to interact with your bot using their <em>Twilio Voice<\/em> accounts. To add the Twilio Voice channel to your bot, you must:<\/p>\n<ol>\n<li><b>Get a Twilio Number <\/b>&#8211; To enable Twilio Voice channel, create a Twilio phone number to associate with this bot.<\/li>\n<li><b>Set Up Integration <\/b>&#8211; To set up the integration, create a <em>TwiML<\/em> App and get <strong>Webhook URL<\/strong> details from <strong>Configurations<\/strong> tab of Twilio Voice channel page to enter it in the <strong>Request URL<\/strong> for Voice to activate the channel.<\/li>\n<li><b>Associate TwiML App with Twilio Phone Number <\/b>&#8211; To associate TwiML App with Twilio Phone Number, configure your preferred active Twilio number with TwiML App.<\/li>\n<li><b>Optional Configuration to Set Up Agent Transfe<\/b><strong>r<\/strong> &#8211; To use Agent Transfer functionality, set up the Kore.ai Agent Transfer SDK.<\/li>\n<li><b>Enable Channel<\/b> &#8211; Once you set up the integration and complete configuration, enable the channel.<\/li>\n<\/ol>\n<div class=\"alert alert-info\">\n<p>Note: Twilio Voice must be enabled for bots that are specifically built to work on voice-based channels. 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 must not be included.<\/li>\n<li>Webhook Nodes work asynchronously and are currently 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 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 can appear as a lag to the 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<h2><span class=\"ez-toc-section\" id=\"Prerequisites\">Prerequisites<\/span><\/h2>\n<ol>\n<li><a href=\"https:\/\/www.twilio.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">Log in to your Twilio Voice account<\/a> to create a new Twilio number to associate with your bot.<\/li>\n<li>To get a Twilio Number:\n<ol>\n<li>Go to the <b>Products and Services<\/b> menu and select <b>Phone Numbers<\/b>.<\/li>\n<li>Create a new Twilio phone number to associate 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\/22\/Getting-Started.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-13219\" src=\"\/wp-content\/uploads\/sites\/22\/Getting-Started.png\" alt=\"\" width=\"500\" height=\"225\" \/><\/a>Note that the image may change depending on your Twilio account type.<\/li>\n<\/ol>\n<\/li>\n<li>To set up the integration:\n<ol>\n<li>Go to the <b>Tools<\/b> section of the <b>Phone Numbers<\/b> menu.<\/li>\n<li>Select <b>TwiML Apps<\/b> to create a new TwiML App.<\/li>\n<li>Enter a name for the app and copy the <strong>Webhook URL<\/strong> from the <strong>Configurations<\/strong> tab of the Twilio Voice Channel page and enter in the <b>Request URL<\/b> for Voice.<\/li>\n<li>Click <b>Save<\/b> to complete the app creation.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/22\/Create-TwiML-App.png2_.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-13220\" src=\"\/wp-content\/uploads\/sites\/22\/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>Go to the <b>Manage Numbers<\/b> menu under <strong>Phone Numbers<\/strong>.<\/li>\n<li>From <b>Active Numbers<\/b> section, select the number you want to associate the TwiML App.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/22\/manage-numbers.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-13221\" src=\"\/wp-content\/uploads\/sites\/22\/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> is displayed. Select the app you have configured in the previous steps.<\/li>\n<li>Click <strong>Save<\/strong> to complete this app association.<\/li>\n<\/ol>\n<\/li>\n<li>Optionally, you can also set up <b>Agent Transfer<\/b> functionality to transfer the user\u2019s call conversation to another Twilio number. For this, you must configure the Kore.ai Agent Transfer SDK.\n<ol>\n<li>Download the <b>Agent Transfer SDK<\/b> from the Kore.ai GitHub repository and define <em>data.message<\/em>, <em>transferCallToAgent<\/em> and <em>agentPhonenumber<\/em> parameters.\n<ul>\n<li><b>data.message<\/b>: Define the message to be read out to the end-user when the <em>call is transferred to agent<\/em> is initiated.<\/li>\n<li><b>transferCallToAgent<\/b>: Set this flag to <b>True<\/b> to enable Agent Transfer and <b>False<\/b> to disable.<\/li>\n<li><b>agentPhonenumber<\/b>: Provide your Twilio phone number to which the user call conversation is transferred.<\/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<h2><span class=\"ez-toc-section\" id=\"Enable_Twilio_Voice_Channel\">Enable Twilio Voice Channel<\/span><\/h2>\n<p>To enable the Twilio Voice Channel, follow the below steps:<\/p>\n<\/div>\n<ol>\n<li>In the <b>Bots<\/b> section of the Bot Builder, click the bot you want to add to 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 is displayed.<\/li>\n<li>To complete the Channel setup, go to the <strong>Configurations <\/strong>tab.\n<ol>\n<li>\u00a0Enter your Twilio Number to associate with the Kore.ai bot.<\/li>\n<li>Select a <b>Language<\/b> to communicate 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 the 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\">click here for more details<\/a>.<\/li>\n<li>Once you have enabled the Twilio channel, it is recommended to configure the <strong>Telephony Welcome Event<\/strong> for Voice Call Settings. This plays a welcome message for users when they connect to the bot through 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 <strong>Use Voice Call Properties<\/strong> 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<h2><span class=\"ez-toc-section\" id=\"Edit_Twilio_Voice_Channel\">Edit Twilio Voice Channel<\/span><\/h2>\n<p>To edit the Twilio Voice channel, follow the below steps:<\/p>\n<ol>\n<li>Hover over the channel to modify and click the <b>Settings<\/b> icon to display the command menu as shown in the following image.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/22\/Edit-Twilio-V.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-13222\" src=\"\/wp-content\/uploads\/sites\/22\/Edit-Twilio-V.png\" alt=\"\" width=\"450\" height=\"210\" \/><\/a><br \/>\nSelect one of the following commands to modify the channel:<\/li>\n<\/ol>\n<ul>\n<li><b>Disable\/Enable<\/b> \u2013 Click <b>Disable<\/b> to temporarily disable the use of the Twilio Voice for your bot. To enable the use of the Twilio Voice channel, Click <b>Enable.<\/b><\/li>\n<li><b>Delete<\/b> \u2013 Click <strong>Delete<\/strong>. On the Delete Confirmation dialog box, click <strong>OK<\/strong> to permanently delete the bot channel configuration.<\/li>\n<\/ul>\n<div class=\"alert alert-warning\">Warning: 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 must get a Twilio phone number and set up webhook integration to communicate with the bot. Adding the Twilio Voice channel to your Kore.ai bot allows end users of your bot to interact with your bot using their Twilio Voice accounts. To add...","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\/v9-1\/wp-json\/wp\/v2\/posts\/18038","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v9-1\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v9-1\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v9-1\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v9-1\/wp-json\/wp\/v2\/comments?post=18038"}],"version-history":[{"count":5,"href":"https:\/\/developer.kore.ai\/v9-1\/wp-json\/wp\/v2\/posts\/18038\/revisions"}],"predecessor-version":[{"id":27338,"href":"https:\/\/developer.kore.ai\/v9-1\/wp-json\/wp\/v2\/posts\/18038\/revisions\/27338"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v9-1\/wp-json\/wp\/v2\/media?parent=18038"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v9-1\/wp-json\/wp\/v2\/categories?post=18038"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v9-1\/wp-json\/wp\/v2\/tags?post=18038"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}