With below code my users are joining a conference call, conference is created with unique names.
const VoiceResponse = require('twilio').twiml.VoiceResponse;
const response = new VoiceResponse();
const dial = response.dial();
dial.conference({
statusCallback: <event_url>,
statusCallbackEvent: 'start end join leave'
}, "test_conference_name");
res.type('text/xml');
res.send(response.toString());
Now I want to add bot to this conference call and announce something to all users, like conference is going to end in next 5 min.
const twilio_client = require('twilio')(accountSid, authToken);
twilio_client.calls.create({
url: "<twiml url with voice responce>",
to: "test_conference_name",
from: "+17016390587",
})
.then((call) => {
console.log("success")
})
I am getting error that The phone number you are attempting to call, "test_conference_name", is not valid.
I saw this solution in this post Twilio: programmatically join conference and play <Say> command or <Play> sound file? but it has old syntax and working with a conference no.
I wan to add a bot on the basis of conference name, I don't have conference no.