Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

TwiML™ Voice: <Room>


(warning)

Warning

This documentation is for reference only. We are no longer onboarding new customers to Programmable Video. For additional information see here(link takes you to an external page).

(warning)

Warning

This Twiml Verb is not currently available when using Twilio Regions Ireland (IE1) or Australia (AU1). This is currently only supported with the default US1 region. A full list of unsupported products and features with Twilio Regions is documented here.

Programmable Video Rooms are represented in TwiML through the <Room> noun, which you can specify while using the <Connect> verb.

The <Room> noun allows you to connect to a named Programmable Video Room and talk with other participants who are connected to that Room.

Note that only Group Rooms support PSTN Participants.

To connect a Programmable Voice call to a Room, use the <Room> noun and provide the UniqueName for the Room you would like to connect to. If an in-progress Video Room with that unique name does not exist for your account, Twilio will move to the next set of TwiML instructions you have provided, or disconnect the call if the <Room> is the final TwiML instruction.


<Room> and <Connect> usage examples

room-and-connect-usage-examples page anchor

_10
<?xml version="1.0" encoding="UTF-8"?>
_10
<Response>
_10
<Connect>
_10
<Room>DailyStandup</Room>
_10
</Connect>
_10
</Response>

(warning)

Warning

Ensure, your room type is group. Connecting voice calls to a Peer-to-Peer Room is not possible.

Connect a Programmable Voice call to a Room

connect-a-programmable-voice-call-to-a-room page anchor
Node.js
Python
C#
Java
PHP
Ruby

_10
const VoiceResponse = require('twilio').twiml.VoiceResponse;
_10
_10
const response = new VoiceResponse();
_10
const connect = response.connect();
_10
connect.room('DailyStandup');
_10
_10
console.log(response.toString());

Output

_10
<?xml version="1.0" encoding="UTF-8"?>
_10
<Response>
_10
<Connect>
_10
<Room>DailyStandup</Room>
_10
</Connect>
_10
</Response>

Set the Participant's identity

set-the-participants-identity page anchor

You can set a unique identity on the incoming caller using an optional property called participantIdentity.

If you don't set the participantIdentity, then Twilio will assign a unique string value to the Participant's identity.


_10
<?xml version="1.0" encoding="UTF-8"?>
_10
<Response>
_10
<Connect>
_10
<Room participantIdentity='alice'>DailyStandup</Room>
_10
</Connect>
_10
</Response>

Connect a Programmable Voice call to a Room with a unique participant identity

connect-a-programmable-voice-call-to-a-room-with-a-unique-participant-identity page anchor
Node.js
Python
C#
Java
PHP
Ruby

_10
const VoiceResponse = require('twilio').twiml.VoiceResponse;
_10
_10
const response = new VoiceResponse();
_10
const connect = response.connect();
_10
connect.room({
_10
participantIdentity: 'alice'
_10
}, 'DailyStandup');
_10
_10
console.log(response.toString());

Output

_10
<?xml version="1.0" encoding="UTF-8"?>
_10
<Response>
_10
<Connect>
_10
<Room participantIdentity="alice">DailyStandup</Room>
_10
</Connect>
_10
</Response>

Visit the Programmable Video documentation for more information about adding PSTN participants to Video Rooms.


Rate this page: