mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 20:54:55 +00:00
Merge pull request #291 from PepperDash/feature/CloudConnected-CiscoSpark
Added a null check to determining SIP information
This commit is contained in:
@@ -1658,7 +1658,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (CodecStatus.Status.SIP.Registration.Count > 0)
|
if (CodecStatus.Status.SIP != null && 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)
|
if (match.Success)
|
||||||
@@ -1678,17 +1678,26 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
return string.Empty;
|
return string.Empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public override string SipUri
|
|
||||||
{
|
public override string SipUri
|
||||||
get
|
{
|
||||||
{
|
get
|
||||||
if (CodecStatus.Status.SIP.AlternateURI.Primary.URI.Value != null)
|
{
|
||||||
return CodecStatus.Status.SIP.AlternateURI.Primary.URI.Value;
|
if (CodecStatus.Status.SIP != null && CodecStatus.Status.SIP.AlternateURI.Primary.URI.Value != null)
|
||||||
else
|
{
|
||||||
return string.Empty;
|
return CodecStatus.Status.SIP.AlternateURI.Primary.URI.Value;
|
||||||
}
|
}
|
||||||
}
|
else if (CodecStatus.Status.UserInterface != null &&
|
||||||
|
CodecStatus.Status.UserInterface.ContactInfo.ContactMethod[0].Number.Value != null)
|
||||||
|
{
|
||||||
|
return CodecStatus.Status.UserInterface.ContactInfo.ContactMethod[0].Number.Value;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public override bool AutoAnswerEnabled
|
public override bool AutoAnswerEnabled
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|||||||
Reference in New Issue
Block a user