I'm trying to have the ability to update a call to dial it into a conference, and then I want to keep track of which phone numbers are in the conference. I'll already have the phone number before updating the call, so my plan was to add it as parameter to the statusCallback, then when someone joins, I'll know which phone number has joined (or left). Here is the Twiml I'm using to update the call into the conference.
let conferenceTwiml = function(conferenceName, phoneNumber) {
let voiceResponse = new VoiceResponse();
let options = {
startConferenceOnEnter: true,
endConferenceOnExit: false,
waitUrl: <myWaitUrl>,
statusCallbackEvent: "join leave",
statusCallback: <myStatusCallBackUrl> + '?phoneNumber=' + phoneNumber,
statusCallbackMethod:"POST",
};
voiceResponse.dial().conference(options, conferenceName);
return voiceResponse.toString();
}
The body sent to the statusCallback looks like this:
{
Coaching: 'false',
FriendlyName: 'Room 123',
SequenceNumber: '4',
ConferenceSid: 'CF1c7a162ba5d0587f390a0d7e7c6eb9a5',
EndConferenceOnExit: 'false',
CallSid: 'CA5244195567afec7327bb24d65a2d2b15',
StatusCallbackEvent: 'participant-join',
Timestamp: 'Wed, 17 Jul 2019 18:18:27 +0000',
StartConferenceOnEnter: 'true',
Hold: 'false',
AccountSid: <myAccountSid>,
Muted: 'false'
}
So you can see there's not really any identifying information, without the additional query parameter.
The problem I've run into is that, according to the docs:
The statusCallback URL is set by the first Participant to join the conference, subsequent statusCallbacks will be ignored.
So in essence I can't dynamically set the phoneNumber parameter for each person I'm dialing into the conference, since it will always reflect the phoneNumber of the first person who joined.
My question is, how can I get some kind of identifying information about who is joining or leaving the conference? Where are my twilio evangelists at? Thanks!