Pinpoint Voice - Getting Call Result Information

0

Hello,

I trying to send out call via pinpoint, and I can send, but I can't figure out how to get info back as to the results of the call, like was it picked up, duration, was it busy, did it hit an answering machine, etc. How can I get that in my lambda function, using the messageId from (java) PinpointSmsVoiceClient::sendVoiceMessage(SendVoiceMessageRequest voiceMessageRequest). Is there a callback, or do I have to poll something, I'm a bit confused.

try {
            final String languageCode = "en-US";
            final String ssmlMessage = "<speak>[our message]</speak>";
            final String voiceName = "Matthew";

            SSMLMessageType ssmlMessageType = SSMLMessageType.builder()
                    .languageCode(languageCode)
                    .text(ssmlMessage)
                    .voiceId(voiceName)
                    .build();

            VoiceMessageContent content = VoiceMessageContent.builder()
                    .ssmlMessage(ssmlMessageType)
                    .build();

            SendVoiceMessageRequest voiceMessageRequest = SendVoiceMessageRequest.builder()
                    .destinationPhoneNumber(destinationNumber)
                    .originationPhoneNumber(originationNumber)
                    .content(content)
                    .build();

            SendVoiceMessageResponse response = client.sendVoiceMessage(voiceMessageRequest);

            response.messageId();  <--- What do I do with this to get the call results?

            System.out.println("The message was sent successfully.");

        } catch (PinpointSmsVoiceException e) {
            System.err.println(e.awsErrorDetails().errorMessage());
            System.exit(1);
        }
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions