{"id":18695789,"url":"https://github.com/docwho2/java-chime-voicesdk-sma","last_synced_at":"2025-04-12T07:25:52.265Z","repository":{"id":177613664,"uuid":"655795691","full_name":"docwho2/java-chime-voicesdk-sma","owner":"docwho2","description":"Amazon Chime SDK SIP Media Application(SMA) Java Event and Flow Library","archived":false,"fork":false,"pushed_at":"2025-04-04T11:02:18.000Z","size":3202,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-04T12:21:36.466Z","etag":null,"topics":["amazon-chime-sdk","amazon-connect","aws-chime","aws-cloudformation","aws-dynamodb","aws-lambda-java","aws-lex","aws-sam","aws-serverless-application-model","chimesdk","cloudformation","ivr-application","java-21","java-framework","java-library","multilingual","sip-media-application","spanish","voice-assistant","voice-bot"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/docwho2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-19T16:01:27.000Z","updated_at":"2025-04-04T11:02:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"5926cf6e-16c8-417a-b106-b22a43e4feed","html_url":"https://github.com/docwho2/java-chime-voicesdk-sma","commit_stats":null,"previous_names":["docwho2/java-chime-voicesdk-sma"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docwho2%2Fjava-chime-voicesdk-sma","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docwho2%2Fjava-chime-voicesdk-sma/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docwho2%2Fjava-chime-voicesdk-sma/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docwho2%2Fjava-chime-voicesdk-sma/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/docwho2","download_url":"https://codeload.github.com/docwho2/java-chime-voicesdk-sma/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248532433,"owners_count":21119909,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amazon-chime-sdk","amazon-connect","aws-chime","aws-cloudformation","aws-dynamodb","aws-lambda-java","aws-lex","aws-sam","aws-serverless-application-model","chimesdk","cloudformation","ivr-application","java-21","java-framework","java-library","multilingual","sip-media-application","spanish","voice-assistant","voice-bot"],"created_at":"2024-11-07T11:16:13.927Z","updated_at":"2025-04-12T07:25:52.244Z","avatar_url":"https://github.com/docwho2.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Amazon Chime SDK SIP Media Application Java Library\n\n## Background\n\nThis project provides a library to accelerate the development of [SIP Media Applications](https://docs.aws.amazon.com/chime-sdk/latest/ag/use-sip-apps.html) (SMA) in Java. These apps allow for the deployment of multi-region and fault-tolerant self-service applications. Some benefits of using Chime SDK versus [Amazon Connect](https://aws.amazon.com/pm/connect/) for self-service applications are:\n\n- SIP Ingress\n  - Bring your own carrier.\n  - Load balance across regions if desired.\n- SIP Egress\n  - Transfer calls to PBXs or other destinations via SIP for handling (PSTN bypass).\n  - Use your preferred carrier to route calls or Amazon.\n- Built from the ground up to be carrier-class and multi-region.\n- Amazon Chime PSTN numbers can span regions in the US (us-east-1 and us-west-2).\n- Deployed as code versus Connect Flows.\n  - Source control to manage and track changes.\n  - Integrates into DevOps processes already in place.\n- Central call control\n  - Route calls to multiple Connect instances (many organizations have several instances and other groups on legacy systems).\n  - Don't wrap/trombone calls through Connect instances when calls need to be transferred.\n\n## Library Overview\n\nThe library provides two approaches: a JSON event mapping model and, on top of that, a flow-based library that allows programmers to develop call flows without having to deal with event handling and flow optimization. The latter enables developers to quickly build applications with minimal coding.\n\n### JSON Java Events\n\nAWS Lambda is excellent at handling events in JSON. AWS provides the [Lambda Java Events](https://github.com/aws/aws-lambda-java-libs/tree/main/aws-lambda-java-events) library, which handles most of the services that directly integrate with Lambda and provides a full Java Object model for the requests and responses. However, the Chime SMA events are not included in this package. This library follows a similar approach and is used as follows:\n\n- You define your Lambda to implement [RequestHandler](https://github.com/aws/aws-lambda-java-libs/blob/main/aws-lambda-java-core/src/main/java/com/amazonaws/services/lambda/runtime/RequestHandler.java)\u003c[SMARequest](ChimeSMAEvent/src/main/java/cloud/cleo/chimesma/model/SMARequest.java), [SMAResponse](ChimeSMAEvent/src/main/java/cloud/cleo/chimesma/model/SMAResponse.java)\u003e.\n- Process the incoming request and respond as necessary. Refer to [Helloworld.java](Examples/src/main/java/cloud/cleo/chimesma/examples/response/HelloWorld.java) for an example.\n- Note that you are responsible for handling the SMA state machine, and this quickly becomes unmanageable as the complexity of your application increases.\n- Use this low-level approach when you need to control every aspect of the state machine.\n- For more in-depth information about using the library and writing applications, please refer to the Library [README](ChimeSMAEvent/README.md).\n\n### Java Action Flow Model\n\nBuilding upon the above, the \"Action Flow Model\" maps each of the [supported actions for the PSTN Audio service](https://docs.aws.amazon.com/chime-sdk/latest/dg/specify-actions.html) to Java Objects that you can dynamically connect to each other to create flows. These objects are easily extensible, allowing for the creation of complex interactions and routing. This part of the library provides:\n\n- A flow-based approach that makes developing applications easier to understand compared to an event-driven model.\n  - The flow is built statically in memory during initialization (SNAP Start Init), enabling very low latency responses.\n- Strong Java typing and a builder approach for creating action objects.\n- Sensible defaults for most of the action parameters, which can be set or passed into the Lambda (e.g., BOT_ALIAS_ARN to start bot conversations).\n- Derived values whenever possible to reduce lines of code.\n  - Speak actions require you to set SSML or Text for operations. The flow action takes only a text parameter and determines and sets the correct value when sending back the JSON.\n- Response optimization by sending multiple actions at once (SMA supports up to 10).\n  - Each action is evaluated to determine whether it can be chained with another before sending the action list.\n  - Example: Pause -\u003e Speak -\u003e Pause -\u003e StartRecording -\u003e SpeakAndGetDigits, when sent one by one, would require 4 Lambda calls without optimization.\n  - Actions like SpeakAndGetDigits require a result before proceeding and cannot be chained with another action.\n- Java Locale support across all relevant actions to easily build multilingual interactions (Prompts, Speak, and Bots).\n- Easy extension of existing actions. See [CallAndBridgeActionTBTDiversion.java](Examples/src/main/java/cloud/cleo/chimesma/actions/CallAndBridgeActionTBTDiversion.java), which extends the standard [CallAndBridge](ChimeSMAFlow/src/main/java/cloud/cleo/chimesma/actions/CallAndBridgeAction.java) action to write call information to a DynamoDB table that can be used in a Connect flow to implement take-back and transfer. See the use case later in this document.\n\nTo use the Flow Model:\n\n- Simply create a Java Object that inherits from [AbstractFlow](ChimeSMAFlow/src/main/java/cloud/cleo/chimesma/actions/AbstractFlow.java).\n- Implement the `getInitialAction()` method, which returns the start of the flow.\n- Refer to the flow-based [HelloWorld.java](Examples/src/main/java/cloud/cleo/chimesma/examples/actions/HelloWorld.java) example.\n- For more in-depth information about using the library and writing applications, please refer to the Library [README](ChimeSMAFlow/README.md).\n- Please see [Square Retail ChatGPT IVR](https://github.com/docwho2/java-squareup-chatgpt-ivr) for a full working example deployment.\n- Also related is [Priovisioning Chime PSTN SDK resources with Java CDK](https://github.com/docwho2/java-chime-voice-sdk-cdk).\n\n\n## Amazon Connect Take Back and Transfer Use Case\n\nThis use case demonstrates sending calls to [Amazon Connect](https://aws.amazon.com/pm/connect/) and then later moving the call to another destination, such as a PSTN number (which could be another Connect instance), SIP destination, or continuing a flow at the SMA Application. Calls are released from the Connect instance (call leg disconnected by the SMA Application) and moved to another destination.\n\nThe general steps are as follows:\n\n1. The [CallAndBridgeActionTBTDiversion](Examples/src/main/java/cloud/cleo/chimesma/actions/CallAndBridgeActionTBTDiversion.java) action writes call data to a DynamoDB table prior to actually moving the call.\n2. The Connect Script executes a Lambda function to transfer calls.\n\n\n\n### High Level Components\n![Architecture Diagram](assets/SMA-Connect-TBT.png)\n\n\n### Connect Call Flow\n\nIn your Connect flow, let's assume you have the destination number set on the contact attribute \"TransferNumber\". Normally, you would pass that directly to the \"Transfer to phone number\" step to place the outbound call. For this use case, we simply insert an \"Invoke AWS Lambda function\" and \"Wait\" step into the flow. The original transfer step can be left in place as a failsafe. The wait condition gives the Lambda function time to contact the Chime SDK API to signal the SMA app to disconnect the call. Typically, this entire process executes within a sub-second timeframe.\n\n![Call Flow](assets/connectscript.png)\n\n### Transfer Lambda\n\nWhen invoking the Lambda from Connect, we pass both the Diversion header (referred to as \"Call-Forwarding-Indicator\" in Connect) and the TransferNumber.\n\n```plaintext\nDiversion: \u003ckey\u003e, TransferNumber: \u003cdestination\u003e\n```\n\n\u003cimg src=\"assets/lambdastep.png\" width=\"30%\" height=\"30%\"\u003e\n\nThe Lambda function then performs the following steps:\n\n1. Extracts the key from the Diversion header (which is a random E164 number).\n2. Executes a DynamoDB call to retrieve the call information, which consists of:\n   - AWS Region\n   - sipMediaApplicationId\n   - transactionId\n3. Finally, the Lambda function executes a Chime SDK API call to UpdateSipMediaApplicationCall:\n   - The AWS Region is used to initialize the Chime SDK client properly to support calls ingressing from either region.\n   - The TransferNumber is passed as a parameter to inform the SMA Handler where to transfer the call.\n\nSample Lambda code in NodeJS.\n  ```javascript\n        const {ChimeClient, UpdateSipMediaApplicationCallCommand} = require(\"@aws-sdk/client-chime\");\n        const {DynamoDBClient, GetItemCommand} = require(\"@aws-sdk/client-dynamodb\")\n        const ddb = new DynamoDBClient();\n        const regex = /(\\+[0-9]+)/;\n        const table_name = process.env.CALLS_TABLE_NAME;\n        exports.handler = async function (event) {\n            console.log(JSON.stringify(event));\n            let match = event.Details.Parameters.Diversion.match(regex);\n            console.log('Extracted phone is ' + match[1] );\n            \n            const dparams = {\n                Key : {\n                  phoneNumber : {\n                    S: match[1]\n                  }\n                },\n                TableName: table_name\n            };\n            \n            const dresponse = await ddb.send(new GetItemCommand(dparams));\n            console.log(JSON.stringify(dresponse))\n            \n            const cparams = {\n                SipMediaApplicationId: dresponse.Item.sipMediaApplicationId.S,\n                TransactionId: dresponse.Item.transactionId.S,\n                Arguments: {\n                    phoneNumber: event.Details.Parameters.TransferNumberD\n                }   \n            };\n            // We need to know region before initializing client\n            const chime = new ChimeClient({ region: dresponse.Item.region.S,  });\n            const cresponse = await chime.send(new UpdateSipMediaApplicationCallCommand(cparams));\n            console.log(JSON.stringify(cresponse));\n            return {status: 'OK'};\n        };\n  ```\n\n## Example Flow Application\n\nThe [Example Flow](Examples/src/main/java/cloud/cleo/chimesma/examples/actions/ExampleFlow.java) exercises several Actions provided by the Chime SDK. The Connect use case mentioned above is also incorporated into the Demo app.\n\n### High Level Components\n\n![Architecture Diagram](assets/ChimeSMA-Demo.png)\n\n### Calling into the Demo Application\n\n#### Twilio\n\n[Twilio SIP Trunking](https://www.twilio.com/docs/sip-trunking) can be used to send calls into your SMA or the SIP carrier of your choice.  When configuring the Twilio [Origination Settings](https://www.twilio.com/docs/sip-trunking#origination), you can make use of the \"edge\" setting to optimize the SIP traffic.\n\nIn this case, the first SIP URI references a [Voice Connector](https://docs.aws.amazon.com/chime-sdk/latest/ag/voice-connectors.html) in the us-east-1 region. By adding the \"edge=ashburn\" parameter in Twilio's configuration, the call will be egressed into AWS within us-east-1. The same applies for the \"edge=umatilla\" parameter, which is Twilio's edge in Oregon (us-west-2). It's recommended to minimize the traversal of traffic over the internet if possible.\n\n![Twilio Origination Settings](assets/twilio.png)\n\n#### Chime SDK Phone Number\n\nAfter provisioning a [phone number in Chime](https://docs.aws.amazon.com/chime-sdk/latest/ag/provision-phone.html), you need to create a [SIP Rule](https://docs.aws.amazon.com/chime-sdk/latest/ag/understand-sip-data-models.html) for the phone number. Chime does not support load balancing, so you must set up an ordered priority. When you call +1-320-200-2007, you will always be routed to the SMA in the us-east-1 region. Only if that region or the Lambda associated with the SMA goes down will you fail over to the us-west-2 region.\n\nPlease note that Chime currently provides PSTN numbers only in the United States and not in all countries. If you are deploying in Europe or other regions, you will need to use a SIP carrier like Twilio, as mentioned above. I have tested these configurations in the Frankfurt and London regions without any issues. For a complete list of available regions for Chime SDK PSTN numbers, refer to the PSTN section in the [Available Regions](https://docs.aws.amazon.com/chime-sdk/latest/dg/sdk-available-regions.html) documentation.\n\n![Chime Phone Targets](assets/chimephonenumber.png)\n\n#### Asterisk PBX\n\nFor testing apps there certainly is no reason to incur PSTN charges, so I use an IP Phone connected to [Asterisk](https://www.asterisk.org) to place \ncalls into SMA's.  Like Twilio above, in the [pjsip_wizzard.conf](https://wiki.asterisk.org/wiki/display/AST/PJSIP+Configuration+Wizard) you can create trunks \nfor each region endpoint:\n\n```\n[aws-chime-east]\ntype=wizard\ntransport=transport-udp\nremote_hosts=cze9epizslzqslzjpo58ff.voiceconnector.chime.aws\nendpoint/disallow=all\nendpoint/allow=ulaw\nendpoint/direct_media=no\nendpoint/dtmf_mode=auto\nendpoint/rtp_symmetric=yes\n\n[aws-chime-oregon]\ntype=wizard\ntransport=transport-udp\nremote_hosts=dnpz57kzlmo6uvhb1anu3w.voiceconnector.chime.aws\nendpoint/disallow=all\nendpoint/allow=ulaw\nendpoint/direct_media=no\nendpoint/dtmf_mode=auto\nendpoint/rtp_symmetric=yes\n```\n\nYou can observe no less than 12 endpoints are ready to take your call in each region !!!\n\n```\nAsterisk*CLI\u003e pjsip show endpoint aws-chime-oregon \n\nEndpoint:  aws-chime-oregon                                     Not in use    0 of inf\n        Aor:  aws-chime-oregon                                   0\n      Contact:  aws-chime-oregon/sip:dnpz57kzlmo6uvhb1anu3 228c75f425 Created       0.000\n  Transport:  transport-udp             udp      0      0  0.0.0.0:5060\n   Identify:  aws-chime-oregon-identify/aws-chime-oregon\n        Match: 99.77.253.106/32\n        Match: 99.77.253.110/32\n        Match: 99.77.253.109/32\n        Match: 99.77.253.104/32\n        Match: 99.77.253.102/32\n        Match: 99.77.253.107/32\n        Match: 99.77.253.103/32\n        Match: 99.77.253.105/32\n        Match: 99.77.253.11/32\n        Match: 99.77.253.0/32\n        Match: 99.77.253.108/32\n        Match: 99.77.253.100/32\n```\n\nIn the [extensions.conf](https://wiki.asterisk.org/wiki/display/AST/Contexts%2C+Extensions%2C+and+Priorities) you configure a number you can dial \nto route to the trunks in question.  The number  +1-703-555-0122 is a Chime Call in number than can be used to route to SMA's.  This allows you to \ncall into connectors and your SMA with a sip rule without provisioning a phone number at all !\n\n- 290 will try us-east-1 first and if it fails, you hear a prompt (so you know the first region was down) and then it tries the next region\n- 291 will call only us-east-1\n- 292 will call only us-west-2\n\n```\nexten =\u003e 290,1,NoOP(Call to AWS Chime with ordered failover)\n        same =\u003e n,Dial(PJSIP/+17035550122@aws-chime-east)\n        same =\u003e n,Playback(sorry-youre-having-problems)\n        same =\u003e n,Dial(PJSIP/+17035550122@aws-chime-oregon)\n\nexten =\u003e 291,1,NoOP(Call to AWS Chime East)\n        same =\u003e n,Dial(PJSIP/+17035550122@aws-chime-east)\n\nexten =\u003e 292,1,NoOP(Call to AWS Chime Oregon)\n        same =\u003e n,Dial(PJSIP/+17035550122@aws-chime-oregon)\n```\n\n\n### Starting the Flow\n\nThe demo flow is divided into two main parts to demonstrate moving up and down menu levels:\n\n1. The main menu to handle top-level functions.\n2. The recording sub-menu to handle recording and playback of audio.\n\nThe initial action is to play a static prompt and proceed to the main menu.\n\n```java\npublic class ExampleFlow extends AbstractFlow {\n\n    private final static Action MAIN_MENU = getMainMenu();\n    private final static Action CALL_RECORDING_MENU = getCallRecordingMenu();\n    @Override\n    protected Action getInitialAction() {\n\n        // Start with a welcome message and then main menu with region static prompt\n        return PlayAudioAction.builder()\n                .withKey(System.getenv(\"AWS_REGION\") + \"-welcome.wav\") // This is always in english\n                .withNextAction(MAIN_MENU)\n                .withErrorAction(MAIN_MENU)\n                .build();\n\n    }\n\n     public static Action getMainMenu() {\n        // Main menu will be locale specific prompting\n        final var menu = PlayAudioAndGetDigitsAction.builder()\n                .withAudioSource(AudioSourceLocale.builder().withKeyLocale(\"main-menu\").build())\n                .withFailureAudioSource(AudioSourceLocale.builder().withKeyLocale(\"try-again\").build())\n                .withRepeatDurationInMilliseconds(3000)\n                .withRepeat(2)\n                .withMinNumberOfDigits(1)\n                .withMaxNumberOfDigits(1)\n                .withInputDigitsRegex(\"^\\\\d{1}$\")\n                .withErrorAction(goodbye)\n                .withNextActionF(a -\u003e {\n                    switch (a.getReceivedDigits()) {\n                        case \"1\":\n                            return lexBotEN;\n                        case \"2\":\n                            return lexBotES;\n                        case \"3\":\n                            return connect;\n                        case \"4\":\n                            return CALL_RECORDING_MENU;\n                        default:\n                            return goodbye;\n                    }\n                })\n                .build();\n...\n```\n\nThe initial response will make use of the [PlayAudio](https://docs.aws.amazon.com/chime-sdk/latest/dg/play-audio.html) and [PlayAudioAndGetDigits](https://docs.aws.amazon.com/chime-sdk/latest/dg/play-audio-get-digits.html) actions. Both actions utilize static prompts stored in S3. The main menu prompt is locale-specific and can be played in both English and Spanish, as we will see later. These two actions are chainable, so the library will send them both in the initial response.\n\n```json\n{\n    \"SchemaVersion\": \"1.0\",\n    \"Actions\": [\n        {\n            \"Type\": \"PlayAudio\",\n            \"Parameters\": {\n                \"CallId\": \"be23f6a9-66f0-4d55-b6d9-b9e614a729ac\",\n                \"ParticipantTag\": \"LEG-A\",\n                \"AudioSource\": {\n                    \"Type\": \"S3\",\n                    \"BucketName\": \"chime-voicesdk-sma-promptbucket-1sr9bfy6k3k30\",\n                    \"Key\": \"us-west-2-welcome.wav\"\n                }\n            }\n        },\n        {\n            \"Type\": \"PlayAudioAndGetDigits\",\n            \"Parameters\": {\n                \"CallId\": \"be23f6a9-66f0-4d55-b6d9-b9e614a729ac\",\n                \"ParticipantTag\": \"LEG-A\",\n                \"InputDigitsRegex\": \"^\\\\d{1}$\",\n                \"AudioSource\": {\n                    \"Type\": \"S3\",\n                    \"BucketName\": \"chime-voicesdk-sma-promptbucket-1sr9bfy6k3k30\",\n                    \"Key\": \"main-menu-en-US.wav\"\n                },\n                \"FailureAudioSource\": {\n                    \"Type\": \"S3\",\n                    \"BucketName\": \"chime-voicesdk-sma-promptbucket-1sr9bfy6k3k30\",\n                    \"Key\": \"try-again-en-US.wav\"\n                },\n                \"MinNumberOfDigits\": 1,\n                \"MaxNumberOfDigits\": 1,\n                \"Repeat\": 2,\n                \"RepeatDurationInMilliseconds\": 3000\n            }\n        }\n    ],\n    \"TransactionAttributes\": {\n        \"CurrentActionId\": \"6\",\n        \"locale\": \"en-US\",\n        \"CurrentActionIdList\": \"18,6\"\n    }\n}\n```\n\n### Main Menu\n\nThe main menu presents the caller with 4 choices:\n\n- Press 1 for Chat GPT Bot in English.\n- Press 2 for Chat GPT Bot in Spanish.\n- Press 3 for Connect Take Back and Transfer.\n- Press 4 for Audio Recording Menu.\n- Any other key ends the call.\n\nAfter the caller enters a digit (or no input and the timeout occurs), the following code is executed to move the call to the next action.\n\n```java\n.withNextActionF(a -\u003e {\n    switch (a.getReceivedDigits()) {\n        case \"1\":\n            return lexBotEN;\n        case \"2\":\n            return lexBotES;\n        case \"3\":\n            return connect;\n        case \"4\":\n            return CALL_RECORDING_MENU;\n        default:\n            return goodbye;\n    }\n})\n```\n\n### Lex Bots\n\nHanding control over to a Lex Bot in Chime is similar to how it's done in Amazon Connect. We could have used a Bot to handle the main menu function instead of collecting digits and further delegating intents to other bots or flows. In this example, our Bot defined in the CloudFormation [template](template.yaml) has 3 intents:\n\n- \"Quit\": The caller is done talking to ChatGPT and wants to move on.\n- \"Transfer\": The caller wants to speak with a real person.\n- \"FallbackIntent\": Anything else the caller asks is passed to ChatGPT for a response, with context maintained in a DynamoDB table.\n\nWhen the user presses:\n- One: Control is passed to our Bot with the locale set to English (en-US), and the welcome prompt is played in English.\n- Two: Control is passed to our Bot with the locale set to Spanish (es-US), and the welcome prompt is played in Spanish.\n\nAnytime \".withLocale()\" is used on an action, that state is maintained by the library. You can observe this by:\n- Pressing Two to go to the Spanish Bot.\n- Saying \"adiós\" to indicate that you're done.\n- The next action will then be to go to the main menu, but you will hear the main menu in Spanish because the locale was set in a prior action.\n- If you then pressed One, it would set the locale back to English, and when you return to the main menu, it would be in English once again.\n\nYour Lex session is tied to the call ID, so you can do the following:\n- Press One for ChatGPT.\n- Ask, \"What is the biggest lake in Minnesota?\"\n- ChatGPT: \"Lake Superior, anything else?\"\n- Say, \"That's all.\"\n- Back at the main menu now.\n- Press One for ChatGPT again.\n- Ask, \"How deep is that lake?\"\n- ChatGPT: \"Lake Superior is XXX feet deep, etc.\"\n\nThe Bot still retains the context of your conversation with ChatGPT during the call, so it knows that when you come back, you are still referring to Lake Superior. If you tell the Bot that you want to speak with a person, it will return the \"Transfer\" intent, and the next action will be the Connect use case of take back and transfer, which is the same as pressing 3 at the main menu.\n\n```java\n        final var lexBotEN = StartBotConversationAction.builder()\n                .withDescription(\"ChatGPT English\")\n                .withLocale(english)\n                .withContent(\"What can Chat GPT help you with?\")\n                .build();\n\n        final var lexBotES = StartBotConversationAction.builder()\n                .withDescription(\"ChatGPT Spanish\")\n                .withLocale(spanish)\n                .withContent(\"¿En qué puede ayudarte Chat GPT?\")\n                .build();\n\n        // Two invocations of the bot, so create one function and use for both\n        Function\u003cStartBotConversationAction, Action\u003e botNextAction = (a) -\u003e {\n            switch (a.getIntentName()) {\n                // The Lex bot also has intent to speak with someone\n                case \"Transfer\":\n                    return connect;\n                case \"Quit\":\n                default:\n                    return MAIN_MENU;\n            }\n        };\n\n        // Both bots are the same, so the handler is the same\n        lexBotEN.setNextActionF(botNextAction);\n        lexBotES.setNextActionF(botNextAction);\n```\n\n### Connect Take Back and Transfer\n\nWhen pressing 3 or asking the Bot to speak with a person, the call will be transferred to an Amazon Connect instance in us-east-1. This functionality is achieved by extending the base [CallAndBridge](https://docs.aws.amazon.com/chime-sdk/latest/dg/call-and-bridge.html) action. The details of this use case are described in a prior section.\n\nUsing this action in the library is no different from using the base [CallAndBridgeAction](ChimeSMAFlow/src/main/java/cloud/cleo/chimesma/actions/CallAndBridgeAction.java). In this case, we are sending the call to a static number (\"+15052162949\") that points to a sample call flow. The flow executes the transfer Lambda and then transfers the call to \"+18004444444,\" which is a carrier test number (Old MCI number). This is a terminal step, so once you have been transferred, you can simply hang up to release the call resources in Chime.\n\n```java\n// Send call to Connect to demo Take Back and Transfer\nfinal var connect = CallAndBridgeActionTBTDiversion.builder()\n   .withDescription(\"Send Call to AWS Connect\")\n   .withUri(\"+15052162949\")\n   .withRingbackToneKeyLocale(\"transfer\")  // If the Spanish locale is set, the caller will hear transferring in Spanish\n   .build();\n```\n\nThis action could be further extended to save the Locale in the DynamoDB table. When the call lands at Connect, a Lambda function could be used to retrieve this information and set the language in the Connect flow or any other data collected in the Chime SMA app, such as caller account number, etc.\n\n### Record Audio Menu\n\nWhen pressing 4 at the main menu, we go to a sub-menu that uses Speak instead of static prompts like the main menu. The menu options are as follows:\n\n- Pressing one allows you to record audio, which is saved to the default RECORD_BUCKET.\n- Pressing two plays back your recorded audio or a message indicating that you have not recorded audio yet.\n- Any other key returns you back to the main menu.\n\nHere is an example code snippet that represents the actions and their configuration:\n\n```java\n// This menu is just in English, we will use Speak instead of static prompts like the main menu\nfinal var menu = SpeakAndGetDigitsAction.builder()\n        .withSpeechParameters(SpeakAndGetDigitsAction.SpeechParameters.builder()\n                .withText(\"Call Recording Menu. Press One to record an Audio File. Press Two to listen to your recorded Audio File. Press any other key to return to the Main Menu.\").build())\n        .withFailureSpeechParameters(SpeakAndGetDigitsAction.SpeechParameters.builder()\n                .withText(\"Please try again.\").build())\n        .withRepeatDurationInMilliseconds(3000)\n        .withRepeat(2)\n        .withMinNumberOfDigits(1)\n        .withMaxNumberOfDigits(1)\n        .withInputDigitsRegex(\"^\\\\d{1}$\")\n        .withErrorAction(MAIN_MENU)\n        .build();\n\nmenu.setNextActionF(a -\u003e {\n    switch (a.getReceivedDigits()) {\n        case \"1\":\n            return recordPrompt;\n        case \"2\":\n            final var key = a.getTransactionAttribute(RecordAudioAction.RECORD_AUDIO_KEY);\n            if (key != null) {\n                // Some Audio has been recorded\n                return playAudio;\n            } else {\n                // No Audio has been recorded\n                return noRecording;\n            }\n        default:\n            return MAIN_MENU;\n    }\n});\n```\n\nThe [RecordAudio](https://docs.aws.amazon.com/chime-sdk/latest/dg/record-audio.html) action does not provide an indication to start recording, so a beep WAV file is played to indicate that recording is active. Once again, the library optimizes the interaction by sending all the actions at once to create a fluid flow for the caller.\n\nWhen pressing one to record audio, the SMA response would look like this:\n\n```json\n{\n    \"SchemaVersion\": \"1.0\",\n    \"Actions\": [\n        {\n            \"Type\": \"Speak\",\n            \"Parameters\": {\n                \"Text\": \"At the beep, record up to 30 seconds of Audio. Press any key to stop the recording.\",\n                \"CallId\": \"f085191e-c647-4503-9d3a-3cba41aead2e\",\n                \"LanguageCode\": \"en-US\",\n                \"TextType\": \"text\",\n                \"VoiceId\": \"Joanna\"\n            }\n        },\n        {\n            \"Type\": \"PlayAudio\",\n            \"Parameters\": {\n                \"CallId\": \"f085191e-c647-4503-9d3a-3cba41aead2e\",\n                \"AudioSource\": {\n                    \"Type\": \"S3\",\n                    \"BucketName\": \"chime-voicesdk-sma-promptbucket-1sr9bfy6k3k30\",\n                    \"Key\": \"beep.wav\"\n                }\n            }\n        },\n        {\n            \"Type\": \"RecordAudio\",\n            \"Parameters\": {\n                \"CallId\": \"f085191e-c647-4503-9d3a-3cba41aead2e\",\n                \"DurationInSeconds\": 30,\n                \"SilenceDurationInSeconds\": 5,\n                \"RecordingTerminators\": [\n                    \"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"#\",\"*\"\n                ],\n                \"RecordingDestination\": {\n                    \"Type\": \"S3\",\n                    \"BucketName\": \"chime-voicesdk-sma-recordbucket-rfr6d796zj6i\"\n                }\n            }\n        }\n    ],\n    \"TransactionAttributes\": {\n        \"CurrentActionId\": \"13\",\n        \"locale\": \"en-US\",\n        \"CurrentActionIdList\": \"15,14,13\"\n    }\n}\n```\n\nThis response includes the Speak action to prompt the user, the PlayAudio action to play the beep sound, and the RecordAudio action to record the audio. The transaction attributes maintain the current action and locale information for future references.\n\n### Wrapping Up\n\nThis library, in combination with the CloudFormation template, demonstrates the following capabilities:\n\n- Deployment of resilient multi-region voice applications.\n- Creation of static prompts with Polly at deploy time to save costs on Polly usage.\n- Deployment of static prompt files with the application.\n- Easy integration with source control and pipeline deployment using \"sam deploy\".\n- Programming flows in Java that are easy to understand compared to the SMA Event handling model.\n- Extensibility of actions to keep flows concise and easy to understand.\n- Utilization of Lambda SNAP Start to improve latency and performance.\n- Locale support for multi-lingual applications.\n- Leveraging the full power of Java for routing decisions and input/output to the actions.\n\nIn the future, some additions that could be made to the demo include:\n\n- Transfer action that uses a global DynamoDB table to map logical names to transfer destinations, such as SIP or PSTN, with additional information like \"Queue\" or \"Skill\" names for Connect to pick up.\n- Time of Day action that retrieves hours from an API or DynamoDB table, allowing for outputs such as Open/Closed status and support for holiday/special hours.\n- Utilizing [Function Calling](https://platform.openai.com/docs/guides/gpt/function-calling) to enhance the capabilities of the ChatGPT bot.\n\nThese enhancements would further expand the functionality and flexibility of the library.\n\n## Deploy the Project\n\nThe Serverless Application Model Command Line Interface (SAM CLI) is an extension of the AWS CLI that adds functionality for building and testing Lambda applications.  \nBefore proceeding, it is assumed you have valid AWS credentials setup with the AWS CLI and permissions to perform CloudFormation stack operations.\n\nTo use the SAM CLI, you need the following tools.\n\n* SAM CLI - [Install the SAM CLI](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html)\n* Java21 - [Install the Java 21](https://docs.aws.amazon.com/corretto/latest/corretto-21-ug/downloads-list.html)\n* Maven - [Install Maven](https://maven.apache.org/install.html)\n\nIf you have brew installed then\n```bash\nbrew install aws-sam-cli\nbrew install corretto@21\nbrew install maven\n```\n\nTo build and deploy, run the following in your shell.  Note: you must edit the [samconfig.toml](samconfig.toml) and change the parameteres to \ntaste before running the build like the Connect Instance ID and SMA ID to ones that exist within that region.\n\n```bash\ngit clone https://github.com/docwho2/java-chime-voicesdk-sma.git\ncd java-chime-voicesdk-sma\n./init.bash\nsam build\nsam deploy --config-env east\nsam deploy --config-env west\n```\n\nThe commands perform the follwoing operations:\n- Clones the repository into your local directory\n- Change directory into the cloned repository\n- Set up required libraries and install the parent POM used by Lambda functions.\n- Build the components that will be deployed by SAM\n- Package and deploy the project to us-east-1\n- Package and deploy the project to us-west-2\n\nYou will see the progress as the stack deploys.  As metntioned earlier, you will need to put your OpenAI API Key into parameter store or the deploy will error, but it will give you an error message \nthat tells you there is no value for \"OPENAI_API_KEY\" in the [Parameter Store](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-parameter-store.html).\n\n\n\n## Fetch, tail, and filter Lambda function logs\n\nTo simplify troubleshooting, SAM CLI has a command called `sam logs`. `sam logs` lets you fetch logs generated by the deployed Lambda functions from the command line. In addition to printing the logs on the terminal, this command has several nifty features to help you quickly see what's going on with the demo.\n\n\n```bash\nsam logs --tail\n```\n\nExample:\n```\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:16:34.013000 RESTORE_START Runtime Version: java:11.v21\tRuntime Version ARN: arn:aws:lambda:us-east-1::runtime:156ab0dc268a6b4a8dedcbcf0974795cafba2ee8760fe386062fffdbb887b971\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:16:34.376000 RESTORE_REPORT Restore Duration: 511.25 ms\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:16:34.379000 START RequestId: b771fecc-1b53-4faf-922d-1d74357b1676 Version: 56\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:16:34.565000 b771fecc-1b53-4faf-922d-1d74357b1676 DEBUG AbstractFlow:214 - SMARequest(schemaVersion=1.0, sequence=1, invocationEventType=NEW_INBOUND_CALL, callDetails=SMARequest.CallDetails(transactionId=6600de06-fc5a-4a57-8c11-420ccae6f93b, transactionAttributes=null, awsAccountId=364253738352, awsRegion=us-east-1, sipMediaApplicationId=cf3e17cd-f4e5-44c3-ab04-325e6b3a6709, participants=[SMARequest.Participant(callId=6cbd7153-b1cd-48b1-8598-9687f6903db1, participantTag=LEG-A, to=+17035550122, from=+16128140714, direction=Inbound, startTime=2023-07-05T10:16:33.239Z, status=null)]), errorType=null, errorMessage=null, actionData=null)\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:16:34.566000 b771fecc-1b53-4faf-922d-1d74357b1676 DEBUG AbstractFlow:219 - New Inbound Call, starting flow\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:16:34.567000 b771fecc-1b53-4faf-922d-1d74357b1676 INFO  AbstractFlow:149 - Adding action PlayAudio key=[us-east-1-welcome.wav] bucket=[chime-voicesdk-sma-promptbucket-1p1tvnc4izve]\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:16:34.567000 b771fecc-1b53-4faf-922d-1d74357b1676 INFO  AbstractFlow:157 - Chaining action PlayAudioAndGetDigits [^\\d{1}$]\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:16:34.595000 b771fecc-1b53-4faf-922d-1d74357b1676 INFO  AbstractFlow:238 - New Call Handler Code Here\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:16:34.682000 b771fecc-1b53-4faf-922d-1d74357b1676 DEBUG AbstractFlow:314 - {\"SchemaVersion\":\"1.0\",\"Actions\":[{\"Type\":\"PlayAudio\",\"Parameters\":{\"CallId\":\"6cbd7153-b1cd-48b1-8598-9687f6903db1\",\"ParticipantTag\":\"LEG-A\",\"AudioSource\":{\"Type\":\"S3\",\"BucketName\":\"chime-voicesdk-sma-promptbucket-1p1tvnc4izve\",\"Key\":\"us-east-1-welcome.wav\"}}},{\"Type\":\"PlayAudioAndGetDigits\",\"Parameters\":{\"CallId\":\"6cbd7153-b1cd-48b1-8598-9687f6903db1\",\"ParticipantTag\":\"LEG-A\",\"InputDigitsRegex\":\"^\\\\d{1}$\",\"AudioSource\":{\"Type\":\"S3\",\"BucketName\":\"chime-voicesdk-sma-promptbucket-1p1tvnc4izve\",\"Key\":\"main-menu-en-US.wav\"},\"FailureAudioSource\":{\"Type\":\"S3\",\"BucketName\":\"chime-voicesdk-sma-promptbucket-1p1tvnc4izve\",\"Key\":\"try-again-en-US.wav\"},\"MinNumberOfDigits\":1,\"MaxNumberOfDigits\":1,\"Repeat\":2,\"RepeatDurationInMilliseconds\":3000}}],\"TransactionAttributes\":{\"CurrentActionId\":\"6\",\"locale\":\"en-US\",\"CurrentActionIdList\":\"18,6\"}}\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:16:34.686000 END RequestId: b771fecc-1b53-4faf-922d-1d74357b1676\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:16:34.686000 REPORT RequestId: b771fecc-1b53-4faf-922d-1d74357b1676\tDuration: 306.34 ms\tBilled Duration: 610 ms\tMemory Size: 3009 MB\tMax Memory Used: 155 MB\tRestore Duration: 511.25 ms\tBilled Restore Duration: 303 ms\t\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:16:43.928000 START RequestId: 7667964c-05ac-4891-b28c-56f1282ebc1b Version: 56\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:16:44.025000 7667964c-05ac-4891-b28c-56f1282ebc1b DEBUG AbstractFlow:214 - SMARequest(schemaVersion=1.0, sequence=2, invocationEventType=ACTION_SUCCESSFUL, callDetails=SMARequest.CallDetails(transactionId=6600de06-fc5a-4a57-8c11-420ccae6f93b, transactionAttributes={CurrentActionId=6, locale=en-US, CurrentActionIdList=18,6}, awsAccountId=364253738352, awsRegion=us-east-1, sipMediaApplicationId=cf3e17cd-f4e5-44c3-ab04-325e6b3a6709, participants=[SMARequest.Participant(callId=6cbd7153-b1cd-48b1-8598-9687f6903db1, participantTag=LEG-A, to=+17035550122, from=+16128140714, direction=Inbound, startTime=2023-07-05T10:16:33.239Z, status=Connected)]), errorType=null, errorMessage=null, actionData=ResponsePlayAudioAndGetDigits(type=PlayAudioAndGetDigits, parameters=ResponsePlayAudioAndGetDigits.Parameters(callId=6cbd7153-b1cd-48b1-8598-9687f6903db1, participantTag=LEG-A, inputDigitsRegex=^\\d{1}$, audioSource=ResponsePlayAudio.AudioSource(type=S3, bucketName=chime-voicesdk-sma-promptbucket-1p1tvnc4izve, key=main-menu-en-US.wav), failureAudioSource=ResponsePlayAudio.AudioSource(type=S3, bucketName=chime-voicesdk-sma-promptbucket-1p1tvnc4izve, key=try-again-en-US.wav), minNumberOfDigits=1, maxNumberOfDigits=1, terminatorDigits=null, inBetweenDigitsDurationInMilliseconds=3000, repeat=2, repeatDurationInMilliseconds=3000), receivedDigits=1, errorType=null, errorMessage=null))\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:16:44.029000 7667964c-05ac-4891-b28c-56f1282ebc1b DEBUG AbstractFlow:207 - Current Action is PlayAudioAndGetDigits [^\\d{1}$] with ID 6\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:16:44.030000 7667964c-05ac-4891-b28c-56f1282ebc1b DEBUG Action:180 - This Action has a locale set to en_US\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:16:44.031000 7667964c-05ac-4891-b28c-56f1282ebc1b INFO  AbstractFlow:149 - Adding action StartBotConversation desc=[ChatGPT English] da=[ElicitIntent] content=[What can Chat GPT help you with?]\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:16:44.045000 7667964c-05ac-4891-b28c-56f1282ebc1b INFO  AbstractFlow:340 - Moving to next action: StartBotConversation desc=[ChatGPT English] da=[ElicitIntent] content=[What can Chat GPT help you with?]\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:16:44.065000 7667964c-05ac-4891-b28c-56f1282ebc1b DEBUG AbstractFlow:314 - {\"SchemaVersion\":\"1.0\",\"Actions\":[{\"Type\":\"StartBotConversation\",\"Parameters\":{\"CallId\":\"6cbd7153-b1cd-48b1-8598-9687f6903db1\",\"BotAliasArn\":\"arn:aws:lex:us-east-1:364253738352:bot-alias/GDGCNIR2DC/NMJJX2WV6A\",\"LocaleId\":\"en_US\",\"Configuration\":{\"SessionState\":{\"DialogAction\":{\"Type\":\"ElicitIntent\"}},\"WelcomeMessages\":[{\"Content\":\"What can Chat GPT help you with?\",\"ContentType\":\"PlainText\"}]}}}],\"TransactionAttributes\":{\"CurrentActionId\":\"4\",\"locale\":\"en-US\",\"CurrentActionIdList\":\"4\"}}\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:16:44.067000 END RequestId: 7667964c-05ac-4891-b28c-56f1282ebc1b\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:16:44.067000 REPORT RequestId: 7667964c-05ac-4891-b28c-56f1282ebc1b\tDuration: 138.27 ms\tBilled Duration: 139 ms\tMemory Size: 3009 MB\tMax Memory Used: 159 MB\t\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:16:55.980000 START RequestId: c5617d6b-3eff-409b-bff8-7f6ed83c319a Version: 56\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:16:56.025000 c5617d6b-3eff-409b-bff8-7f6ed83c319a DEBUG AbstractFlow:214 - SMARequest(schemaVersion=1.0, sequence=3, invocationEventType=ACTION_SUCCESSFUL, callDetails=SMARequest.CallDetails(transactionId=6600de06-fc5a-4a57-8c11-420ccae6f93b, transactionAttributes={CurrentActionId=4, locale=en-US, CurrentActionIdList=4}, awsAccountId=364253738352, awsRegion=us-east-1, sipMediaApplicationId=cf3e17cd-f4e5-44c3-ab04-325e6b3a6709, participants=[SMARequest.Participant(callId=6cbd7153-b1cd-48b1-8598-9687f6903db1, participantTag=LEG-A, to=+17035550122, from=+16128140714, direction=Inbound, startTime=2023-07-05T10:16:33.239Z, status=Connected)]), errorType=null, errorMessage=null, actionData=ActionDataStartBotConversation(callId=null, type=StartBotConversation, parameters=ResponseStartBotConversation.Parameters(callId=6cbd7153-b1cd-48b1-8598-9687f6903db1, participantTag=LEG-A, botAliasArn=arn:aws:lex:us-east-1:364253738352:bot-alias/GDGCNIR2DC/NMJJX2WV6A, localeId=en_US, configuration=ResponseStartBotConversation.Configuration(sessionState=ResponseStartBotConversation.SessionState(sessionAttributes=null, dialogAction=ResponseStartBotConversation.DialogAction(type=ElicitIntent), intent=null), welcomeMessages=[ResponseStartBotConversation.WelcomeMessage(content=What can Chat GPT help you with?, contentType=PlainText)])), intentResult=ActionDataStartBotConversation.IntentResult(sessionId=6cbd7153-b1cd-48b1-8598-9687f6903db1, sessionState=ResponseStartBotConversation.SessionState(sessionAttributes={}, dialogAction=null, intent=ResponseStartBotConversation.Intent(name=Quit, Slots={}, state=ReadyForFulfillment, confirmationState=None)), interpretations=[ActionDataStartBotConversation.Interpretation(intent=ResponseStartBotConversation.Intent(name=Quit, Slots={}, state=ReadyForFulfillment, confirmationState=None), nluConfidence=ActionDataStartBotConversation.NluConfidence(score=1.0)), ActionDataStartBotConversation.Interpretation(intent=ResponseStartBotConversation.Intent(name=FallbackIntent, Slots={}, state=null, confirmationState=null), nluConfidence=null), ActionDataStartBotConversation.Interpretation(intent=ResponseStartBotConversation.Intent(name=Transfer, Slots={}, state=null, confirmationState=null), nluConfidence=ActionDataStartBotConversation.NluConfidence(score=0.42))]), errorType=null, errorMessage=null))\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:16:56.026000 c5617d6b-3eff-409b-bff8-7f6ed83c319a DEBUG Action:180 - This Action has a locale set to en_US\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:16:56.026000 c5617d6b-3eff-409b-bff8-7f6ed83c319a DEBUG AbstractFlow:207 - Current Action is StartBotConversation desc=[ChatGPT English] da=[ElicitIntent] content=[What can Chat GPT help you with?] with ID 4\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:16:56.026000 c5617d6b-3eff-409b-bff8-7f6ed83c319a DEBUG Action:99 - Lex Bot has finished and Intent is Quit\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:16:56.027000 c5617d6b-3eff-409b-bff8-7f6ed83c319a INFO  AbstractFlow:149 - Adding action PlayAudioAndGetDigits [^\\d{1}$]\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:16:56.027000 c5617d6b-3eff-409b-bff8-7f6ed83c319a INFO  AbstractFlow:340 - Moving to next action: PlayAudioAndGetDigits [^\\d{1}$]\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:16:56.028000 c5617d6b-3eff-409b-bff8-7f6ed83c319a DEBUG AbstractFlow:314 - {\"SchemaVersion\":\"1.0\",\"Actions\":[{\"Type\":\"PlayAudioAndGetDigits\",\"Parameters\":{\"CallId\":\"6cbd7153-b1cd-48b1-8598-9687f6903db1\",\"ParticipantTag\":\"LEG-A\",\"InputDigitsRegex\":\"^\\\\d{1}$\",\"AudioSource\":{\"Type\":\"S3\",\"BucketName\":\"chime-voicesdk-sma-promptbucket-1p1tvnc4izve\",\"Key\":\"main-menu-en-US.wav\"},\"FailureAudioSource\":{\"Type\":\"S3\",\"BucketName\":\"chime-voicesdk-sma-promptbucket-1p1tvnc4izve\",\"Key\":\"try-again-en-US.wav\"},\"MinNumberOfDigits\":1,\"MaxNumberOfDigits\":1,\"Repeat\":2,\"RepeatDurationInMilliseconds\":3000}}],\"TransactionAttributes\":{\"CurrentActionId\":\"6\",\"locale\":\"en-US\",\"CurrentActionIdList\":\"6\",\"LexLastMatchedIntent\":\"Quit\"}}\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:16:56.031000 END RequestId: c5617d6b-3eff-409b-bff8-7f6ed83c319a\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:16:56.031000 REPORT RequestId: c5617d6b-3eff-409b-bff8-7f6ed83c319a\tDuration: 50.76 ms\tBilled Duration: 51 ms\tMemory Size: 3009 MB\tMax Memory Used: 159 MB\t\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:16:58.051000 START RequestId: 09cea32b-12e6-4283-9092-15e3fd5eabf8 Version: 56\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:16:58.054000 09cea32b-12e6-4283-9092-15e3fd5eabf8 DEBUG AbstractFlow:214 - SMARequest(schemaVersion=1.0, sequence=4, invocationEventType=ACTION_SUCCESSFUL, callDetails=SMARequest.CallDetails(transactionId=6600de06-fc5a-4a57-8c11-420ccae6f93b, transactionAttributes={CurrentActionId=6, LexLastMatchedIntent=Quit, locale=en-US, CurrentActionIdList=6}, awsAccountId=364253738352, awsRegion=us-east-1, sipMediaApplicationId=cf3e17cd-f4e5-44c3-ab04-325e6b3a6709, participants=[SMARequest.Participant(callId=6cbd7153-b1cd-48b1-8598-9687f6903db1, participantTag=LEG-A, to=+17035550122, from=+16128140714, direction=Inbound, startTime=2023-07-05T10:16:33.239Z, status=Connected)]), errorType=null, errorMessage=null, actionData=ResponsePlayAudioAndGetDigits(type=PlayAudioAndGetDigits, parameters=ResponsePlayAudioAndGetDigits.Parameters(callId=6cbd7153-b1cd-48b1-8598-9687f6903db1, participantTag=LEG-A, inputDigitsRegex=^\\d{1}$, audioSource=ResponsePlayAudio.AudioSource(type=S3, bucketName=chime-voicesdk-sma-promptbucket-1p1tvnc4izve, key=main-menu-en-US.wav), failureAudioSource=ResponsePlayAudio.AudioSource(type=S3, bucketName=chime-voicesdk-sma-promptbucket-1p1tvnc4izve, key=try-again-en-US.wav), minNumberOfDigits=1, maxNumberOfDigits=1, terminatorDigits=null, inBetweenDigitsDurationInMilliseconds=3000, repeat=2, repeatDurationInMilliseconds=3000), receivedDigits=8, errorType=null, errorMessage=null))\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:16:58.054000 09cea32b-12e6-4283-9092-15e3fd5eabf8 DEBUG AbstractFlow:207 - Current Action is PlayAudioAndGetDigits [^\\d{1}$] with ID 6\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:16:58.054000 09cea32b-12e6-4283-9092-15e3fd5eabf8 INFO  AbstractFlow:149 - Adding action PlayAudio desc=[Say Goodbye] keyL=[goodbye] bucket=[chime-voicesdk-sma-promptbucket-1p1tvnc4izve]\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:16:58.055000 09cea32b-12e6-4283-9092-15e3fd5eabf8 INFO  AbstractFlow:157 - Chaining action Hangup desc=[This is my last step]\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:16:58.057000 09cea32b-12e6-4283-9092-15e3fd5eabf8 INFO  AbstractFlow:340 - Moving to next action: PlayAudio desc=[Say Goodbye] keyL=[goodbye] bucket=[chime-voicesdk-sma-promptbucket-1p1tvnc4izve]\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:16:58.060000 09cea32b-12e6-4283-9092-15e3fd5eabf8 DEBUG AbstractFlow:314 - {\"SchemaVersion\":\"1.0\",\"Actions\":[{\"Type\":\"PlayAudio\",\"Parameters\":{\"CallId\":\"6cbd7153-b1cd-48b1-8598-9687f6903db1\",\"ParticipantTag\":\"LEG-A\",\"AudioSource\":{\"Type\":\"S3\",\"BucketName\":\"chime-voicesdk-sma-promptbucket-1p1tvnc4izve\",\"Key\":\"goodbye-en-US.wav\"}}},{\"Type\":\"Hangup\",\"Parameters\":{\"CallId\":\"6cbd7153-b1cd-48b1-8598-9687f6903db1\"}}],\"TransactionAttributes\":{\"CurrentActionId\":\"1\",\"LexLastMatchedIntent\":\"Quit\",\"locale\":\"en-US\",\"CurrentActionIdList\":\"2,1\"}}\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:16:58.061000 END RequestId: 09cea32b-12e6-4283-9092-15e3fd5eabf8\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:16:58.061000 REPORT RequestId: 09cea32b-12e6-4283-9092-15e3fd5eabf8\tDuration: 10.09 ms\tBilled Duration: 11 ms\tMemory Size: 3009 MB\tMax Memory Used: 160 MB\t\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:17:00.009000 START RequestId: 010f6002-d185-4e96-9971-5360a2c6aa72 Version: 56\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:17:00.014000 010f6002-d185-4e96-9971-5360a2c6aa72 DEBUG AbstractFlow:214 - SMARequest(schemaVersion=1.0, sequence=5, invocationEventType=HANGUP, callDetails=SMARequest.CallDetails(transactionId=6600de06-fc5a-4a57-8c11-420ccae6f93b, transactionAttributes={CurrentActionId=1, LexLastMatchedIntent=Quit, locale=en-US, CurrentActionIdList=2,1}, awsAccountId=364253738352, awsRegion=us-east-1, sipMediaApplicationId=cf3e17cd-f4e5-44c3-ab04-325e6b3a6709, participants=[SMARequest.Participant(callId=6cbd7153-b1cd-48b1-8598-9687f6903db1, participantTag=LEG-A, to=+17035550122, from=+16128140714, direction=Inbound, startTime=2023-07-05T10:16:33.239Z, status=Disconnected)]), errorType=null, errorMessage=null, actionData=ResponseHangup(type=Hangup, parameters=ResponseHangup.Parameters(callId=6cbd7153-b1cd-48b1-8598-9687f6903db1, participantTag=LEG-A, sipResponseCode=null)))\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:17:00.015000 010f6002-d185-4e96-9971-5360a2c6aa72 DEBUG AbstractFlow:270 - Call Was disconnected by [Application], sending empty response\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:17:00.015000 010f6002-d185-4e96-9971-5360a2c6aa72 DEBUG AbstractFlow:207 - Current Action is Hangup desc=[This is my last step] with ID 1\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:17:00.015000 010f6002-d185-4e96-9971-5360a2c6aa72 INFO  AbstractFlow:243 - Hangup Handler Code Here\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:17:00.016000 010f6002-d185-4e96-9971-5360a2c6aa72 DEBUG AbstractFlow:314 - {\"SchemaVersion\":\"1.0\",\"Actions\":[]}\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:17:00.017000 END RequestId: 010f6002-d185-4e96-9971-5360a2c6aa72\n2023/07/05/[56]374cd7798d2a4e36a494a23d658b9741 2023-07-05T10:17:00.017000 REPORT RequestId: 010f6002-d185-4e96-9971-5360a2c6aa72\tDuration: 8.31 ms\tBilled Duration: 9 ms\tMemory Size: 3009 MB\tMax Memory Used: 160 MB\t\n\n^C CTRL+C received, cancelling...                                              \n```\n\nYou can find more information and examples about filtering Lambda function logs in the [SAM CLI Documentation](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-logging.html).\n\n\n## Cleanup\n\nTo delete the demo, use the SAM CLI.\n\nYou can run the following:\n\n```bash\nsam delete --config-env east\nsam delete --config-env west\n```\n\n## Sample Deploy Output\n```\njava-chime-voicesdk-sma$ sam deploy --config-env west\n\n\t\tManaged S3 bucket: aws-sam-cli-managed-default-samclisourcebucket-13jnbeuzx2\n\t\tA different default S3 bucket can be set in samconfig.toml\n\t\tOr by specifying --s3-bucket explicitly.\n\tUploading to chime-voicesdk-sma/0934badf714b3b6d4be6b4716f73d980  17401808 / 17401808  (100.00%)\nFile with same data already exists at chime-voicesdk-sma/0934badf714b3b6d4be6b4716f73d980, skipping upload                                        \n\tUploading to chime-voicesdk-sma/3dd27d8c98d6bee8bdcca98c26123f26  14703860 / 14703860  (100.00%)\n\tUploading to chime-voicesdk-sma/2eac5038f204c6de13a836fb2da6efb9  22977524 / 22977524  (100.00%)\n\n\tDeploying with following values\n\t===============================\n\tStack name                   : chime-voicesdk-sma\n\tRegion                       : us-west-2\n\tConfirm changeset            : False\n\tDisable rollback             : False\n\tDeployment s3 bucket         : aws-sam-cli-managed-default-samclisourcebucket-13jnbug4euzx2\n\tCapabilities                 : [\"CAPABILITY_IAM\"]\n\tParameter overrides          : {\"SMAID\": \"f6fb2553-e7e0-4900-866b-1b51b91f575a\", \"CONNECTID\": \"e8fac445-d291-407e-8fd7-c6296395c2ab\"}\n\tSigning Profiles             : {}\n\nInitiating deployment\n=====================\n\n\tUploading to chime-voicesdk-sma/93e0edbe536d96ab0deced939610d637.template  22349 / 22349  (100.00%)\n\n\nWaiting for changeset to be created..\n\nCloudFormation stack changeset\n---------------------------------------------------------------------------------------------------------------------------------------------\nOperation                           LogicalResourceId                   ResourceType                        Replacement                       \n---------------------------------------------------------------------------------------------------------------------------------------------\n+ Add                               BotAliasGPT                         AWS::Lex::BotAlias                  N/A                               \n+ Add                               BotRuntimeRole                      AWS::IAM::Role                      N/A                               \n+ Add                               BotVersionGPT                       AWS::Lex::BotVersion                N/A                               \n+ Add                               ChatGPTAliasSNAPSTART               AWS::Lambda::Alias                  N/A                               \n+ Add                               ChatGPTRole                         AWS::IAM::Role                      N/A                               \n+ Add                               ChatGPTVersion3d508bab8c            AWS::Lambda::Version                N/A                               \n+ Add                               ChatGPT                             AWS::Lambda::Function               N/A                               \n+ Add                               ChimeCallLexGPT                     AWS::Lex::ResourcePolicy            N/A                               \n+ Add                               ChimePolicy                         AWS::IAM::ManagedPolicy             N/A                               \n+ Add                               ChimeSMAPerm                        AWS::Lambda::Permission             N/A                               \n+ Add                               ChimeSMARole                        AWS::IAM::Role                      N/A                               \n+ Add                               ChimeSMA                            AWS::Lambda::Function               N/A                               \n+ Add                               GoodbyePromptEN                     Custom::PromptCreator               N/A                               \n+ Add                               GoodbyePromptES                     Custom::PromptCreator               N/A                               \n+ Add                               LexBotGPT                           AWS::Lex::Bot                       N/A                               \n+ Add                               LexToChatGPTPerm                    AWS::Lambda::Permission             N/A                               \n+ Add                               LexToChatGPTSnapPerm                AWS::Lambda::Permission             N/A                               \n+ Add                               MainMenuEN                          Custom::PromptCreator               N/A                               \n+ Add                               MainMenuES                          Custom::PromptCreator               N/A                               \n+ Add                               MainPromptEast                      Custom::PromptCreator               N/A                               \n+ Add                               MainPromptWest                      Custom::PromptCreator               N/A                               \n+ Add                               PromptBucketPolicy                  AWS::S3::BucketPolicy               N/A                               \n+ Add                               PromptBucket                        AWS::S3::Bucket                     N/A                               \n+ Add                               PromptCopierRole                    AWS::IAM::Role                      N/A                               \n+ Add                               PromptCopier                        AWS::Lambda::Function               N/A                               \n+ Add                               PromptCreatorRole                   AWS::IAM::Role                      N/A                               \n+ Add                               PromptCreator                       AWS::Lambda::Function               N/A                               \n+ Add                               RecordBucketPolicy                  AWS::S3::BucketPolicy               N/A                               \n+ Add                               RecordBucket                        AWS::S3::Bucket                     N/A                               \n+ Add                               SessionTable                        AWS::DynamoDB::Table                N/A                               \n+ Add                               StaticPrompts                       Custom::PromptCopier                N/A                               \n+ Add                               TansferPromptEN                     Custom::PromptCreator               N/A                               \n+ Add                               TansferPromptES                     Custom::PromptCreator               N/A                               \n+ Add                               TransferCallConnectIntegration      AWS::Connect::IntegrationAssociat   N/A                               \n                                                                        ion                                                                   \n+ Add                               TransferCallRole                    AWS::IAM::Role                      N/A                               \n+ Add                               TransferCall                        AWS::Lambda::Function               N/A                               \n+ Add                               TryAgainEN                          Custom::PromptCreator               N/A                               \n+ Add                               TryAgainES                          Custom::PromptCreator               N/A                               \n---------------------------------------------------------------------------------------------------------------------------------------------\n\n\nChangeset created successfully. arn:aws:cloudformation:us-west-2:changeSet/samcli-deploy1688419429/b28c26d0-12a8-4efc-a9af-aa49d9c404c9\n\n\n2023-07-03 16:24:07 - Waiting for stack create/update to complete\n\nCloudFormation events from stack operations (refresh every 5.0 seconds)\n---------------------------------------------------------------------------------------------------------------------------------------------\nResourceStatus                      ResourceType                        LogicalResourceId                   ResourceStatusReason              \n---------------------------------------------------------------------------------------------------------------------------------------------\nCREATE_IN_PROGRESS                  AWS::IAM::Role                      BotRuntimeRole                      -                                 \nCREATE_IN_PROGRESS                  AWS::DynamoDB::Table                SessionTable                        -                                 \nCREATE_IN_PROGRESS                  AWS::S3::Bucket                     RecordBucket                        -                                 \nCREATE_IN_PROGRESS                  AWS::IAM::ManagedPolicy             ChimePolicy                         -                                 \nCREATE_IN_PROGRESS                  AWS::IAM::Role                      ChimeSMARole                        -                                 \nCREATE_IN_PROGRESS                  AWS::S3::Bucket                     PromptBucket                        -                                 \nCREATE_IN_PROGRESS                  AWS::IAM::Role                      BotRuntimeRole                      Resource creation Initiated       \nCREATE_IN_PROGRESS                  AWS::IAM::ManagedPolicy             ChimePolicy                         Resource creation Initiated       \nCREATE_IN_PROGRESS                  AWS::IAM::Role                      ChimeSMARole                        Resource creation Initiated       \nCREATE_IN_PROGRESS                  AWS::S3::Bucket                     RecordBucket                        Resource creation Initiated       \nCREATE_IN_PROGRESS                  AWS::S3::Bucket                     PromptBucket                        Resource creation Initiated       \nCREATE_IN_PROGRESS                  AWS::DynamoDB::Table                SessionTable                        Resource creation Initiated       \nCREATE_COMPLETE                     AWS::DynamoDB::Table                SessionTable                        -                                 \nCREATE_IN_PROGRESS                  AWS::IAM::Role                      ChatGPTRole                         -                                 \nCREATE_IN_PROGRESS                  AWS::IAM::Role                      ChatGPTRole                         Resource creation Initiated       \nCREATE_COMPLETE                     AWS::IAM::ManagedPolicy             ChimePolicy                         -                                 \nCREATE_COMPLETE                     AWS::IAM::Role                      BotRuntimeRole                      -                                 \nCREATE_COMPLETE                     AWS::IAM::Role                      ChimeSMARole                        -                                 \nCREATE_IN_PROGRESS                  AWS::IAM::Role                      TransferCallRole                    -                                 \nCREATE_IN_PROGRESS                  AWS::IAM::Role                      TransferCallRole                    Resource creation Initiated       \nCREATE_IN_PROGRESS                  AWS::Lex::Bot                       LexBotGPT                           -                                 \nCREATE_IN_PROGRESS                  AWS::Lex::Bot                       LexBotGPT                           Resource creation Initiated       \nCREATE_COMPLETE                     AWS::S3::Bucket                     RecordBucket                        -                                 \nCREATE_COMPLETE                     AWS::S3::Bucket                     PromptBucket                        -                                 \nCREATE_IN_PROGRESS                  AWS::S3::BucketPolicy               RecordBucketPolicy                  -                                 \nCREATE_IN_PROGRESS                  AWS::IAM::Role                      PromptCreatorRole                   -                                 \nCREATE_IN_PROGRESS                  AWS::IAM::Role                      PromptCopierRole                    -                                 \nCREATE_IN_PROGRESS                  AWS::IAM::Role                      PromptCreatorRole                   Resource creation Initiated       \nCREATE_IN_PROGRESS                  AWS::S3::BucketPolicy               PromptBucketPolicy                  -                                 \nCREATE_IN_PROGRESS                  AWS::IAM::Role                      PromptCopierRole                    Resource creation Initiated       \nCREATE_IN_PROGRESS                  AWS::S3::BucketPolicy               RecordBucketPolicy                  Resource creation Initiated       \nCREATE_COMPLETE                     AWS::S3::BucketPolicy               RecordBucketPolicy                  -                                 \nCREATE_IN_PROGRESS                  AWS::S3::BucketPolicy               PromptBucketPolicy                  Resource creation Initiated       \nCREATE_COMPLETE                     AWS::S3::BucketPolicy               PromptBucketPolicy                  -                                 \nCREATE_COMPLETE                     AWS::IAM::Role                      ChatGPTRole                         -                                 \nCREATE_COMPLETE                     AWS::IAM::Role                      TransferCallRole                    -                                 \nCREATE_IN_PROGRESS                  AWS::Lambda::Function               ChatGPT                             -                                 \nCREATE_IN_PROGRESS                  AWS::Lambda::Function               ChatGPT                             Resource creation Initiated       \nCREATE_IN_PROGRESS                  AWS::Lambda::Function               TransferCall                        -                                 \nCREATE_IN_PROGRESS                  AWS::Lambda::Function               TransferCall                        Resource creation Initiated       \nCREATE_COMPLETE                     AWS::IAM::Role                      PromptCreatorRole                   -                                 \nCREATE_COMPLETE                     AWS::IAM::Role                      PromptCopierRole                    -                                 \nCREATE_COMPLETE                     AWS::Lambda::Function               ChatGPT                             -                                 \nCREATE_IN_PROGRESS                  AWS::Lambda::Function               PromptCopier                        -                                 \nCREATE_IN_PROGRESS                  AWS::Lambda::Function               PromptCreator                       -                                 \nCREATE_COMPLETE                     AWS::Lambda::Function               TransferCall                        -                                 \nCREATE_IN_PROGRESS                  AWS::Lambda::Version                ChatGPTVersion3d508bab8c            -                                 \nCREATE_IN_PROGRESS                  AWS::Lambda::Permission             LexToChatGPTPerm                    -                                 \nCREATE_IN_PROGRESS                  AWS::Lambda::Function               PromptCopier                        Resource creation Initiated       \nCREATE_IN_PROGRESS                  AWS::Lambda::Permission             LexToChatGPTPerm                    Resource creation Initiated       \nCREATE_IN_PROGRESS                  AWS::Lambda::Function               PromptCreator                       Resource creation Initiated       \nCREATE_IN_PROGRESS                  AWS::Lambda::Version                ChatGPTVersion3d508bab8c            Resource creation Initiated       \nCREATE_IN_PROGRESS                  AWS::Connect::IntegrationAssociat   TransferCallConnectIntegration      -                                 \n                                    ion                                                                                                       \nCREATE_IN_PROGRESS                  AWS::Connect::IntegrationAssociat   TransferCallConnectIntegration      Resource creation Initiated       \n                                    ion                                                                                                       \nCREATE_COMPLETE                     AWS::Connect::IntegrationAssociat   TransferCallConnectIntegration      -                                 \n                                    ion                                                                                                       \nCREATE_COMPLETE                     AWS::Lex::Bot                       LexBotGPT                           -                                 \nCREATE_COMPLETE                     AWS::Lambda::Function               PromptCopier                        -                                 \nCREATE_COMPLETE                     AWS::Lambda::Function               PromptCreator                       -                                 \nCREATE_IN_PROGRESS                  AWS::Lex::BotVersion                BotVersionGPT                       -                                 \nCREATE_IN_PROGRESS                  Custom::PromptCopier                StaticPrompts                       -                                 \nCREATE_IN_PROGRESS                  Custom::PromptCreator               TansferPromptEN                     -                                 \nCREATE_IN_PROGRESS                  Custom::PromptCreator               TryAgainEN                          -                                 \nCREATE_IN_PROGRESS                  Custom::PromptCreator               MainMenuEN                          -                                 \nCREATE_IN_PROGRESS                  Custom::PromptCreator               TansferPromptES                     -                                 \nCREATE_IN_PROGRESS                  Custom::PromptCreator               MainPromptWest                      -                                 \nCREATE_IN_PROGRESS                  Custom::PromptCreator               TryAgainES                          -                                 \nCREATE_IN_PROGRESS                  Custom::PromptCreator               MainMenuES                          -                                 \nCREATE_IN_PROGRESS                  Custom::PromptCreator               GoodbyePromptEN                     -                                 \nCREATE_IN_PROGRESS                  Custom::PromptCreator               MainPromptEast                      -                                 \nCREATE_IN_PROGRESS                  Custom::PromptCreator               GoodbyePromptES                     -                                 \nCREATE_IN_PROGRESS                  AWS::Lex::BotVersion                BotVersionGPT                       Resource creation Initiated       \nCREATE_COMPLETE                     AWS::Lambda::Permission             LexToChatGPTPerm                    -                                 \nCREATE_IN_PROGRESS                  Custom::PromptCreator               TryAgainEN                          Resource creation Initiated       \nCREATE_IN_PROGRESS                  Custom::PromptCreator               GoodbyePromptEN                     Resource creation Initiated       \nCREATE_COMPLETE                     Custom::PromptCreator               TryAgainEN                          -                                 \nCREATE_COMPLETE                     Custom::PromptCreator               GoodbyePromptEN                     -                                 \nCREATE_IN_PROGRESS                  Custom::PromptCreator               TansferPromptEN                     Resource creation Initiated       \nCREATE_IN_PROGRESS                  Custom::PromptCreator               TansferPromptES                     Resource creation Initiated       \nCREATE_IN_PROGRESS                  Custom::PromptCreator               MainPromptWest                      Resource creation Initiated       \nCREATE_IN_PROGRESS                  Custom::PromptCreator               MainMenuEN                          Resource creation Initiated       \nCREATE_COMPLETE                     Custom::PromptCreator               TansferPromptEN                     -                                 \nCREATE_COMPLETE                     Custom::PromptCreator               TansferPromptES                     -                                 \nCREATE_COMPLETE                     Custom::PromptCreator               MainPromptWest                      -                                 \nCREATE_IN_PROGRESS                  Custom::PromptCreator               MainMenuES                          Resource creation Initiated       \nCREATE_IN_PROGRESS                  Custom::PromptCreator               TryAgainES                          Resource creation Initiated       \nCREATE_COMPLETE                     Custom::PromptCreator               MainMenuEN                          -                                 \nCREATE_IN_PROGRESS                  Custom::PromptCreator               MainPromptEast                      Resource creation Initiated       \nCREATE_IN_PROGRESS                  Custom::PromptCopier                StaticPrompts                       Resource creation Initiated       \nCREATE_IN_PROGRESS                  Custom::PromptCreator               GoodbyePromptES                     Resource creation Initiated       \nCREATE_COMPLETE                     Custom::PromptCreator               MainMenuES                          -                                 \nCREATE_COMPLETE                     Custom::PromptCreator               TryAgainES                          -                                 \nCREATE_COMPLETE                     Custom::PromptCreator               MainPromptEast                      -                                 \nCREATE_COMPLETE                     Custom::PromptCopier                StaticPrompts                       -                                 \nCREATE_COMPLETE                     Custom::PromptCreator               GoodbyePromptES                     -                                 \nCREATE_COMPLETE                     AWS::Lex::BotVersion                BotVersionGPT                       -                                 \nCREATE_COMPLETE                     AWS::Lambda::Version                ChatGPTVersion3d508bab8c            -                                 \nCREATE_IN_PROGRESS                  AWS::Lambda::Alias                  ChatGPTAliasSNAPSTART               -                                 \nCREATE_IN_PROGRESS                  AWS::Lambda::Alias                  ChatGPTAliasSNAPSTART               Resource creation Initiated       \nCREATE_COMPLETE                     AWS::Lambda::Alias                  ChatGPTAliasSNAPSTART               -                                 \nCREATE_IN_PROGRESS                  AWS::Lambda::Permission             LexToChatGPTSnapPerm                -                                 \nCREATE_IN_PROGRESS                  AWS::Lex::BotAlias                  BotAliasGPT                         -                                 \nCREATE_IN_PROGRESS                  AWS::Lambda::Permission             LexToChatGPTSnapPerm                Resource creation Initiated       \nCREATE_IN_PROGRESS                  AWS::Lex::BotAlias                  BotAliasGPT                         Resource creation Initiated       \nCREATE_COMPLETE                     AWS::Lex::BotAlias                  BotAliasGPT                         -                                 \nCREATE_IN_PROGRESS                  AWS::Lambda::Function               ChimeSMA                            -                                 \nCREATE_IN_PROGRESS                  AWS::Lex::ResourcePolicy            ChimeCallLexGPT                     -                                 \nCREATE_IN_PROGRESS                  AWS::Lambda::Function               ChimeSMA                            Resource creation Initiated       \nCREATE_IN_PROGRESS                  AWS::Lex::ResourcePolicy            ChimeCallLexGPT                     Resource creation Initiated       \nCREATE_COMPLETE                     AWS::Lex::ResourcePolicy            ChimeCallLexGPT                     -                                 \nCREATE_COMPLETE                     AWS::Lambda::Permission             LexToChatGPTSnapPerm                -                                 \nCREATE_COMPLETE                     AWS::Lambda::Function               ChimeSMA                            -                                 \nCREATE_IN_PROGRESS                  AWS::Lambda::Permission             ChimeSMAPerm                        -                                 \nCREATE_IN_PROGRESS                  AWS::Lambda::Permission             ChimeSMAPerm                        Resource creation Initiated       \nCREATE_COMPLETE                     AWS::Lambda::Permission             ChimeSMAPerm                        -                                 \nCREATE_COMPLETE                     AWS::CloudFormation::Stack          chime-voicesdk-sma                  -                                 \n---------------------------------------------------------------------------------------------------------------------------------------------\n\n\nSuccessfully created/updated stack - chime-voicesdk-sma in us-west-2\n\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdocwho2%2Fjava-chime-voicesdk-sma","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdocwho2%2Fjava-chime-voicesdk-sma","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdocwho2%2Fjava-chime-voicesdk-sma/lists"}