Reputation: 875
I'm using Twilio Programmable Voice to connect a caller to a Programmable Video Room via the Room verb. How can I get the ParticipantIdentity of the caller on the video side?
I see the phone caller's identity on the video side is their phone number dash some numbers. Alternatively, how can I get the caller's number/identity on the voice side.
Basically, I'm looking to determine who the phone caller is on the video side.
Upvotes: 0
Views: 115
Reputation: 73075
Twilio developer evangelist here.
You can set the identity that comes through for the voice participant by using the participantIdentity
attribute on the <Room>
element. The identity will then be readable as the participant.identity
on the video side.
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Connect>
<Room participantIdentity='alice'>RoomName</Room>
</Connect>
</Response>
Let me know if that helps at all.
Upvotes: 1