Updates to phone and video address logic

This commit is contained in:
Neil Dorin
2020-08-07 09:29:55 -06:00
parent dea858e187
commit 302603aa54
2 changed files with 11 additions and 8 deletions

View File

@@ -207,22 +207,24 @@ namespace PepperDash.Essentials.UIDrivers.VC
Debug.Console(1, Debug.Console(1,
@" @"
Codec.CodecInfo.SipUri: {0} Codec.CodecInfo.IpAddress: {0}
Codec.CodecInfo.SipPhoneNumber: {1} Codec.CodecInfo.SipUri: {1}
Codec.CodecInfo.E164Alias: {2} Codec.CodecInfo.SipPhoneNumber: {2}
Codec.CodecInfo.H323Id: {3} Codec.CodecInfo.E164Alias: {3}
", Codec.CodecInfo.SipUri, Codec.CodecInfo.SipPhoneNumber, Codec.CodecInfo.E164Alias, Codec.CodecInfo.H323Id); 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 if (!string.IsNullOrEmpty(Codec.CodecInfo.SipUri)) // If both values are present, format the string with a pipe divider
{ {
roomPhoneNumber = Codec.CodecInfo.SipUri; roomPhoneNumber = Codec.CodecInfo.SipUri;
} }
else if (!string.IsNullOrEmpty(Codec.CodecInfo.SipPhoneNumber)) // If only one value present, just show the phone number
if (string.IsNullOrEmpty(roomPhoneNumber)) // If only one value present, just show the phone number
{ {
roomPhoneNumber = GetFormattedPhoneNumber(Codec.CodecInfo.SipPhoneNumber); roomPhoneNumber = GetFormattedPhoneNumber(Codec.CodecInfo.SipPhoneNumber);
} }
// Populate video number
if (!string.IsNullOrEmpty(Codec.CodecInfo.IpAddress)) if (!string.IsNullOrEmpty(Codec.CodecInfo.IpAddress))
{ {
roomVideoAddress = Codec.CodecInfo.IpAddress; roomVideoAddress = Codec.CodecInfo.IpAddress;

View File

@@ -1699,7 +1699,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
{ {
get 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; return CodecConfiguration.Configuration.H323.H323Alias.ID.Value;
} }