So here's the situation currently there is conference going on where i have called my client through the twilio number and after that I call the visitor to join him in the conference as well now what i want is when the visitor picks up the call he should first listen to a ivr "This call will be recorded for quality and training purposes" and then the client and visitor should be able to talk. But what's happening is visitor picks up the call and the client gets connected and the ivr isn't played
async callVisitorInConference(callOptions: CallListInstanceCreateOptions) {
try {
this.logger.debug(`Calling visitor in conference`);
const response = new twiml.VoiceResponse();
response.dial({ answerOnBridge: true }).conference({ startConferenceOnEnter: true, endConferenceOnExit: true }, "my-room");
response.say(this.voiceSettings, "This call will be recorded for training and quality purposes. "); // not working
await this.twilio.calls.create({
from: callOptions.from,
to: callOptions.to,
twiml: response.toString(),
});
return response.toString();
} catch (error) {
this.logger.error(`Error calling visitor in conference`, error);
throw error;
}
}
This is achievable by doing response.dial().number({ url: "www.url/play-visitor-ivr})
this first will play the message to the visitor then the client and visitor gets connected but how to do this with conference.