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);
        }
Nessuna risposta

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande