{"id":18038,"date":"2018-02-02T11:00:43","date_gmt":"2018-02-02T11:00:43","guid":{"rendered":"http:\/\/developer.kore.ai\/v10-1\/?post_type=docs&#038;p=13204"},"modified":"2022-09-30T19:13:46","modified_gmt":"2022-09-30T18:13:46","slug":"adding-the-twilio-voice-channel","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/channel-enablement\/adding-the-twilio-voice-channel\/","title":{"rendered":"Adding the Twilio Voice Channel"},"content":{"rendered":"<p><span style=\"font-weight: 400\">To add Twilio Voice as a channel to your Kore.ai assistant, you must get a Twilio phone number and set up a webhook integration to communicate with the VA. Adding the Twilio Voice channel to your Kore.ai VA allows end users to interact with it using their\u00a0<\/span><\/p>\n<table style=\"width: 100%;border-collapse: collapse;background-color: #fffbea\">\n<tbody>\n<tr>\n<td style=\"width: 100%\">\n<h1><span class=\"ez-toc-section\" id=\"Important_Notes\"><span style=\"font-weight: 400\">Important Notes<\/span><\/span><\/h1>\n<p><span style=\"font-weight: 400\">Twilio Voice must be enabled for assistants that are specifically built to work on voice-based channels. Review the following constraints before enabling Twilio Voice as a channel:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Enterprise VAs that require user\u2019s authorization to communicate with it are not supported on Twilio Voice.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Tasks that require user\u2019s authorization to communicate with external systems must not be included.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Webhook Nodes work asynchronously and are currently not supported on Twilio Voice.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Use only dialog tasks for best user experience on Twilio Voice channel.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Ensure that the responses you configure for Twilio Voice are brief, plain text messages only.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">The VA receives the user&#8217;s voice response from Twilio Voice only after a few moments of silence at the user&#8217;s end and this can appear as a lag to the end-user.<\/span><\/li>\n<\/ol>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\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>\n<h1><span class=\"ez-toc-section\" id=\"Prerequisites\"><span style=\"font-weight: 400\">Prerequisites<\/span><\/span><\/h1>\n<p><a href=\"https:\/\/www.twilio.com\/\"><span style=\"font-weight: 400\">Log in to your Twilio Voice account<\/span><\/a><span style=\"font-weight: 400\"> to create a new Twilio number to associate with your assistant. You can buy a number by going to the <\/span><strong>Main Menu &gt; Phone Numbers &gt; Buy a Number<\/strong><span style=\"font-weight: 400\">. If you already have a Twilio phone number that you want to associate with this VA, then you can proceed to the next steps.<\/span><span style=\"font-weight: 400\"><br \/><\/span><\/p>\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>\n<h1><span class=\"ez-toc-section\" id=\"Step_1_Configure_the_Integration_in_Twilio\"><span style=\"font-weight: 400\">Step 1: Configure the Integration in Twilio<\/span><\/span><\/h1>\n<p><span style=\"font-weight: 400\">To set up the integration:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">From Twilio\u2019s main menu, select <\/span><strong>Phone Numbers &gt; Manage &gt; TwiML Apps<\/strong><span style=\"font-weight: 400\">, then click <\/span><strong>Create New TwiML App<\/strong><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Enter a name for the app and copy the <\/span><strong>Webhook URL<\/strong><span style=\"font-weight: 400\"> from the <\/span><strong>Configurations<\/strong><span style=\"font-weight: 400\"> tab of the Twilio Voice Channel page (<\/span><strong>XO Platform Assistant &gt; Deploy &gt; Channels &gt; Twilio Voice<\/strong><span style=\"font-weight: 400\">) and enter in the <\/span><strong>Request URL<\/strong><span style=\"font-weight: 400\"> for <\/span><strong>Voice<\/strong><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click <\/span><strong>Save<\/strong><span style=\"font-weight: 400\"> to complete the app creation.<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400\"><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220930190838\/twiml-app.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-47016\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220930190838\/twiml-app-1024x349.png\" alt=\"\" width=\"640\" height=\"218\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220930190838\/twiml-app-1024x349.png 1024w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220930190838\/twiml-app-300x102.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220930190838\/twiml-app.png 1921w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/span><\/p>\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>\n<h1><span class=\"ez-toc-section\" id=\"Step_2_Associate_a_Phone_Number\"><span style=\"font-weight: 400\">Step 2: Associate a Phone Number<\/span><\/span><\/h1>\n<p><span style=\"font-weight: 400\">To associate the TwiML App with your Twilio Phone Number:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">From the main menu, go to <\/span><strong>Phone Numbers &gt; Manage &gt; Active Numbers<\/strong><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">From the Active Numbers section, <\/span><strong>select the number<\/strong><span style=\"font-weight: 400\"> you want to associate with the TwiML App.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Under the <\/span><strong>Voice &amp; Fax<\/strong><span style=\"font-weight: 400\"> section, select <\/span><strong>TwiML App<\/strong><span style=\"font-weight: 400\"> as the choice in the <\/span><strong>Configure With<\/strong><span style=\"font-weight: 400\"> field.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">A new field called <\/span><strong>TWIML APP<\/strong><span style=\"font-weight: 400\"> is displayed. Select the app you have configured in the previous steps.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click <\/span><strong>Save<\/strong><span style=\"font-weight: 400\"> to complete this app association.<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400\"><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220930190844\/associate-number.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-47019\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220930190844\/associate-number-1024x589.png\" alt=\"\" width=\"640\" height=\"368\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220930190844\/associate-number-1024x589.png 1024w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220930190844\/associate-number-300x173.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220930190844\/associate-number.png 1333w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/span><\/p>\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>\n<h1><span class=\"ez-toc-section\" id=\"Step_3_Set_Up_Agent_Transfer_Optional\"><span style=\"font-weight: 400\">Step 3: Set Up Agent Transfer (Optional)<\/span><\/span><\/h1>\n<p><span style=\"font-weight: 400\">Optionally, you can also set up <\/span><strong>Agent Transfer<\/strong><span style=\"font-weight: 400\"> functionality to transfer the user\u2019s call conversation to another Twilio number. For this, you must configure the Kore.ai Agent Transfer SDK. Download the <\/span><strong>Agent Transfer SDK<\/strong><span style=\"font-weight: 400\"> from the <\/span><a href=\"https:\/\/github.com\/Koredotcom\/BotKit\"><span style=\"font-weight: 400\">Kore.ai GitHub repository<\/span><\/a><span style=\"font-weight: 400\"> and define <\/span><em><span style=\"font-weight: 400\">data.message<\/span><\/em><span style=\"font-weight: 400\">, <\/span><em><span style=\"font-weight: 400\">transferCallToAgent<\/span><\/em><span style=\"font-weight: 400\"> and <\/span><em><span style=\"font-weight: 400\">agentPhonenumber<\/span><\/em><span style=\"font-weight: 400\"> parameters.<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400\"><strong>data.message<\/strong><span style=\"font-weight: 400\">: Define the message to be read out to the end-user when the <\/span><em><span style=\"font-weight: 400\">call is transferred to agent<\/span><\/em><span style=\"font-weight: 400\"> is initiated.<\/span><\/li>\n<li style=\"font-weight: 400\"><strong>transferCallToAgent<\/strong><span style=\"font-weight: 400\">: Set this flag to <\/span><strong>True<\/strong><span style=\"font-weight: 400\"> to enable Agent Transfer and <\/span><strong>False<\/strong><span style=\"font-weight: 400\"> to disable.<\/span><\/li>\n<li style=\"font-weight: 400\"><strong>agentPhonenumber<\/strong><span style=\"font-weight: 400\">: Provide your Twilio phone number to which the user call conversation is transferred.<\/span><\/li>\n<\/ol>\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>\n<h1><span class=\"ez-toc-section\" id=\"Step_4_Enable_the_Twilio_Voice_Channel\"><span style=\"font-weight: 400\">Step 4: Enable the Twilio Voice Channel<\/span><\/span><\/h1>\n<p><span style=\"font-weight: 400\">To enable the Twilio Voice Channel, follow the below steps:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">In the XO Platform, start by selecting the assistant you want to work with.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Go to <\/span><strong>Deploy &gt; Channels &gt; Twilio Voice<\/strong><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">To complete the Channel setup, go to the <\/span><strong>Configurations <\/strong><span style=\"font-weight: 400\">tab.<\/span>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">\u00a0Enter your Twilio Number to associate with the Kore.ai assistant.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Select a <\/span><strong>Language<\/strong><span style=\"font-weight: 400\"> to communicate with the VA by end-users.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">In the <\/span><strong>Enable Channel<\/strong><span style=\"font-weight: 400\"> section, select <\/span><strong>Yes<\/strong><span style=\"font-weight: 400\">, and then click <\/span><strong>Save<\/strong><span style=\"font-weight: 400\"> to complete the user creation process and channel activation.<br \/><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220930190833\/config-channel-8.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-47013\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220930190833\/config-channel-8.png\" alt=\"\" width=\"494\" height=\"598\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220930190833\/config-channel-8.png 699w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220930190833\/config-channel-8-248x300.png 248w\" sizes=\"auto, (max-width: 494px) 100vw, 494px\" \/><\/a><br \/><\/span><\/li>\n<\/ol>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">From the <\/span><strong>Voice Call Properties<\/strong><span style=\"font-weight: 400\"> tab, enter the details to configure the channel level voice properties, <\/span><a href=\"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/bot-builder-tool\/dialog-task\/voice-call-properties\/#Channel_Settings\"><span style=\"font-weight: 400\">click here for more details<\/span><\/a><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Once you have enabled the Twilio channel, it is recommended to configure the <\/span><strong>Telephony Welcome Event<\/strong><span style=\"font-weight: 400\"> for Voice Call Settings. This plays a welcome message for users when they connect to the VA through the Twilio channel. <\/span><span style=\"font-weight: 400\">For this:<\/span>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">From <\/span><strong>Natural Language &gt; Default Conversation &gt; Event Handlers<\/strong><span style=\"font-weight: 400\"> configure <\/span><strong>Telephony Welcome Event<\/strong><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click <\/span><strong>Use Voice Call Properties<\/strong><span style=\"font-weight: 400\"> to open the Voice Call settings section.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Under the <\/span><strong>Initial Prompts<\/strong><span style=\"font-weight: 400\"> text box, enter the message that needs to be played when the user connects to the VA.<\/span><\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p><span style=\"font-weight: 400\">For details regarding the configuration of voice properties at the Dialog Task level, please , refer to <\/span><a href=\"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/bot-builder-tool\/dialog-task\/voice-call-properties\/#Dialog_Node_Settings\"><span style=\"font-weight: 400\">Configuring Voice Call Settings for a Node<\/span><\/a><span style=\"font-weight: 400\">.<\/span><\/p>\n<p><span style=\"font-weight: 400\">After the channel is enabled and all configurations are verified, you can optionally publish the assistant to make it available for end-users, with the new channel. Learn more about<\/span><a href=\"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/publish\/publishing-bot\/\"><span style=\"font-weight: 400\"> Publishing your Virtual Assistant<\/span><\/a><span style=\"font-weight: 400\">.<\/span><\/p>\n<p><span style=\"font-weight: 400\">To learn more about working with Channels within the Kore.ai XO Platform, please see<\/span><a href=\"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/channel-enablement\/adding-channels-to-your-bot\/\"><span style=\"font-weight: 400\"> Channel Enablement.<\/span><\/a><\/p>\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>\n","protected":false},"excerpt":{"rendered":"<p>To add Twilio Voice as a channel to your Kore.ai assistant, you must get a Twilio phone number and set up a webhook integration to communicate with the VA. Adding the Twilio Voice channel to your Kore.ai VA allows end users to interact with it using their\u00a0 Important Notes Twilio Voice must be enabled for&#8230;<\/p>\n","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\/v10-1\/wp-json\/wp\/v2\/posts\/18038","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/comments?post=18038"}],"version-history":[{"count":7,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/18038\/revisions"}],"predecessor-version":[{"id":47022,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/18038\/revisions\/47022"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/media?parent=18038"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/categories?post=18038"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/tags?post=18038"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}