Apr 27, 2021
Posted by Brett Rudenstein

Hi Jue,

You can use the twilio API to send a voice call to a number. You’ll need to configure a new source.

Configure the source  with a name like voicemessage and configuration like

 

{
“pollingInterval”: 0,
“query”: {
“contentType”: “application/json”
},
“requestDefaults”: {
“headers”: {
“Authorization”: “Basic <BASIC_AUTH_INFO>”
},
“contentType”: “application/x-www-form-urlencoded”
},
“uri”: “https://api.twilio.com/2010-04-01/Accounts/<ACCOUNTID>/Calls&#8221;,
“passwordType”: “string”
}

 

The create a procedure to call the source

 

var toadd = encodeUri(<mobilenumber>)
var twiml = encodeUri(format(“<Response><Pause length=\”2\”/><Say voice=\”alice\”>We have detected an issue at {0}, at {1}, at the {2}. .</Say></Response>”, building, floor, space ))
var query =format(“To={0}&From={1}&Twiml={2}”,toadd,fromadd,twiml)

select from source voicemessage with body = query, method = “POST”

 

 

© Vantiq 2024 All rights reserved  •  Vantiq Corporation’s Privacy Policy and Cookie Policy