mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-11 19:44:52 +00:00
Fixed incoming call popup issue with CiscoCodec call direction value not being stored to ActiveCallItem
This commit is contained in:
@@ -11,4 +11,31 @@ namespace PepperDash.Essentials.Devices.Common.Codec
|
||||
{
|
||||
Unknown = 0, Incoming, Outgoing
|
||||
}
|
||||
|
||||
public class CodecCallDirection
|
||||
{
|
||||
/// <summary>
|
||||
/// Takes the Cisco call type and converts to the matching enum
|
||||
/// </summary>
|
||||
/// <param name="s"></param>
|
||||
/// <returns></returns>
|
||||
public static eCodecCallDirection ConvertToDirectionEnum(string s)
|
||||
{
|
||||
switch (s.ToLower())
|
||||
{
|
||||
case "incoming":
|
||||
{
|
||||
return eCodecCallDirection.Incoming;
|
||||
}
|
||||
case "outgoing":
|
||||
{
|
||||
return eCodecCallDirection.Outgoing;
|
||||
}
|
||||
default:
|
||||
return eCodecCallDirection.Unknown;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -462,6 +462,14 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
tempActiveCall.Name = call.DisplayName.Value;
|
||||
changeDetected = true;
|
||||
}
|
||||
if (call.Direction != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(call.Direction.Value))
|
||||
{
|
||||
tempActiveCall.Direction = CodecCallDirection.ConvertToDirectionEnum(call.Direction.Value);
|
||||
changeDetected = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (changeDetected)
|
||||
{
|
||||
@@ -477,7 +485,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
Status = CodecCallStatus.ConvertToStatusEnum(call.Status.Value),
|
||||
Name = call.DisplayName.Value,
|
||||
Number = call.RemoteNumber.Value,
|
||||
Type = CodecCallType.ConvertToTypeEnum(call.CallType.Value)
|
||||
Type = CodecCallType.ConvertToTypeEnum(call.CallType.Value),
|
||||
Direction = CodecCallDirection.ConvertToDirectionEnum(call.Direction.Value)
|
||||
};
|
||||
|
||||
// Add it to the ActiveCalls List
|
||||
|
||||
Reference in New Issue
Block a user