Initiating an outbound conference call using Twilio Functions

403 views Asked by At

I do not see any documentation in creating a conference call in twilio functions

1

There are 1 answers

6
Alex Baban On BEST ANSWER

You could start with something like this:

exports.handler = function(context, event, callback) {
  
  // create response object (to return TwiML)
  let response = new Twilio.twiml.VoiceResponse();
  
  // dial a conference room
  const dial = response.dial();
  dial.conference('Some Room');
  
  // for debug
  console.log(response.toString());
  
  // return conference TwiML
  return callback(null, response);

};

This is similar with how a forward call Twilio function would be, but instead you "dial" a conference room, not a number.

Configure your Twilio number so it runs the function when a call comes in.

With the new Twilio functions interface, you'll need to create a service before you create a function. If you want to see the logs, you'll need to togle "Enable live logs" to see the console.log(response.toString());.

enter image description here


You can get more inspiration from the docs for Node.js here: https://www.twilio.com/docs/voice/twiml/conference