Mehul Katara
Mehul Katara

Reputation: 947

Amazon Connect Automated Outgoing Call

Using Amazon connect I can make an outgoing call manually, But is it possible to make an automated call to someone and play the voice message when amazon lambda function trigger?

Upvotes: 2

Views: 2344

Answers (1)

Aossey
Aossey

Reputation: 935

Yes, you would use the StartOutboundContact() method of the Connect API. You provide the number to be dialed and the identifier for the contact flow that the call should be routed to when connected. In the contact flow, you would play the needed audio prompt(s). See API method reference here:

https://docs.aws.amazon.com/connect/latest/APIReference/API_StartOutboundVoiceContact.html

If you were using the AWS JavaScript SDK, you would call make a request in the following way:

var connect = new AWS.Connect();
var params = {
  ContactFlowId: 'STRING_VALUE', /* required */
  DestinationPhoneNumber: 'STRING_VALUE', /* required */
  InstanceId: 'STRING_VALUE', /* required */
  Attributes: {
    '<AttributeName>': 'STRING_VALUE',
    /* '<AttributeName>': ... */
  },
  ClientToken: 'STRING_VALUE',
  QueueId: 'STRING_VALUE',
  SourcePhoneNumber: 'STRING_VALUE'
};
connect.startOutboundVoiceContact(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

This is example code from AWS, which can be found in the JavaScript SDK documentation here

Upvotes: 3

Related Questions