{"id":1980,"date":"2022-03-18T19:39:11","date_gmt":"2022-03-18T19:39:11","guid":{"rendered":"https:\/\/salarydistribution.com\/machine-learning\/2022\/03\/18\/enable-conversational-chatbots-for-telephony-using-amazon-lex-and-the-amazon-chime-sdk\/"},"modified":"2022-03-18T19:39:11","modified_gmt":"2022-03-18T19:39:11","slug":"enable-conversational-chatbots-for-telephony-using-amazon-lex-and-the-amazon-chime-sdk","status":"publish","type":"post","link":"https:\/\/salarydistribution.com\/machine-learning\/2022\/03\/18\/enable-conversational-chatbots-for-telephony-using-amazon-lex-and-the-amazon-chime-sdk\/","title":{"rendered":"Enable conversational chatbots for telephony using Amazon Lex and the Amazon Chime SDK"},"content":{"rendered":"<div id=\"\">\n<p>Conversational AI can deliver powerful, automated, interactive experiences through voice and text. <a href=\"https:\/\/aws.amazon.com\/lex\/\" target=\"_blank\" rel=\"noopener noreferrer\">Amazon Lex<\/a> is a service that combines automatic speech recognition and natural language understanding technologies, so you can build these sophisticated conversational experiences. A common application of conversational AI is found in contact centers: self-service virtual agents. We\u2019re excited to announce that you can now use <a href=\"https:\/\/aws.amazon.com\/chime\/chime-sdk\/\" target=\"_blank\" rel=\"noopener noreferrer\">Amazon Chime SDK<\/a> Public Switched Telephone Network (PSTN) audio to enable conversational self-service applications to reduce call resolution times and automate informational responses.<\/p>\n<p>The Amazon Chime SDK is a set of real-time communications components that developers can use to add audio, messaging, video, and screen-sharing to your web and mobile applications. Amazon Chime SDK PSTN audio integration with Amazon Lex enables builders to develop conversational interfaces for calls to or from the public telephone network. You can now build AI-powered self-service applications such as conversational <a href=\"https:\/\/aws.amazon.com\/lex\/\" target=\"_blank\" rel=\"noopener noreferrer\">interactive voice response systems<\/a> (IVRs), virtual agents, and other telephony applications that use Session Initiation Protocol (SIP) for voice communications.<\/p>\n<p>In addition, we have launched several new features. <a href=\"https:\/\/aws.amazon.com\/about-aws\/whats-new\/2020\/08\/amazon-chime-introduces-amazon-voice-focus-for-noise-suppression\/\" target=\"_blank\" rel=\"noopener noreferrer\">Amazon Voice Focus for PSTN<\/a> provides deep learning-based noise suppression to reduce unwanted noise on calls. You can also now use machine learning (ML)-driven text-to-speech in your application through our native integration to <a href=\"https:\/\/aws.amazon.com\/polly\/\" target=\"_blank\" rel=\"noopener noreferrer\">Amazon Polly<\/a>. All features are now directly integrated with Amazon Chime SDK PSTN audio.<\/p>\n<p>In this post, we teach you how to <a href=\"https:\/\/docs.aws.amazon.com\/lexv2\/latest\/dg\/contact-center.html\" target=\"_blank\" rel=\"noopener noreferrer\">build a conversational IVR system<\/a> for a fictitious travel service that accepts reservations over the phone using Amazon Lex.<\/p>\n<h2>Solution overview<\/h2>\n<p>Amazon Chime SDK PSTN audio makes it easy for developers to build customized telephony applications using the agility and operational simplicity of serverless <a href=\"http:\/\/aws.amazon.com\/lambda\" target=\"_blank\" rel=\"noopener noreferrer\">AWS Lambda<\/a> functions.<\/p>\n<p>For this solution, we use the following components:<\/p>\n<ul>\n<li>Amazon Chime SDK PSTN audio<\/li>\n<li>AWS Lambda<\/li>\n<li>Amazon Lex<\/li>\n<li>Amazon Polly<\/li>\n<\/ul>\n<p>Amazon Lex natively integrates with Amazon Polly to provide text-to-speech capabilities. In this post, we also enable Amazon Voice Focus to reduce background noise on phone calls. In a <a href=\"https:\/\/aws.amazon.com\/blogs\/business-productivity\/building-a-pstn-call-answering-system-with-the-amazon-chime-sdk-amazon-lex-and-amazon-polly\/\" target=\"_blank\" rel=\"noopener noreferrer\">previous post<\/a>, we showed how to integrate with Amazon Lex v1 using the API interface. That is no longer required. The heavy lifting of working with Amazon Lex and Amazon Polly is now replaced by a few simple function calls.<\/p>\n<p>The following diagram illustrates the high-level design of the Amazon Chime SDK Amazon Lex chatbot system.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-34223 size-full aligncenter\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2022\/03\/17\/arch.drawio-1-1.png\" alt=\"\" width=\"408\" height=\"309\"><\/p>\n<p>To help you learn to build using the Amazon Chime SDK PSTN audio service, we have published a <a href=\"https:\/\/github.com\/aws-samples\/amazon-chime-sdk-pstn-audio-workshop\" target=\"_blank\" rel=\"noopener noreferrer\">repository of source code and documentation<\/a> explaining how that source code works. The source code is in a workshop format, with each example program building upon the previous lesson. The final lesson is how to build a complete Amazon Lex-driven chatbot over the phone. That is the lesson we focus on in this post.<\/p>\n<p>As part of this solution, you create the following resources:<\/p>\n<ul>\n<li><strong>SIP media application<\/strong> \u2013 A managed object that specifies a Lambda function to invoke.<\/li>\n<li><strong>SIP rule<\/strong> \u2013 A managed object that specifies a phone number to trigger on and which SIP media application managed object to use to invoke a Lambda function.<\/li>\n<li><strong>Phone number<\/strong> \u2013 An Amazon Chime SDK PSTN phone number provisioned for receiving phone calls.<\/li>\n<li><strong>Lambda function<\/strong> \u2013 A function written in Typescript that is integrated with the PSTN audio service. It receives invocations from the SIP media application and sends actions back that instruct the SIP media application to perform Amazon Polly and Amazon Lex tasks.<\/li>\n<\/ul>\n<p>The demo code is deployed in two parts. The Amazon Lex chatbot example is one of a series of workshop examples that teach how to use Amazon Chime SDK PSTN audio. For this post, you complete the following high-level steps to deploy the chatbot:<\/p>\n<ol>\n<li>Configure the Amazon Lex chatbot.<\/li>\n<li>Clone the code from the GitHub repository.<\/li>\n<li>Deploy the common resources for the workshop (including a phone number).<\/li>\n<li>Deploy the Lambda function that connects Amazon Lex to the phone number.<\/li>\n<\/ol>\n<p>We go through each step in detail.<\/p>\n<h2>Prerequisites<\/h2>\n<p>You must have the following prerequisites:<\/p>\n<ul>\n<li>node V12+\/npm installed<\/li>\n<li>The AWS Command Line Interface (AWS CLI) installed<\/li>\n<li>Node Version Manager (nvm) installed<\/li>\n<li>The node modules typescript aws-sdk (using nvm) installed<\/li>\n<li>AWS credentials configured for the account and Region that you use for this demo<\/li>\n<li>Permissions to create Amazon Chime SIP media applications and phone numbers (make sure your service quota in <code>us-east-1<\/code> or <code>us-west-2<\/code> for phone numbers, voice connectors, SIP media applications, and SIP rules hasn\u2019t been reached)<\/li>\n<li>Deployment must be done in <code>us-east-1<\/code> or <code>us-west-2<\/code> to align with PSTN audio resources<\/li>\n<\/ul>\n<p>For detailed installation instructions, including a script that can automate the installation and an AWS Cloud Development Kit (AWS CDK) project to easily create an Amazon Elastic Compute Cloud (Amazon EC2) development environment, see the <a href=\"https:\/\/github.com\/aws-samples\/amazon-chime-sdk-pstn-audio-workshop\/tree\/main\/docs\/development-environment\" target=\"_blank\" rel=\"noopener noreferrer\">workshop instructions.<\/a><\/p>\n<h2>Configure the Amazon Lex chatbot<\/h2>\n<p>You can build a complete conversational voice bot using Amazon Lex. In this example, you use the Amazon Lex console to build a bot. We skip the steps where you build the Lambda function for Amazon Lex. The focus here is how to connect Amazon Chime PSTN audio to Amazon Lex. For instructions on building custom Amazon Lex bots, refer to <a href=\"https:\/\/docs.aws.amazon.com\/lex\/latest\/dg\/how-it-works.html\" target=\"_blank\" rel=\"noopener noreferrer\">Amazon Lex: How It Works<\/a>. In this example, we use the pre-built \u201cbook trip\u201d example.<\/p>\n<h3>Create a bot<\/h3>\n<p>To create your chatbot, complete the following steps:<\/p>\n<ol>\n<li>Sign in to the Amazon Lex console in the same Region that you deployed the Amazon Chime SDK resources in.<\/li>\n<\/ol>\n<p>This must be in either <code>us-east-1<\/code> or <code>us-west-2<\/code>, depending on where you deployed the Amazon Chime SDK resources using AWS CDK.<\/p>\n<ol start=\"2\">\n<li>In the navigation pane, choose <strong>Bots<\/strong>.<\/li>\n<li>Choose <strong>Create bot<\/strong>.<\/li>\n<li>Select <strong>Start with an example.<br \/><a href=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2022\/03\/16\/create1.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-34161\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2022\/03\/16\/create1.png\" alt=\"\" width=\"847\" height=\"1129\"><\/a><br \/><\/strong><\/li>\n<li>For <strong>Bot name<\/strong>, enter a name (for example, BookTrip).<\/li>\n<li>For <strong>Description<\/strong>, enter an optional description.<\/li>\n<li>Under <strong>IAM permissions<\/strong>, select <strong>Create a role with basic Amazon Lex permissions<\/strong>.<\/li>\n<li>Under <strong>Children\u2019s Online Privacy Protection Act<\/strong>, select <strong>No<\/strong>.<\/li>\n<\/ol>\n<p>This example doesn\u2019t need that protection, but for your own bot creation you should select this option accordingly.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-34162 size-full\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2022\/03\/16\/create2-1.png\" alt=\"\" width=\"1127\" height=\"941\"><\/p>\n<ol start=\"9\">\n<li>Under <strong>Idle session timeout<\/strong>\u00b8 set Session timeout to 1 minute.<\/li>\n<li>You can skip the <strong>Advanced settings<\/strong> section.<\/li>\n<li>Choose <strong>Next<\/strong>.<\/li>\n<\/ol>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-34163 size-full\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2022\/03\/16\/create3.png\" alt=\"\" width=\"1130\" height=\"677\"><\/p>\n<ol start=\"12\">\n<li>For <strong>Select Language<\/strong>, choose your preferred language (for this post, we choose English (US)).<\/li>\n<li>For <strong>Voice interaction<\/strong>, choose the voice you want to use.<\/li>\n<li>You can enter a voice sample and choose <strong>Play<\/strong> to test the phrase and confirm the voice is to your liking.<\/li>\n<li>Leave other settings at their default.<\/li>\n<li>Choose <strong>Done<\/strong>.<\/li>\n<\/ol>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-34164 size-full\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2022\/03\/16\/create4.png\" alt=\"\" width=\"1130\" height=\"744\"><\/p>\n<ol start=\"17\">\n<li>In the <strong>Fulfilment<\/strong> section, enter the following text for On successful fulfilment:<\/li>\n<\/ol>\n<div class=\"hide-language\">\n<pre><code class=\"lang-bash\">Thank you!\u00a0 We'll see you on {CheckInDate}.<\/code><\/pre>\n<\/p><\/div>\n<ol start=\"18\">\n<li>Under <strong>Closing responses<\/strong>, enter the following text for Message:<\/li>\n<\/ol>\n<p><code>Goodbye!<\/code><\/p>\n<ol start=\"19\">\n<li>Choose <strong>Save intent<\/strong>.<\/li>\n<li>Choose <strong>Build<\/strong>.<\/li>\n<\/ol>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-34165 size-full\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2022\/03\/16\/create5.png\" alt=\"\" width=\"1732\" height=\"1102\"><\/p>\n<p>The build process takes a few moments to complete. When it\u2019s finished, you can test the bot on the Amazon Lex console.<\/p>\n<h3>Create a version<\/h3>\n<p>You have now built the bot. Next, we create a version.<\/p>\n<ol>\n<li>Navigate to the <strong>Versions<\/strong> page of your bot (under the bot name in the navigation pane).<\/li>\n<li>Choose <strong>Create version<\/strong>.<\/li>\n<li>Accept all the default values and choose <strong>Create<\/strong>.<\/li>\n<\/ol>\n<p>Your new version is now listed on the <strong>Versions<\/strong> page.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-34166 size-full\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2022\/03\/16\/version1-1.png\" alt=\"\" width=\"2076\" height=\"462\"><\/p>\n<h3>Create an alias<\/h3>\n<p>Next, we create an alias.<\/p>\n<ol>\n<li>In the navigation pane, choose <strong>Aliases<\/strong>.<\/li>\n<li>Choose <strong>Create alias<\/strong>.<\/li>\n<li>For <strong>Alias<\/strong> name, enter a name (for example, production).<\/li>\n<li>Under <strong>Associate<\/strong> with a version, choose <strong>Version 1<\/strong> on the drop-down menu.<\/li>\n<\/ol>\n<p>If you had more than one version of the bot, you could choose the appropriate version here.<\/p>\n<ol start=\"5\">\n<li>Choose <strong>Create<\/strong>.<\/li>\n<\/ol>\n<p>The alias is now listed on the <strong>Aliases<\/strong> page.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-34160 size-full\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2022\/03\/16\/alias1.png\" alt=\"\" width=\"2360\" height=\"338\"><\/p>\n<ol start=\"6\">\n<li>On the <strong>Aliases<\/strong> page, choose the alias you just created.<\/li>\n<li>Under <strong>Resource-based policy<\/strong>, choose <strong>Edit<\/strong>.<\/li>\n<li>Add the following policy, which allows the Amazon Chime SDK PSTN audio to invoke Amazon Lex for you:<\/li>\n<\/ol>\n<div class=\"hide-language\">\n<pre><code class=\"lang-json\">{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      \"Sid\": \"SMALexAccess\",\n      \"Effect\": \"Allow\",\n      \"Principal\": {\n        \"Service\": \"voiceconnector.chime.amazonaws.com\"\n      },\n      \"Action\": \"lex:StartConversation\",\n      \"Resource\": \"&lt;Resource-ARN-for-the-Alias&gt;\",\n      \"Condition\": {\n        \"StringEquals\": {\n          \"AWS:SourceAccount\": \"<span>&lt;account-num&gt;<\/span>\"\n        },\n        \"ArnEquals\": {\n          \"AWS:SourceArn\": \"arn:aws:voiceconnector:<span>&lt;region&gt;<\/span>:<span>&lt;account-num&gt;<\/span>:*\"\n        }\n      }\n    }\n  ]\n}\n<\/code><\/pre>\n<\/p><\/div>\n<p>In the preceding code, provide the resource ARN (located directly above the text box), which is the ARN for the bot alias. Also provide your account number and specify the Region you\u2019re deploying into (<code>us-east-1<\/code> or <code>us-west-2<\/code>). That defines the ARN of the PSTN audio control plane in your account.<\/p>\n<ol start=\"9\">\n<li>Choose <strong>Save<\/strong> to store the policy.<\/li>\n<li>Choose <strong>Copy<\/strong> next to the resource ARN to use in a later step.<\/li>\n<\/ol>\n<p>Congratulations! You have configured an Amazon Lex bot!<\/p>\n<p>In a real chatbot application, you would almost certainly implement a Lambda function to process the intents. This demo program focuses on explaining how to connect to Amazon Chime SDK PSTN audio, so we don\u2019t go into that level of detail. For more information, <a href=\"https:\/\/docs.aws.amazon.com\/lex\/latest\/dg\/ex-book-trip-create-integrate.html\" target=\"_blank\" rel=\"noopener noreferrer\">refer to Add the Lambda Function as a Code Hook<\/a>.<\/p>\n<h2>Clone the GitHub repository<\/h2>\n<p>You can get the code for the entire workshop by cloning the repository:<\/p>\n<div class=\"hide-language\">\n<pre><code class=\"lang-bash\">git clone https:\/\/github.com\/aws-samples\/amazon-chime-sdk-pstn-audio-workshop\ncd amazon-chime-sdk-pstn-audio-workshop\n<\/code><\/pre>\n<\/p><\/div>\n<h2>Deploy the common resources for the workshop<\/h2>\n<p>This workshop uses the AWS CDK to automate the deployment of all needed resources (except the Amazon Lex bot, which you already did). To deploy, run the following code from your terminal:<\/p>\n<div class=\"hide-language\">\n<pre><code class=\"lang-bash\">cdk bootstrap\nyarn deploy\n<\/code><\/pre>\n<\/p><\/div>\n<p>The AWS CDK deploys the resources. We do the bootstrap step to make sure that AWS CDK is properly initialized in the Region you\u2019re deploying into. Note that these examples use AWS CDK version 2.<\/p>\n<p>The repository has a series of lessons that are designed to explain how to develop PSTN audio applications. We recommend reviewing these documents to understand the basics using the first few sample programs. You can then review the Lambda sample program folder. Lastly, follow the steps to configure and then deploy your code. In the terminal, enter the following command:<\/p>\n<h2>Configure your Lambda function to use the Amazon Lex bot ARN<\/h2>\n<p>Open the <code>src\/index.ts<\/code> source code file for the Lambda function and edit the variable <code>botAlias<\/code> near the top of the file (provide the ARN you copied earlier):<\/p>\n<div class=\"hide-language\">\n<pre><code class=\"lang-bash\">const botAlias = \"<span>&lt;Resource-ARN-for-the-Alias&gt;<\/span>\";<\/code><\/pre>\n<\/p><\/div>\n<p>You can now deploy the bot with yarn deploy and swap the new Lambda function into PSTN audio with yarn swap. You can also note the welcome text in the <code>startBotConversationAction<\/code> object:<\/p>\n<div class=\"hide-language\">\n<pre><code class=\"lang-json\">const startBotConversationAction = {\n  Type: \"StartBotConversation\",\n  Parameters: {\n    BotAliasArn: \"none\",\n    LocaleId: \"en_US\",\n    Configuration: {\n      SessionState: {\n        DialogAction: {\n          Type: \"ElicitIntent\"\n        }\n      },\n      WelcomeMessages: [\n        {\n          ContentType: \"PlainText\",\n          Content: \"Welcome to AWS Chime SDK Voice Service. Please say what you would like to do.  For example: I'd like to book a room, or, I'd like to rent a car.\"\n        },\n      ]\n    }\n  }\n}\n<\/code><\/pre>\n<\/p><\/div>\n<p>Amazon Lex starts the bot and uses Amazon Polly to read that text. This gives the caller a greeting, and tells them what they should do next.<\/p>\n<h2>How it works<\/h2>\n<p>The following example adds more actions to what we learned in the <a href=\"https:\/\/github.com\/aws-samples\/amazon-chime-sdk-pstn-audio-workshop\/blob\/main\/lambdas\/call-and-bridge\/README.md\" target=\"_blank\" rel=\"noopener noreferrer\">Call and Bridge Call lesson<\/a>. The <code>NEW_INBOUND_CALL<\/code> event arrives and is processed the same way. We enable Amazon Voice Focus (which enhances the ability of Amazon Lex to understand words) and then immediately hand the incoming call off to the bot with a <code>StartBotConversation<\/code> action. An example of that action looks like the following object:<\/p>\n<div class=\"hide-language\">\n<pre><code class=\"lang-json\">{\n    \"SchemaVersion\": \"1.0\",\n    \"Actions\": [\n        {\n            \"Type\": \"Pause\",\n            \"Parameters\": {\n                \"DurationInMilliseconds\": \"1000\"\n            }\n        },\n        {\n            \"Type\": \"VoiceFocus\",\n            \"Parameters\": {\n                \"Enable\": true,\n                \"CallId\": \"2947dfba-0748-46fc-abc5-a2c21c7569eb\"\n            }\n        },\n        {\n            \"Type\": \"StartBotConversation\",\n            \"Parameters\": {\n                \"BotAliasArn\": \"arn:aws:lex:us-east-1:<span>&lt;account-num&gt;<\/span>:bot-alias\/RQXM74UXC7\/ZYXLOINIJL\",\n                \"LocaleId\": \"en_US\",\n                \"Configuration\": {\n                    \"SessionState\": {\n                        \"DialogAction\": {\n                            \"Type\": \"ElicitIntent\"\n                        }\n                    },\n                    \"WelcomeMessages\": [\n                        {\n                            \"ContentType\": \"PlainText\",\n                            \"Content\": \"Welcome to AWS Chime SDK Voice Service. Please say what you would like to do.  For example: I'd like to order flowers.\"\n                        }\n                    ]\n                }\n            }\n        }\n    ]\n}\n<\/code><\/pre>\n<\/p><\/div>\n<p>When the bot returns an <code>ACTION_SUCCESSFUL<\/code> event, the data collected by the Amazon Lex bot is included in the event. The collected data from the bot is included, and your Lambda function can use that data if needed. However, a common practice for building Amazon Lex applications is to process in the data with the function associated with the Amazon Lex bot. Examples of the event and the returned action are provided in the <a href=\"https:\/\/github.com\/aws-samples\/amazon-chime-sdk-pstn-audio-workshop\/tree\/main\/lambdas\/call-lex-bot#operation\" target=\"_blank\" rel=\"noopener noreferrer\">workshop documentation for this session<\/a>.<\/p>\n<h2>Sequence diagram<\/h2>\n<p>The following diagram shows the sequence of calls made between PSTN audio and the Lambda function:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-34158 size-full aligncenter\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2022\/03\/16\/seqdiag.png\" alt=\"\" width=\"305\" height=\"257\"><\/p>\n<p>For a more detailed explanation of the operation, refer to the <a href=\"https:\/\/github.com\/aws-samples\/amazon-chime-sdk-pstn-audio-workshop\/tree\/main\/lambdas\/call-lex-bot\" target=\"_blank\" rel=\"noopener noreferrer\">workshop documentation<\/a>.<\/p>\n<p>To clean up the resources used in this demo and avoid incurring further charges, complete the following steps:<\/p>\n<ol>\n<li>In the terminal, enter the following code:<\/li>\n<\/ol>\n<ol start=\"2\">\n<li>Return to the workshop folder (<code>cd ..\/..\/<\/code>) and enter the following code:<\/li>\n<\/ol>\n<p>The AWS CloudFormation stack created by the AWS CDK is destroyed, removing all the allocated resources.<\/p>\n<p>In this post, you learned how to build a <a href=\"https:\/\/aws.amazon.com\/lex\/\" target=\"_blank\" rel=\"noopener noreferrer\">conversational interactive voice response<\/a> (IVR) system using Amazon Lex and Amazon Chime SDK PSTN audio. You can use these techniques to build your own system to reduce your own customer call resolution times and automate informational responses on your customers calls.<\/p>\n<p>For more information, see the <a href=\"https:\/\/github.com\/aws-samples\/amazon-chime-sdk-pstn-audio-workshop\" target=\"_blank\" rel=\"noopener noreferrer\">project GitHub repository<\/a> and <a href=\"https:\/\/docs.aws.amazon.com\/chime\/latest\/dg\/build-lambdas-for-sip-sdk.html\" target=\"_blank\" rel=\"noopener noreferrer\">Using the Amazon Chime SDK PSTN Audio service<\/a>.<\/p>\n<hr>\n<h3>About the Author<\/h3>\n<p><a href=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2022\/03\/17\/Greg-Herlein.jpg\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-34175 alignleft\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2022\/03\/17\/Greg-Herlein.jpg\" alt=\"\" width=\"100\" height=\"133\"><\/a><strong>Greg Herlein<\/strong> has led software teams for over 25 years at large and small companies, including several startups. He is currently the Principal Evangelist for the Amazon Chime SDK service where he is passionate about how to help customers build advanced communications software.<\/p>\n<p>       <!-- '\"` -->\n      <\/div>\n","protected":false},"excerpt":{"rendered":"<p>https:\/\/aws.amazon.com\/blogs\/machine-learning\/enable-conversational-chatbots-for-telephony-using-amazon-lex-and-the-amazon-chime-sdk\/<\/p>\n","protected":false},"author":0,"featured_media":1981,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/posts\/1980"}],"collection":[{"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/comments?post=1980"}],"version-history":[{"count":0,"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/posts\/1980\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/media\/1981"}],"wp:attachment":[{"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/media?parent=1980"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/categories?post=1980"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/tags?post=1980"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}