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);
        }
preguntada hace 2 años67 visualizaciones
No hay respuestas

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas