diff --git a/src/PepperDash.Essentials.Core/Devices/SourceListItem.cs b/src/PepperDash.Essentials.Core/Devices/SourceListItem.cs
index e6724760..deaeeae3 100644
--- a/src/PepperDash.Essentials.Core/Devices/SourceListItem.cs
+++ b/src/PepperDash.Essentials.Core/Devices/SourceListItem.cs
@@ -77,9 +77,6 @@ namespace PepperDash.Essentials.Core
/// A name that will override the source's name on the UI
///
[JsonProperty("name")]
- ///
- /// Gets or sets the Name
- ///
public string Name { get; set; }
///
diff --git a/src/PepperDash.Essentials.Core/Fusion/IEssentialsRoomFusionController.cs b/src/PepperDash.Essentials.Core/Fusion/IEssentialsRoomFusionController.cs
index 593c9cce..bcf6509e 100644
--- a/src/PepperDash.Essentials.Core/Fusion/IEssentialsRoomFusionController.cs
+++ b/src/PepperDash.Essentials.Core/Fusion/IEssentialsRoomFusionController.cs
@@ -14,6 +14,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
+using System.Timers;
namespace PepperDash.Essentials.Core.Fusion
{
@@ -87,15 +88,17 @@ namespace PepperDash.Essentials.Core.Fusion
///
public StringFeedback HelpRequestStatusFeedback { get; private set; }
+ private Timer _helpRequestTimeoutTimer;
- #region System Info Sigs
+ ///
+ /// Gets the DefaultHelpRequestTimeoutMs
+ ///
+ public int HelpRequestTimeoutMs => _config.HelpRequestTimeoutMs;
- //StringSigData SystemName;
- //StringSigData Model;
- //StringSigData SerialNumber;
- //StringSigData Uptime;
-
- #endregion
+ ///
+ /// Gets whether to use a timer for help requests
+ ///
+ public bool UseHelpRequestTimer => _config.UseTimeoutForHelpRequests;
#region Processor Info Sigs
@@ -1805,7 +1808,7 @@ namespace PepperDash.Essentials.Core.Fusion
break;
case "Please call the helpdesk.":
// this.LogInformation("Please call the helpdesk.");
- // _helpRequestStatus = eFusionHelpResponse.CallHelpDesk;
+ _helpRequestStatus = eFusionHelpResponse.CallHelpDesk;
break;
case "Please wait, I will reschedule your meeting to a different room.":
// this.LogInformation("Please wait, I will reschedule your meeting to a different room.",
@@ -1839,6 +1842,14 @@ namespace PepperDash.Essentials.Core.Fusion
}
HelpRequestStatusFeedback.FireUpdate();
+
+ if (_helpRequestTimeoutTimer != null)
+ {
+ _helpRequestTimeoutTimer.Stop();
+ _helpRequestTimeoutTimer.Elapsed -= OnTimedEvent;
+ _helpRequestTimeoutTimer.Dispose();
+ _helpRequestTimeoutTimer = null;
+ }
}
@@ -1909,10 +1920,34 @@ namespace PepperDash.Essentials.Core.Fusion
_helpRequestSent = true;
HelpRequestSentFeedback.FireUpdate();
+ if (UseHelpRequestTimer)
+ {
+ if (_helpRequestTimeoutTimer == null)
+ {
+ _helpRequestTimeoutTimer = new Timer(HelpRequestTimeoutMs);
+ _helpRequestTimeoutTimer.AutoReset = false;
+ _helpRequestTimeoutTimer.Enabled = true;
+
+ _helpRequestTimeoutTimer.Elapsed += OnTimedEvent;
+ }
+
+ _helpRequestTimeoutTimer.Interval = HelpRequestTimeoutMs;
+ _helpRequestTimeoutTimer.Start();
+
+ this.LogDebug("Help request timeout timer started for room '{0}' with timeout of {1} ms.",
+ Room.Name, HelpRequestTimeoutMs);
+ }
+
_helpRequestStatus = eFusionHelpResponse.HelpRequested;
HelpRequestStatusFeedback.FireUpdate();
}
+ private void OnTimedEvent(object source, ElapsedEventArgs e)
+ {
+ this.LogInformation("Help request timeout reached for room '{0}'. Cancelling help request.", Room.Name);
+ CancelHelpRequest();
+ }
+
///
public void CancelHelpRequest()
{
@@ -1923,7 +1958,16 @@ namespace PepperDash.Essentials.Core.Fusion
HelpRequestSentFeedback.FireUpdate();
_helpRequestStatus = eFusionHelpResponse.None;
HelpRequestStatusFeedback.FireUpdate();
- Debug.LogMessage(LogEventLevel.Information, this, "Help request cancelled in Fusion for room '{0}'", Room.Name);
+ Debug.LogMessage(LogEventLevel.Information, this, "Help request cancelled for room '{0}'", Room.Name);
+ }
+
+ if (_helpRequestTimeoutTimer != null)
+ {
+ _helpRequestTimeoutTimer.Stop();
+ _helpRequestTimeoutTimer.Elapsed -= OnTimedEvent;
+ _helpRequestTimeoutTimer.Dispose();
+ _helpRequestTimeoutTimer = null;
+ this.LogDebug("Help request timeout timer stopped for room '{0}'.", Room.Name);
}
}
diff --git a/src/PepperDash.Essentials.Core/Fusion/IEssentialsRoomFusionControllerPropertiesConfig.cs b/src/PepperDash.Essentials.Core/Fusion/IEssentialsRoomFusionControllerPropertiesConfig.cs
index 4dc4a834..c9dea4c3 100644
--- a/src/PepperDash.Essentials.Core/Fusion/IEssentialsRoomFusionControllerPropertiesConfig.cs
+++ b/src/PepperDash.Essentials.Core/Fusion/IEssentialsRoomFusionControllerPropertiesConfig.cs
@@ -56,4 +56,16 @@ public class IEssentialsRoomFusionControllerPropertiesConfig
///
[JsonProperty("use24HourTimeFormat")]
public bool Use24HourTimeFormat { get; set; } = false;
+
+ ///
+ /// Gets or sets whether to use a timeout for help requests
+ ///
+ [JsonProperty("useTimeoutForHelpRequests")]
+ public bool UseTimeoutForHelpRequests { get; set; } = false;
+
+ ///
+ /// Gets or sets the timeout duration for help requests in milliseconds
+ ///
+ [JsonProperty("helpRequestTimeoutMs")]
+ public int HelpRequestTimeoutMs { get; set; } = 30000;
}
\ No newline at end of file
diff --git a/src/PepperDash.Essentials.Core/Room/Config/EssentialsRoomConfig.cs b/src/PepperDash.Essentials.Core/Room/Config/EssentialsRoomConfig.cs
index b5584f93..8de477f3 100644
--- a/src/PepperDash.Essentials.Core/Room/Config/EssentialsRoomConfig.cs
+++ b/src/PepperDash.Essentials.Core/Room/Config/EssentialsRoomConfig.cs
@@ -105,12 +105,21 @@ namespace PepperDash.Essentials.Room.Config
///
public class EssentialsRoomPropertiesConfig
{
+ ///
+ /// Gets or sets the Addresses
+ ///
[JsonProperty("addresses")]
public EssentialsRoomAddressPropertiesConfig Addresses { get; set; }
+ ///
+ /// Gets or sets the Description
+ ///
[JsonProperty("description")]
public string Description { get; set; }
+ ///
+ /// Gets or sets the Emergency
+ ///
[JsonProperty("emergency")]
public EssentialsRoomEmergencyConfig Emergency { get; set; }
@@ -226,11 +235,11 @@ namespace PepperDash.Essentials.Room.Config
/// Indicates if this room represents a combination of other rooms
///
[JsonProperty("isRoomCombinationScenario")]
- ///
- /// Gets or sets the IsRoomCombinationScenario
- ///
public bool IsRoomCombinationScenario { get; set; }
+ ///
+ /// Constructor
+ ///
public EssentialsRoomPropertiesConfig()
{
LogoLight = new EssentialsLogoPropertiesConfig();
@@ -243,10 +252,10 @@ namespace PepperDash.Essentials.Room.Config
///
public class EssentialsRoomUiBehaviorConfig
{
- [JsonProperty("disableActivityButtonsWhileWarmingCooling")]
///
/// Gets or sets the DisableActivityButtonsWhileWarmingCooling
///
+ [JsonProperty("disableActivityButtonsWhileWarmingCooling")]
public bool DisableActivityButtonsWhileWarmingCooling { get; set; }
}
@@ -255,74 +264,86 @@ namespace PepperDash.Essentials.Room.Config
///
public class EssentialsAvRoomPropertiesConfig : EssentialsRoomPropertiesConfig
{
- [JsonProperty("defaultAudioKey")]
///
/// Gets or sets the DefaultAudioKey
///
+ [JsonProperty("defaultAudioKey")]
public string DefaultAudioKey { get; set; }
- [JsonProperty("sourceListKey")]
+
+ ///
+ /// Gets or sets the DefaultOnDspPresetKey
+ ///
+ [JsonProperty("defaultOnDspPresetKey")]
+ public string DefaultOnDspPresetKey { get; set; }
+
+ ///
+ /// Gets or sets the DefaultOffDspPresetKey
+ ///
+ [JsonProperty("defaultOffDspPresetKey")]
+ public string DefaultOffDspPresetKey { get; set; }
+
///
/// Gets or sets the SourceListKey
///
+ ///
+ [JsonProperty("sourceListKey")]
public string SourceListKey { get; set; }
- [JsonProperty("destinationListKey")]
///
/// Gets or sets the DestinationListKey
///
+ [JsonProperty("destinationListKey")]
public string DestinationListKey { get; set; }
- [JsonProperty("audioControlPointListKey")]
///
/// Gets or sets the AudioControlPointListKey
///
+ [JsonProperty("audioControlPointListKey")]
public string AudioControlPointListKey { get; set; }
- [JsonProperty("cameraListKey")]
///
/// Gets or sets the CameraListKey
///
+ [JsonProperty("cameraListKey")]
public string CameraListKey { get; set; }
- [JsonProperty("defaultSourceItem")]
///
/// Gets or sets the DefaultSourceItem
///
+ [JsonProperty("defaultSourceItem")]
public string DefaultSourceItem { get; set; }
///
/// Indicates if the room supports advanced sharing
///
[JsonProperty("supportsAdvancedSharing")]
- ///
- /// Gets or sets the SupportsAdvancedSharing
- ///
public bool SupportsAdvancedSharing { get; set; }
+
///
/// Indicates if non-tech users can change the share mode
///
[JsonProperty("userCanChangeShareMode")]
- ///
- /// Gets or sets the UserCanChangeShareMode
- ///
public bool UserCanChangeShareMode { get; set; }
- [JsonProperty("matrixRoutingKey", NullValueHandling = NullValueHandling.Ignore)]
///
/// Gets or sets the MatrixRoutingKey
///
+ [JsonProperty("matrixRoutingKey", NullValueHandling = NullValueHandling.Ignore)]
public string MatrixRoutingKey { get; set; }
}
+ ///
+ /// Represents a EssentialsConferenceRoomPropertiesConfig
+ ///
public class EssentialsConferenceRoomPropertiesConfig : EssentialsAvRoomPropertiesConfig
{
- [JsonProperty("videoCodecKey")]
///
/// Gets or sets the VideoCodecKey
///
+ [JsonProperty("videoCodecKey")]
public string VideoCodecKey { get; set; }
- [JsonProperty("audioCodecKey")]
///
/// Gets or sets the AudioCodecKey
///
+ [JsonProperty("audioCodecKey")]
public string AudioCodecKey { get; set; }
}
@@ -337,12 +358,15 @@ namespace PepperDash.Essentials.Room.Config
///
public bool Enabled { get; set; }
- [JsonProperty("deviceKeys")]
///
/// Gets or sets the DeviceKeys
///
+ [JsonProperty("deviceKeys")]
public List DeviceKeys { get; set; }
+ ///
+ /// Constructor
+ ///
public EssentialsEnvironmentPropertiesConfig()
{
DeviceKeys = new List();
@@ -355,6 +379,9 @@ namespace PepperDash.Essentials.Room.Config
///
public class EssentialsRoomFusionConfig
{
+ ///
+ /// Gets the the IpId as a UInt16
+ ///
public uint IpIdInt
{
get
@@ -371,16 +398,16 @@ namespace PepperDash.Essentials.Room.Config
}
}
- [JsonProperty("ipId")]
///
/// Gets or sets the IpId
///
+ [JsonProperty("ipId")]
public string IpId { get; set; }
- [JsonProperty("joinMapKey")]
///
/// Gets or sets the JoinMapKey
///
+ [JsonProperty("joinMapKey")]
public string JoinMapKey { get; set; }
}
@@ -390,16 +417,16 @@ namespace PepperDash.Essentials.Room.Config
///
public class EssentialsRoomMicrophonePrivacyConfig
{
- [JsonProperty("deviceKey")]
///
/// Gets or sets the DeviceKey
///
+ [JsonProperty("deviceKey")]
public string DeviceKey { get; set; }
- [JsonProperty("behaviour")]
///
/// Gets or sets the Behaviour
///
+ [JsonProperty("behaviour")]
public string Behaviour { get; set; }
}
@@ -408,12 +435,15 @@ namespace PepperDash.Essentials.Room.Config
///
public class EssentialsHelpPropertiesConfig
{
- [JsonProperty("message")]
///
/// Gets or sets the Message
///
+ [JsonProperty("message")]
public string Message { get; set; }
+ ///
+ /// Gets or sets the ShowCallButton
+ ///
[JsonProperty("showCallButton")]
public bool ShowCallButton { get; set; }
@@ -421,11 +451,11 @@ namespace PepperDash.Essentials.Room.Config
/// Defaults to "Call Help Desk"
///
[JsonProperty("callButtonText")]
- ///
- /// Gets or sets the CallButtonText
- ///
public string CallButtonText { get; set; }
+ ///
+ /// Constructor
+ ///
public EssentialsHelpPropertiesConfig()
{
CallButtonText = "Call Help Desk";
@@ -437,22 +467,28 @@ namespace PepperDash.Essentials.Room.Config
///
public class EssentialsOneButtonMeetingPropertiesConfig
{
- [JsonProperty("enable")]
///
/// Gets or sets the Enable
///
+ [JsonProperty("enable")]
public bool Enable { get; set; }
}
+ ///
+ /// Represents a EssentialsRoomAddressPropertiesConfig
+ ///
public class EssentialsRoomAddressPropertiesConfig
{
+ ///
+ /// Gets or sets the PhoneNumber
+ ///
[JsonProperty("phoneNumber")]
public string PhoneNumber { get; set; }
- [JsonProperty("sipAddress")]
///
/// Gets or sets the SipAddress
///
+ [JsonProperty("sipAddress")]
public string SipAddress { get; set; }
}
@@ -462,14 +498,18 @@ namespace PepperDash.Essentials.Room.Config
///
public class EssentialsLogoPropertiesConfig
{
- [JsonProperty("type")]
///
/// Gets or sets the Type
///
+ [JsonProperty("type")]
public string Type { get; set; }
+ ///
+ /// Gets or sets the Url
+ ///
[JsonProperty("url")]
public string Url { get; set; }
+
///
/// GetLogoUrlLight method
///
@@ -502,22 +542,28 @@ namespace PepperDash.Essentials.Room.Config
///
public class EssentialsRoomOccSensorConfig
{
- [JsonProperty("deviceKey")]
///
/// Gets or sets the DeviceKey
///
+ [JsonProperty("deviceKey")]
public string DeviceKey { get; set; }
+ ///
+ /// Gets or sets the TimeoutMinutes
+ ///
[JsonProperty("timeoutMinutes")]
public int TimeoutMinutes { get; set; }
}
+ ///
+ /// Represents a EssentialsRoomTechConfig
+ ///
public class EssentialsRoomTechConfig
{
- [JsonProperty("password")]
///
/// Gets or sets the Password
///
+ [JsonProperty("password")]
public string Password { get; set; }
}
}
\ No newline at end of file