Added objects back to xStatus lost in merge and fixed regex pattern for extracting phone number.

Added formatting call to room phone number when displayed on header
This commit is contained in:
Neil Dorin
2017-10-24 12:35:29 -06:00
parent 7273646be0
commit 88a60b06e6
3 changed files with 34 additions and 2 deletions

View File

@@ -1290,7 +1290,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
{
if (CodecStatus.Status.SIP.Registration.Count > 0)
{
var match = Regex.Match(CodecStatus.Status.SIP.Registration[0].URI.Value, "\\d+"); // extract numbers only
var match = Regex.Match(CodecStatus.Status.SIP.Registration[0].URI.Value, @"(\d+)"); // extract numbers only
if (match.Success)
{
Debug.Console(1, "Unable to extract phone number from string: '{0}'", CodecStatus.Status.SIP.Registration[0].URI.Value);

View File

@@ -1112,6 +1112,26 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
}
}
public class Primary
{
public URI URI { get; set; }
public Primary()
{
URI = new URI();
}
}
public class AlternateURI
{
public Primary Primary { get; set; }
public AlternateURI()
{
Primary = new Primary();
}
}
public class Authentication
{
public string Value { get; set; }
@@ -1193,6 +1213,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public Reason3 Reason { get; set; }
public Status10 Status { get; set; }
public URI3 URI { get; set; }
public Registration()
{
URI = new URI3();
}
}
public class Secure
@@ -1207,6 +1232,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public class SIP
{
public AlternateURI AlternateURI { get; set; }
public Authentication Authentication { get; set; }
public CallForward CallForward { get; set; }
public Mailbox Mailbox { get; set; }
@@ -1214,6 +1240,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
public List<Registration> Registration { get; set; }
public Secure Secure { get; set; }
public Verified Verified { get; set; }
public SIP()
{
AlternateURI = new AlternateURI();
Registration = new List<Registration>();
}
}
public class Mode7

View File

@@ -194,7 +194,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
/// <param name="e"></param>
void Codec_IsReady()
{
TriList.SetString(UIStringJoin.RoomPhoneText, Codec.CodecInfo.PhoneNumber);
TriList.SetString(UIStringJoin.RoomPhoneText, GetFormattedDialString(Codec.CodecInfo.PhoneNumber));
TriList.SetString(UIStringJoin.RoomSipText, Codec.CodecInfo.SipUri);
if(Parent.HeaderButtonsAreSetUp)