mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-12 12:06:58 +00:00
Fixed incoming call popup issue with CiscoCodec call direction value not being stored to ActiveCallItem
This commit is contained in:
parent
46cce6559c
commit
0bcb776ac5
2 changed files with 37 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue