DEV Community


Posted on

Voice conference and Video Room in Twilio API

I'd like to build video conference platform using Twilio api in PHP for the backend.
And I want to know how to create voice conference and video room in twilio using PHP.
There are PHP code for this in twilio doc.

$response = new TwiML;

// Start with a verb
$dial = $response->dial();

dial->conference('My conference', array(
'startConferenceOnEnter' => True,
'endConferenceOnExit' => True

I have some questions

  • Do I need to return $reponse to the client side?
  • How can I connect this voice conference?

Please help me with this

Discussion (3)

philnash profile image
Phil Nash

Hey! If you're looking to build video conferencing with Twilio then I would not start with TwiML. TwiML is for controlling phone calls and SMS mainly.

Instead, you should check out the documentation for Twilio Video. There's also a quick start application you can take a look at. I'd also take a read through the tutorial content, starting with understanding video rooms which will help you understand how it all fits together.

pony profile image
Pony Author

Thanks for your kind reply.
I wanted to build a voice conference and video room.
Now that I built them.

philnash profile image
Phil Nash

That's great news then! Sorry I was too late to help. How did you find the build process?