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);
        }
Keine Antworten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen