I am having trouble creating a Conference Participant using the ReST API in twilio. The following is my request:
participant = ParticipantResource.Create(
new CreateParticipantOptions(
"conferenceName",
new PhoneNumber("client:791ecf-263c-49eb-9b9b-b6a265ee28d8"),
new PhoneNumber("client:59191ecf-263c-49eb-9b9b-b6a265ee28d8?agentFirstName=Michael&agentLastName=Scott++"))
{
Beep = Conference.BeepEnum.True.ToString(),
EndConferenceOnExit = true,
ConferenceStatusCallback = new Uri(statusCallbackUrl),
ConferenceStatusCallbackMethod = HttpMethod.Post,
ConferenceStatusCallbackEvent = new List<string>()
{
Conference.EventEnum.Start.ToString(),
Conference.EventEnum.Join.ToString(),
Conference.EventEnum.Leave.ToString(),
Conference.EventEnum.End.ToString()
}
}
);
I believe this is the correct way to invoke this method to create a participant. I want to dial from agent 1 to agent 2, in order to get agent 2 into the conference call.
The conference call, create participant reference that I have followed is: https://www.twilio.com/docs/voice/api/conference-participant-resource
I want to pass the custom parameters to agent 2 who is logged in from the web client, in order to show agent 2 who is calling him.