{"id":18038,"date":"2018-02-02T11:00:43","date_gmt":"2018-02-02T11:00:43","guid":{"rendered":"http:\/\/developer.kore.ai\/developer-2\/?post_type=docs&#038;p=13204"},"modified":"2021-03-25T10:14:35","modified_gmt":"2021-03-25T10:14:35","slug":"adding-the-twilio-voice-channel","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v7-0\/docs\/bots\/channel-enablement\/adding-the-twilio-voice-channel\/","title":{"rendered":"Adding the Twilio Voice Channel"},"content":{"rendered":"<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\"><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<h5><strong>To add the Twilio Voice Channel<\/strong><\/h5>\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 to.<\/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>In a new browser tab, login to your <b>Twilio Voice account<\/b> to create a new Twilio number to be associated with your bot. To enable Twilio Voice channel, you must create or have a Twilio account. Navigate to <b>Products and Services<\/b> menu and select <b>Phone Numbers<\/b>.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\/11\/Getting-Started.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-13219\" src=\"\/wp-content\/uploads\/sites\/11\/Getting-Started.png\" alt=\"\" width=\"500\" height=\"225\" \/><\/a>Please note that the image may change depending on your Twilio account type.<\/li>\n<li>To setup integration, navigate to the <b>Tools<\/b> section of <b>Phone Numbers<\/b> menu. Select <b>TwiML Apps<\/b> to create a new TwiML App. 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. Click on <b>Save<\/b> to complete the app creation.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/11\/Create-TwiML-App.png2_.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-13220\" src=\"\/wp-content\/uploads\/sites\/11\/Create-TwiML-App.png2_.png\" alt=\"\" width=\"500\" height=\"231\" \/><\/a><\/li>\n<li>Navigate to <b>Manage Numbers<\/b> menu under Phone Numbers to associate TwiML App with Twilio Phone Number<b>. <\/b>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\/11\/manage-numbers.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-13221\" src=\"\/wp-content\/uploads\/sites\/11\/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. A new field <b>TWIML APP<\/b> will be displayed and from this, select the app you have configured in the previous steps. Click on Save to complete this app association.<\/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.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<li>To complete the Channel setup, navigate to the Configurations tab. Enter 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<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\/11\/Edit-Twilio-V.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-13222\" src=\"\/wp-content\/uploads\/sites\/11\/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","protected":false},"excerpt":{"rendered":"<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 Twilio Voice accounts. To&#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\/v7-0\/wp-json\/wp\/v2\/posts\/18038","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v7-0\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v7-0\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-0\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-0\/wp-json\/wp\/v2\/comments?post=18038"}],"version-history":[{"count":1,"href":"https:\/\/developer.kore.ai\/v7-0\/wp-json\/wp\/v2\/posts\/18038\/revisions"}],"predecessor-version":[{"id":20766,"href":"https:\/\/developer.kore.ai\/v7-0\/wp-json\/wp\/v2\/posts\/18038\/revisions\/20766"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v7-0\/wp-json\/wp\/v2\/media?parent=18038"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-0\/wp-json\/wp\/v2\/categories?post=18038"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-0\/wp-json\/wp\/v2\/tags?post=18038"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}