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?
Asked
Active
Viewed 2,013 times
1 Answers
3
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

Aossey
- 850
- 4
- 13
-
How to setup method of StartOutboundContact().I found some GitHub repo https://github.com/aws/amazon-connect-streams that setup server, an authentication token and make API call to make an automated call. I am a beginner, Is there any documents or steps where I can setup an outbound call. – Mehul Katara Sep 10 '18 at 07:26
-
1@MehulKatara, I have added a code sample and link to the JS SDK documentation for you. – Aossey Sep 15 '18 at 01:16
-
I can make call to US number but unable to make call to Indian number. Is there any way to make call to India ? code: 'DestinationNotAllowedException', time: 2018-09-15T13:47:47.150Z, requestId: 'edb4f77f-b8ed-11e8-a695-97cd86ca4cfa', statusCode: 403, retryable: false, retryDelay: 41.39885160985075 } – Mehul Katara Sep 15 '18 at 13:50
-
2International dialing is disabled by default on new Connect instances, you have to open a support request to to have international dialing enabled for your instance. – Aossey Sep 15 '18 at 14:09
-
1I have requested amazon to enable international call. They enabled, Now I can make outbound call to India. – Mehul Katara Sep 19 '18 at 07:10