function sendConfirmation()

in src/app.js [84:112]


function sendConfirmation(originationNumber) {
    var paramsSMS = {
        ApplicationId: AppId,
        MessageRequest: {
            Addresses: {
                [originationNumber]: {
                    ChannelType: 'SMS'
                }
            },
            MessageConfiguration: {
                SMSMessage: {
                    Body: 'Your number has been added to the call queue!',
                    MessageType: "TRANSACTIONAL"
                }
            }
        }
    };
    pinpoint.sendMessages(paramsSMS, function (err, data) {
        if (err) {
            console.log("An error occurred.\n");
            console.log(err, err.stack);
        } else if (data['MessageResponse']['Result'][originationNumber]['DeliveryStatus'] != "SUCCESSFUL") {
            console.log("Failed to send SMS confirmation:");
            console.log(data['MessageResponse']['Result']);
        } else {
            console.log("Successfully confirmed the call back via SMS to " + originationNumber);
        }
    });
}