![]() You will not be able to hear the incoming audio stream without an audio element, You need an element in your page, naturally. ![]() All Chime SDK functionality is exposed via window.ChimeSDK object. Since we are using Chime js sdk’s browser version, there’s no bundling or module management. Endpoint ( '' ) const json = ( statusCode, contentType, body ) => Chime ( ) // Set the AWS SDK Chime endpoint. const AWS = require ( 'aws-sdk' ) const chime = new AWS. Start coding by creating our join and end endpoints. Let’s get started! We start by adding aws-sdk to our project, with the uuid package for id generation as well. When that client sends that page url with that meeting id to a friend, they will join the same conference room and be able to have a meeting.When a client enters the page, they will be assigned a random id.Aws-chime-sdk-js provides us client management, such as connecting client inputs, showing videos etc, more of meeting’s client state management. Why server-side code? Because we need to use aws-sdk to provision our Chime resources (meetings, attendee management etc.). Three handlers, one for starting, one for ending meetings on server-side, last one for serving html client.Play the account number back to the caller from the S3 bucket and hang-up.Let’s open our terminal and get started! mkdir meeting-app.Using the From: parameter (Caller ID) in the NEW_INBOUND_CALL payload, fetch the associated account ID.When the transferred call arrives on a phone number associated with the emulatorSMA, it will perform the following steps: The Calling Number of the call to the emulator is the original calling number. The incoming call is then transferred to the phone number corresponding to the caller’s selection (‘1’ – salesPhoneNumber or ‘2’ – supportPhoneNumber.wav file is stored in an S3 bucket that will be accessed by the emulatorSMA Lambda function. The DynamoDB update then triggers the createWav Lambda function to create a wav file of the account ID using the Amazon Polly text to speech service.The entered account ID will be stored in DynamoDB.If the Caller ID has no associated account ID, the caller will be asked to enter their account ID using their keypad.If the Caller ID has an associated account, it plays a prompt and requests the caller to key in ‘1’ for sales or ‘2’ for support.Uses the From: parameter (Caller ID) in the NEW_INBOUND_CALL payload to fetch the associated account ID from a DynamoDB table.Answers the call and plays a welcome prompt.When the PSTN caller hangs up, the PSTN Audio service invokes the Lambda function with a HANGUP event, and the Lambda function deletes the attendee. Once the AWS SDK returns a MeetingId and AttendeeId, the Lambda function returns an action to join the call to the Amazon Chime SDK Meeting (LEG-B).Ī Real-time Transport Protocol (RTP) session is established between the caller from the public switched telephone network (PSTN) and the Amazon Chime Media service. The Lambda function uses the AWS SDK to create an Amazon Chime SDK meeting and a meeting attendee. The PSTN Audio service invokes the Lambda function with the DTMF digits input. The PSTN Audio service answers the call, plays an audio prompt, and collects DTMF digits input by the caller. ![]() The Lambda function returns a list of actions, including PlayAudioAndGetDigits, which instructs the PSTN Audio service to answer the call, play an audio file to the caller, and collect the DTMF digits entered by the caller. The PSTN audio service fetches the associated SIP media application and invokes the associated Lambda function with a NEW_INBOUND_CALL event (LEG-A). The Amazon Chime SDK PSTN audio service receives a call to a phone number that is provisioned in a SIP rule. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |