From 302603aa543fc5bc4ac933bdc63ebd78b9e39172 Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Fri, 7 Aug 2020 09:29:55 -0600 Subject: [PATCH] Updates to phone and video address logic --- .../UIDrivers/VC/EssentialsVideoCodecUiDriver.cs | 16 +++++++++------- .../VideoCodec/CiscoCodec/CiscoSparkCodec.cs | 3 ++- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs b/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs index 2af64755..7e9ab2e6 100644 --- a/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs +++ b/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs @@ -207,22 +207,24 @@ namespace PepperDash.Essentials.UIDrivers.VC Debug.Console(1, @" - Codec.CodecInfo.SipUri: {0} - Codec.CodecInfo.SipPhoneNumber: {1} - Codec.CodecInfo.E164Alias: {2} - Codec.CodecInfo.H323Id: {3} - ", Codec.CodecInfo.SipUri, Codec.CodecInfo.SipPhoneNumber, Codec.CodecInfo.E164Alias, Codec.CodecInfo.H323Id); + Codec.CodecInfo.IpAddress: {0} + Codec.CodecInfo.SipUri: {1} + Codec.CodecInfo.SipPhoneNumber: {2} + Codec.CodecInfo.E164Alias: {3} + Codec.CodecInfo.H323Id: {4} + ", Codec.CodecInfo.IpAddress, Codec.CodecInfo.SipUri, Codec.CodecInfo.SipPhoneNumber, Codec.CodecInfo.E164Alias, Codec.CodecInfo.H323Id); + // Populate phone number if (!string.IsNullOrEmpty(Codec.CodecInfo.SipUri)) // If both values are present, format the string with a pipe divider { roomPhoneNumber = Codec.CodecInfo.SipUri; } - - if (string.IsNullOrEmpty(roomPhoneNumber)) // If only one value present, just show the phone number + else if (!string.IsNullOrEmpty(Codec.CodecInfo.SipPhoneNumber)) // If only one value present, just show the phone number { roomPhoneNumber = GetFormattedPhoneNumber(Codec.CodecInfo.SipPhoneNumber); } + // Populate video number if (!string.IsNullOrEmpty(Codec.CodecInfo.IpAddress)) { roomVideoAddress = Codec.CodecInfo.IpAddress; diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoSparkCodec.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoSparkCodec.cs index 745af1a6..b870fa78 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoSparkCodec.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoSparkCodec.cs @@ -1699,7 +1699,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco { get { - if (CodecConfiguration.Configuration.H323 != null && CodecConfiguration.Configuration.H323.H323Alias.ID != null) + if (CodecConfiguration.Configuration.H323 != null && CodecConfiguration.Configuration.H323.H323Alias != null + && CodecConfiguration.Configuration.H323.H323Alias.ID != null) { return CodecConfiguration.Configuration.H323.H323Alias.ID.Value; }