Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- client.calls.create({
- to: "+1" + numbers[i],
- from: process.env.TWILIO_NUMBER,
- url: "https://publicly.accessable/url-of_mine",
- machineDetection: "Enabled",
- method: "GET",
- statusCallback: "https://another.publicly.accessible/url-of_yours?currentIndex=" + i,
- statusCallbackMethod: "GET"
- })
- const params = event.queryStringParameters;
- if (params.CallStatus != 'completed') {
- let i = parseInt(params.currentIndex, 10) + 1;
- client.calls.create({
- to: "+1" + numbers[i],
- from: process.env.TWILIO_NUMBER,
- url: "https://publicly.accessable/url-of_mine",
- machineDetection: "Enabled"
- method: "GET",
- statusCallback: "https://another.publicly.accessible/url-of_yours?currentIndex=" + i,
- statusCallbackMethod: "GET"
- })
- }
- return Response('')
- const params = event.queryStringParameters;
- if (params.AnsweredBy == "machine_start") {
- let xml = `
- <?xml version="1.0" encoding="UTF-8"?>
- <Response>
- <Hangup/>
- </Response>`
- client.calls.create( callParameters )
- return Response(xml, mimetype = 'text/xml')
- } else{ .. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement