0

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.

Tim
  • 810
  • 9
  • 20

1 Answers1

1

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.

philnash
  • 70,667
  • 10
  • 60
  • 88
  • Thanks for the reply! But I don't see this behavior in my version. The identity ends up as my phone number with some extra characters after it on the video side. C# Twilio v5.31.3, Twilio.AspNet.Common v5.20.1, Twilio.AspNet.Mvc v5.20.1, twilio-video.js v1.14.1. I'm using response.Say("...").Append(new Connect().Append(new Room { Name = "...", Participantidentity = "" })) – Tim Aug 21 '19 at 16:24
  • OK, so support let me know that Participantidentity should be ParticipantIdentity (with a capital I). So it looks like the Room class exposes a misspelled property. I'll answer this question with the workaround when I get a response. Thanks again! – Tim Aug 21 '19 at 17:20
  • 1
    Looks like the incorrect `Participantidentity` was [changed in June](https://github.com/twilio/twilio-csharp/commit/99be66c6280ae26a3b7d5ab0a98c940a4e03df29#diff-9c0a68c5e16644c4f17df34f2c32ee1b) for version 5.30.0. You can see that in [the docs here](https://www.twilio.com/docs/libraries/reference/twilio-csharp/5.30.0/class_twilio_1_1_twi_m_l_1_1_voice_1_1_room.html) too. – philnash Aug 21 '19 at 21:57
  • That's good news! Would you mind marking the answer as correct so that other people can see it helped too? Thanks! – philnash Aug 21 '19 at 22:58