mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 13:15:03 +00:00
Updates to phone and video address logic
This commit is contained in:
@@ -191,6 +191,14 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
/// <param name="sender"></param>
|
/// <param name="sender"></param>
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
void Codec_IsReady()
|
void Codec_IsReady()
|
||||||
|
{
|
||||||
|
SetupAddresses();
|
||||||
|
|
||||||
|
if(HeaderDriver.HeaderButtonsAreSetUp)
|
||||||
|
HeaderDriver.ComputeHeaderCallStatus(Codec);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetupAddresses()
|
||||||
{
|
{
|
||||||
string roomContactNumbers = "";
|
string roomContactNumbers = "";
|
||||||
string roomPhoneNumber = "";
|
string roomPhoneNumber = "";
|
||||||
@@ -209,27 +217,47 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
{
|
{
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(roomContactNumbers))
|
if (!string.IsNullOrEmpty(Codec.CodecInfo.IpAddress))
|
||||||
|
{
|
||||||
|
roomVideoAddress = Codec.CodecInfo.IpAddress;
|
||||||
|
}
|
||||||
|
else if (!string.IsNullOrEmpty(Codec.CodecInfo.E164Alias))
|
||||||
{
|
{
|
||||||
if(!string.IsNullOrEmpty(Codec.CodecInfo.E164Alias))
|
|
||||||
roomVideoAddress = Codec.CodecInfo.E164Alias;
|
roomVideoAddress = Codec.CodecInfo.E164Alias;
|
||||||
|
}
|
||||||
else if (!string.IsNullOrEmpty(Codec.CodecInfo.H323Id))
|
else if (!string.IsNullOrEmpty(Codec.CodecInfo.H323Id))
|
||||||
|
{
|
||||||
roomVideoAddress = Codec.CodecInfo.H323Id;
|
roomVideoAddress = Codec.CodecInfo.H323Id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Debug.Console(1,
|
||||||
|
@" Room Contact Numbers:
|
||||||
|
Phone Number: {0}
|
||||||
|
Video Number: {1}
|
||||||
|
", roomPhoneNumber, roomVideoAddress);
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(roomPhoneNumber) && !string.IsNullOrEmpty(roomVideoAddress))
|
||||||
|
{
|
||||||
roomContactNumbers = string.Format("{0} | {1}", roomPhoneNumber, roomVideoAddress);
|
roomContactNumbers = string.Format("{0} | {1}", roomPhoneNumber, roomVideoAddress);
|
||||||
|
}
|
||||||
|
else if (!string.IsNullOrEmpty(roomPhoneNumber))
|
||||||
|
{
|
||||||
|
roomContactNumbers = roomPhoneNumber;
|
||||||
|
}
|
||||||
|
else if (!string.IsNullOrEmpty(roomVideoAddress))
|
||||||
|
{
|
||||||
|
roomContactNumbers = roomVideoAddress;
|
||||||
|
}
|
||||||
|
|
||||||
TriList.SetString(UIStringJoin.RoomAddressPipeText, roomContactNumbers);
|
TriList.SetString(UIStringJoin.RoomAddressPipeText, roomContactNumbers);
|
||||||
TriList.SetString(UIStringJoin.RoomPhoneText, roomPhoneNumber);
|
TriList.SetString(UIStringJoin.RoomPhoneText, roomPhoneNumber);
|
||||||
TriList.SetString(UIStringJoin.RoomVideoAddressText, roomVideoAddress);
|
TriList.SetString(UIStringJoin.RoomVideoAddressText, roomVideoAddress);
|
||||||
|
|
||||||
if(HeaderDriver.HeaderButtonsAreSetUp)
|
|
||||||
HeaderDriver.ComputeHeaderCallStatus(Codec);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user