mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 20:54:55 +00:00
Fixed debug references used for call status that were printing Status.Call.Sharing.State. Added GetCurrentCallParticipants method to referesh participant list. Updated UpdateCallStatus to resolve issue with duplicate participants when admitted from the waiting room.
This commit is contained in:
@@ -566,7 +566,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
};
|
};
|
||||||
|
|
||||||
// This is to deal with incorrect object structure coming back from the Zoom Room on v 5.6.3
|
// This is to deal with incorrect object structure coming back from the Zoom Room on v 5.6.3
|
||||||
Configuration.Client.Call.Layout.PropertyChanged += (o,a) =>
|
Configuration.Client.Call.Layout.PropertyChanged += (o, a) =>
|
||||||
{
|
{
|
||||||
switch (a.PropertyName)
|
switch (a.PropertyName)
|
||||||
{
|
{
|
||||||
@@ -1144,7 +1144,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
var existingParticipant =
|
var existingParticipant =
|
||||||
Status.Call.Participants.FirstOrDefault(p => p.UserId.Equals(participant.UserId));
|
Status.Call.Participants.FirstOrDefault(p => p.UserId.Equals(participant.UserId));
|
||||||
|
|
||||||
// found matching participant.UserId
|
|
||||||
if (existingParticipant != null)
|
if (existingParticipant != null)
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "[DeserializeResponse] zCommands.listparticipantresult - participant.event: {0} ...updating matching UserId participant with UserId: {1} UserName: {2}",
|
Debug.Console(1, this, "[DeserializeResponse] zCommands.listparticipantresult - participant.event: {0} ...updating matching UserId participant with UserId: {1} UserName: {2}",
|
||||||
@@ -1158,11 +1157,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
participant.Event, participant.UserId, participant.UserName);
|
participant.Event, participant.UserId, participant.UserName);
|
||||||
|
|
||||||
Status.Call.Participants.Add(participant);
|
Status.Call.Participants.Add(participant);
|
||||||
|
|
||||||
//var emptyList = new List<Participant>();
|
|
||||||
//Participants.CurrentParticipants = emptyList;
|
|
||||||
|
|
||||||
//GetCurrentCallParticipants();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -1330,10 +1324,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
OnCallStatusChange(activeCall);
|
OnCallStatusChange(activeCall);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var emptyList = new List<Participant>();
|
|
||||||
Participants.CurrentParticipants = emptyList;
|
|
||||||
//Participants.OnParticipantsChanged();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Debug.Console(1, this, "[DeserializeResponse] zEvent.calldisconnect ********************************************");
|
Debug.Console(1, this, "[DeserializeResponse] zEvent.calldisconnect ********************************************");
|
||||||
@@ -1571,12 +1561,20 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Retrieves the current call participants list
|
||||||
|
/// </summary>
|
||||||
|
public void GetCurrentCallParticipants()
|
||||||
|
{
|
||||||
|
SendText("zCommand Call ListParticipants");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Prints the current call particiapnts list
|
||||||
|
/// </summary>
|
||||||
public void PrintCurrentCallParticipants()
|
public void PrintCurrentCallParticipants()
|
||||||
{
|
{
|
||||||
if (Debug.Level <= 0)
|
if (Debug.Level <= 0) return;
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Debug.Console(1, this, "*************************** Call Participants **************************");
|
Debug.Console(1, this, "*************************** Call Participants **************************");
|
||||||
foreach (var participant in Participants.CurrentParticipants)
|
foreach (var participant in Participants.CurrentParticipants)
|
||||||
@@ -1587,11 +1585,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
Debug.Console(1, this, "************************************************************************");
|
Debug.Console(1, this, "************************************************************************");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void GetCurrentCallParticipants()
|
|
||||||
{
|
|
||||||
SendText("zCommand Call ListParticipants");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Retrieves bookings list
|
/// Retrieves bookings list
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -1609,8 +1602,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
Debug.Console(1, this, "[UpdateCallStatus] Current Call Status: {0}",
|
Debug.Console(1, this, "[UpdateCallStatus] Current Call Status: {0}",
|
||||||
Status.Call != null ? Status.Call.Status.ToString() : "no call");
|
Status.Call != null ? Status.Call.Status.ToString() : "no call");
|
||||||
|
|
||||||
//var emptyList = new List<Participant>();
|
|
||||||
|
|
||||||
if (Status.Call != null)
|
if (Status.Call != null)
|
||||||
{
|
{
|
||||||
var callStatus = Status.Call.Status;
|
var callStatus = Status.Call.Status;
|
||||||
@@ -1621,7 +1612,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
Debug.Console(1, this, "[UpdateCallStatus] Creating new Status.Call object");
|
Debug.Console(1, this, "[UpdateCallStatus] Creating new Status.Call object");
|
||||||
Status.Call = new zStatus.Call { Status = callStatus };
|
Status.Call = new zStatus.Call { Status = callStatus };
|
||||||
|
|
||||||
OnCallStatusChange( new CodecActiveCallItem() { Status = eCodecCallStatus.Disconnected });
|
OnCallStatusChange(new CodecActiveCallItem() { Status = eCodecCallStatus.Disconnected });
|
||||||
|
|
||||||
SetUpCallFeedbackActions();
|
SetUpCallFeedbackActions();
|
||||||
}
|
}
|
||||||
@@ -1654,8 +1645,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
Type = eCodecCallType.Video,
|
Type = eCodecCallType.Video,
|
||||||
};
|
};
|
||||||
|
|
||||||
//Participants.CurrentParticipants = emptyList;
|
|
||||||
|
|
||||||
ActiveCalls.Add(newCall);
|
ActiveCalls.Add(newCall);
|
||||||
|
|
||||||
Debug.Console(1, this, "[UpdateCallStatus] IF w/ meeting_id AcitveCalls.Count == {1} - Current Call Status: {0}",
|
Debug.Console(1, this, "[UpdateCallStatus] IF w/ meeting_id AcitveCalls.Count == {1} - Current Call Status: {0}",
|
||||||
@@ -1667,8 +1656,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
{
|
{
|
||||||
Debug.Console(1, this, "[UpdateCallStatus] IF w/o meeting_id AcitveCalls.Count == {1} - Current Call Status: {0}",
|
Debug.Console(1, this, "[UpdateCallStatus] IF w/o meeting_id AcitveCalls.Count == {1} - Current Call Status: {0}",
|
||||||
Status.Call != null ? Status.Call.Status.ToString() : "no call", ActiveCalls.Count);
|
Status.Call != null ? Status.Call.Status.ToString() : "no call", ActiveCalls.Count);
|
||||||
|
|
||||||
//Participants.CurrentParticipants = emptyList;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1682,12 +1669,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
existingCall.Status = eCodecCallStatus.Connected;
|
existingCall.Status = eCodecCallStatus.Connected;
|
||||||
break;
|
break;
|
||||||
case zStatus.eCallStatus.NOT_IN_MEETING:
|
case zStatus.eCallStatus.NOT_IN_MEETING:
|
||||||
//Participants.CurrentParticipants = emptyList;
|
|
||||||
existingCall.Status = eCodecCallStatus.Disconnected;
|
existingCall.Status = eCodecCallStatus.Disconnected;
|
||||||
break;
|
break;
|
||||||
//default:
|
|
||||||
// Participants.CurrentParticipants = emptyList;
|
|
||||||
// break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Debug.Console(1, this, "[UpdateCallStatus] ELSE ActiveCalls.Count == {1} - Current Call Status: {0}",
|
Debug.Console(1, this, "[UpdateCallStatus] ELSE ActiveCalls.Count == {1} - Current Call Status: {0}",
|
||||||
@@ -1722,17 +1705,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
Debug.Console(1, this, "[UpdateCallStatus] Active Calls ------------------------------");
|
Debug.Console(1, this, "[UpdateCallStatus] Active Calls ------------------------------");
|
||||||
|
|
||||||
//clear participants list after call cleanup
|
//clear participants list after call cleanup
|
||||||
if (ActiveCalls.Count == 0)
|
|
||||||
{
|
|
||||||
var emptyList = new List<Participant>();
|
var emptyList = new List<Participant>();
|
||||||
Participants.CurrentParticipants = emptyList;
|
Participants.CurrentParticipants = emptyList;
|
||||||
}
|
if (ActiveCalls.Count > 0) GetCurrentCallParticipants();
|
||||||
else
|
|
||||||
{
|
|
||||||
var emptyList = new List<Participant>();
|
|
||||||
Participants.CurrentParticipants = emptyList;
|
|
||||||
GetCurrentCallParticipants();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnCallStatusChange(CodecActiveCallItem item)
|
protected override void OnCallStatusChange(CodecActiveCallItem item)
|
||||||
|
|||||||
Reference in New Issue
Block a user