From 6da426507e90bc458713c8fa922e239df4d42c1d Mon Sep 17 00:00:00 2001 From: Craig Roberts Date: Wed, 29 Aug 2018 19:06:47 -0400 Subject: [PATCH 1/6] Add MusicOnHoldEvent --- .../Manager/Event/MusicOnHoldEvent.cs | 41 +++++++++++++++++++ .../Asterisk.NET/Manager/ManagerConnection.cs | 15 ++++++- .../Documentation/Documentation.shfbproj | 23 ++++++----- 3 files changed, 66 insertions(+), 13 deletions(-) create mode 100644 Asterisk.2013/Asterisk.NET/Manager/Event/MusicOnHoldEvent.cs diff --git a/Asterisk.2013/Asterisk.NET/Manager/Event/MusicOnHoldEvent.cs b/Asterisk.2013/Asterisk.NET/Manager/Event/MusicOnHoldEvent.cs new file mode 100644 index 0000000..dd75af4 --- /dev/null +++ b/Asterisk.2013/Asterisk.NET/Manager/Event/MusicOnHoldEvent.cs @@ -0,0 +1,41 @@ +namespace AsterNET.Manager.Event +{ + /// + /// The MusicOnHoldEvent event triggers when the music starts or ends playing the hold music. + /// + public class MusicOnHoldEvent : ManagerEvent + { + /// + /// Creates a new instance of the class . + /// + public MusicOnHoldEvent(ManagerConnection source) : base(source) + { + } + + /// + /// States + /// + public enum MusicOnHoldStates + { + /// + /// Unknown + /// + Unknown, + + /// + /// Music on hold is started. + /// + Start, + + /// + /// Music on hold is stoped. + /// + Stop + } + + /// + /// Get or set state + /// + public MusicOnHoldStates State { get; set; } + } +} diff --git a/Asterisk.2013/Asterisk.NET/Manager/ManagerConnection.cs b/Asterisk.2013/Asterisk.NET/Manager/ManagerConnection.cs index d1fe667..c5e1ae9 100644 --- a/Asterisk.2013/Asterisk.NET/Manager/ManagerConnection.cs +++ b/Asterisk.2013/Asterisk.NET/Manager/ManagerConnection.cs @@ -425,6 +425,10 @@ namespace AsterNET.Manager /// Available since : Asterisk 12. /// public event EventHandler QueueMemberPause; + /// + /// Raised when started or stopped music on hold by channel. + /// + public event EventHandler MusicOnHold; /// /// A ChallengeResponseFailed is triggered when a request's attempt to authenticate has been challenged, and the request failed the authentication challenge. @@ -569,6 +573,7 @@ namespace AsterNET.Manager Helper.RegisterEventHandler(registeredEventHandlers, typeof(QueueCallerJoinEvent), arg => fireEvent(QueueCallerJoin, arg)); Helper.RegisterEventHandler(registeredEventHandlers, typeof(QueueCallerLeaveEvent), arg => fireEvent(QueueCallerLeave, arg)); Helper.RegisterEventHandler(registeredEventHandlers, typeof(QueueMemberPauseEvent), arg => fireEvent(QueueMemberPause, arg)); + Helper.RegisterEventHandler(registeredEventHandlers, typeof(MusicOnHoldEvent), arg => fireEvent(MusicOnHold, arg)); Helper.RegisterEventHandler(registeredEventHandlers, typeof(ChallengeResponseFailedEvent), arg => fireEvent(ChallengeResponseFailed, arg)); Helper.RegisterEventHandler(registeredEventHandlers, typeof(InvalidAccountIDEvent), arg => fireEvent(InvalidAccountID, arg)); Helper.RegisterEventHandler(registeredEventHandlers, typeof(DeviceStateChangeEvent), arg => fireEvent(DeviceStateChanged, arg)); @@ -1314,13 +1319,13 @@ namespace AsterNET.Manager /// action to send /// timeout in milliseconds /// - public Response.ManagerResponse SendAction(ManagerAction action, int timeOut) + public Response.ManagerResponse SendAction(ManagerAction action, int timeout) { AutoResetEvent autoEvent = new AutoResetEvent(false); ResponseHandler handler = new ResponseHandler(action, autoEvent); int hash = SendAction(action, handler); - bool result = autoEvent.WaitOne(timeOut <= 0 ? -1 : timeOut, true); + bool result = autoEvent.WaitOne(timeout <= 0 ? -1 : timeout, true); RemoveResponseHandler(handler); @@ -1331,6 +1336,12 @@ namespace AsterNET.Manager #endregion #region SendAction(action, responseHandler) + /// + /// Send action ans with timeout (milliseconds) + /// + /// action to send + /// Response Handler + /// public int SendAction(ManagerAction action, ResponseHandler responseHandler) { if (action == null) diff --git a/Asterisk.2013/Documentation/Documentation.shfbproj b/Asterisk.2013/Documentation/Documentation.shfbproj index 513d87e..4bc17dc 100644 --- a/Asterisk.2013/Documentation/Documentation.shfbproj +++ b/Asterisk.2013/Documentation/Documentation.shfbproj @@ -7,7 +7,7 @@ AnyCPU 2.0 186124f7-82fa-4562-8b87-33d53a84e8ba - 1.9.9.0 + 2017.9.26.0 Documentation Documentation @@ -49,16 +49,17 @@ AboveNamespaces -AsterNet -AsterNet FastAGI -AsterNet FastAGI Command -AsterNet FastAGI Mapping Strategies -AsterNet IO -AsterNet Manager -AsterNet Manager Action -AsterNet Manager Event -AsterNet Manager Response -AsterNet Util + AsterNet + AsterNet FastAGI + AsterNet FastAGI Command + AsterNet FastAGI Mapping Strategies + AsterNet IO + AsterNet Manager + AsterNet Manager Action + AsterNet Manager Event + AsterNet Manager Response + AsterNet Util + AsterNET is an open source .NET framework for Asterisk AMI and FastAGI. AsterNET allows you to talk to Asterisk AMI from any .NET application and create FastAGI applications in any .NET language. http://www.xdev.net/projects/asternet/ From deccbc2b4b1f0bffe164788fa4823579c380b8fa Mon Sep 17 00:00:00 2001 From: Craig Roberts Date: Thu, 30 Aug 2018 15:05:02 -0400 Subject: [PATCH 2/6] fix some comments --- .../Manager/Event/MusicOnHoldEvent.cs | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/Asterisk.2013/Asterisk.NET/Manager/Event/MusicOnHoldEvent.cs b/Asterisk.2013/Asterisk.NET/Manager/Event/MusicOnHoldEvent.cs index dd75af4..998c24e 100644 --- a/Asterisk.2013/Asterisk.NET/Manager/Event/MusicOnHoldEvent.cs +++ b/Asterisk.2013/Asterisk.NET/Manager/Event/MusicOnHoldEvent.cs @@ -1,34 +1,33 @@ namespace AsterNET.Manager.Event { - /// - /// The MusicOnHoldEvent event triggers when the music starts or ends playing the hold music. - /// - public class MusicOnHoldEvent : ManagerEvent + /// + /// The MusicOnHoldEvent event triggers when the music starts or ends playing the hold music.
+ /// See LINK + ///
+ public class MusicOnHoldEvent : ManagerEvent { - /// - /// Creates a new instance of the class . - /// - public MusicOnHoldEvent(ManagerConnection source) : base(source) + /// + /// Creates a new empty using the given . + /// + public MusicOnHoldEvent(ManagerConnection source) : base(source) { } /// - /// States + /// States /// public enum MusicOnHoldStates { /// - /// Unknown + /// Unknown /// Unknown, - /// - /// Music on hold is started. + /// Music on hold is started. /// Start, - /// - /// Music on hold is stoped. + /// Music on hold is stopped. /// Stop } From 3c74cf4131c47e11c14f98c3b34300caadba5829 Mon Sep 17 00:00:00 2001 From: Craig Roberts Date: Thu, 30 Aug 2018 15:05:34 -0400 Subject: [PATCH 3/6] fix comment --- Asterisk.2013/Asterisk.NET/Manager/Event/MusicOnHoldEvent.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Asterisk.2013/Asterisk.NET/Manager/Event/MusicOnHoldEvent.cs b/Asterisk.2013/Asterisk.NET/Manager/Event/MusicOnHoldEvent.cs index 998c24e..2655688 100644 --- a/Asterisk.2013/Asterisk.NET/Manager/Event/MusicOnHoldEvent.cs +++ b/Asterisk.2013/Asterisk.NET/Manager/Event/MusicOnHoldEvent.cs @@ -33,7 +33,7 @@ } /// - /// Get or set state + /// Get or set state /// public MusicOnHoldStates State { get; set; } } From 9d1aae4f9b2dce5f6992d6da41df71b86a5a14a2 Mon Sep 17 00:00:00 2001 From: Craig Roberts Date: Thu, 6 Sep 2018 19:28:18 -0400 Subject: [PATCH 4/6] remove changes not related to this commit --- .../Asterisk.NET/Manager/ManagerConnection.cs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/Asterisk.2013/Asterisk.NET/Manager/ManagerConnection.cs b/Asterisk.2013/Asterisk.NET/Manager/ManagerConnection.cs index c5e1ae9..37f983a 100644 --- a/Asterisk.2013/Asterisk.NET/Manager/ManagerConnection.cs +++ b/Asterisk.2013/Asterisk.NET/Manager/ManagerConnection.cs @@ -425,6 +425,7 @@ namespace AsterNET.Manager /// Available since : Asterisk 12. ///
public event EventHandler QueueMemberPause; + /// /// Raised when started or stopped music on hold by channel. /// @@ -1319,13 +1320,13 @@ namespace AsterNET.Manager /// action to send /// timeout in milliseconds /// - public Response.ManagerResponse SendAction(ManagerAction action, int timeout) + public Response.ManagerResponse SendAction(ManagerAction action, int timeOut) { AutoResetEvent autoEvent = new AutoResetEvent(false); ResponseHandler handler = new ResponseHandler(action, autoEvent); int hash = SendAction(action, handler); - bool result = autoEvent.WaitOne(timeout <= 0 ? -1 : timeout, true); + bool result = autoEvent.WaitOne(timeOut <= 0 ? -1 : timeOut, true); RemoveResponseHandler(handler); @@ -1336,12 +1337,6 @@ namespace AsterNET.Manager #endregion #region SendAction(action, responseHandler) - /// - /// Send action ans with timeout (milliseconds) - /// - /// action to send - /// Response Handler - /// public int SendAction(ManagerAction action, ResponseHandler responseHandler) { if (action == null) From bc29b8feb559767f1b76e9e38b6cbd05a5faca4d Mon Sep 17 00:00:00 2001 From: Craig Roberts Date: Thu, 6 Sep 2018 19:58:20 -0400 Subject: [PATCH 5/6] add musiconhold start/stop events --- .../Manager/Event/MusicOnHoldEvent.cs | 40 ------------------- .../Manager/Event/MusicOnHoldStartEvent.cs | 38 ++++++++++++++++++ .../Manager/Event/MusicOnHoldStopEvent.cs | 33 +++++++++++++++ .../Asterisk.NET/Manager/ManagerConnection.cs | 12 ++++-- 4 files changed, 80 insertions(+), 43 deletions(-) delete mode 100644 Asterisk.2013/Asterisk.NET/Manager/Event/MusicOnHoldEvent.cs create mode 100644 Asterisk.2013/Asterisk.NET/Manager/Event/MusicOnHoldStartEvent.cs create mode 100644 Asterisk.2013/Asterisk.NET/Manager/Event/MusicOnHoldStopEvent.cs diff --git a/Asterisk.2013/Asterisk.NET/Manager/Event/MusicOnHoldEvent.cs b/Asterisk.2013/Asterisk.NET/Manager/Event/MusicOnHoldEvent.cs deleted file mode 100644 index 2655688..0000000 --- a/Asterisk.2013/Asterisk.NET/Manager/Event/MusicOnHoldEvent.cs +++ /dev/null @@ -1,40 +0,0 @@ -namespace AsterNET.Manager.Event -{ - /// - /// The MusicOnHoldEvent event triggers when the music starts or ends playing the hold music.
- /// See LINK - ///
- public class MusicOnHoldEvent : ManagerEvent - { - /// - /// Creates a new empty using the given . - /// - public MusicOnHoldEvent(ManagerConnection source) : base(source) - { - } - - /// - /// States - /// - public enum MusicOnHoldStates - { - /// - /// Unknown - /// - Unknown, - /// - /// Music on hold is started. - /// - Start, - /// - /// Music on hold is stopped. - /// - Stop - } - - /// - /// Get or set state - /// - public MusicOnHoldStates State { get; set; } - } -} diff --git a/Asterisk.2013/Asterisk.NET/Manager/Event/MusicOnHoldStartEvent.cs b/Asterisk.2013/Asterisk.NET/Manager/Event/MusicOnHoldStartEvent.cs new file mode 100644 index 0000000..bfefb31 --- /dev/null +++ b/Asterisk.2013/Asterisk.NET/Manager/Event/MusicOnHoldStartEvent.cs @@ -0,0 +1,38 @@ +namespace AsterNET.Manager.Event +{ + /// + /// Raised when music on hold has started on a channel.
+ /// See https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+ManagerEvent_MusicOnHoldStart + ///
+ public class MusicOnHoldStartEvent : ManagerEvent + { + /// + /// Creates a new . + /// + /// + public MusicOnHoldStartEvent(ManagerConnection source) : base(source) + { + } + + /// + /// Gets or sets the class of music being played on the channel. + /// + public string Class { get; set; } + + public string ChannelState { get; set; } + public string ChannelStateDesc { get; set; } + + public string CallerIDNum { get; set; } + public string CallerIDName { get; set; } + + public string ConnectedLineNum { get; set; } + public string ConnectedLineName { get; set; } + + public string Language { get; set; } + public string AccountCode { get; set; } + public string Context { get; set; } + public string Exten { get; set; } + public string Priority { get; set; } + + } +} diff --git a/Asterisk.2013/Asterisk.NET/Manager/Event/MusicOnHoldStopEvent.cs b/Asterisk.2013/Asterisk.NET/Manager/Event/MusicOnHoldStopEvent.cs new file mode 100644 index 0000000..66598f3 --- /dev/null +++ b/Asterisk.2013/Asterisk.NET/Manager/Event/MusicOnHoldStopEvent.cs @@ -0,0 +1,33 @@ +namespace AsterNET.Manager.Event +{ + /// + /// Raised when music on hold has stopped on a channel.
+ /// See https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+ManagerEvent_MusicOnHoldStop + ///
+ public class MusicOnHoldStopEvent : ManagerEvent + { + /// + /// Creates a new . + /// + /// + public MusicOnHoldStopEvent(ManagerConnection source) : base(source) + { + } + + public string ChannelState { get; set; } + public string ChannelStateDesc { get; set; } + + public string CallerIDNum { get; set; } + public string CallerIDName { get; set; } + + public string ConnectedLineNum { get; set; } + public string ConnectedLineName { get; set; } + + public string Language { get; set; } + public string AccountCode { get; set; } + public string Context { get; set; } + public string Exten { get; set; } + public string Priority { get; set; } + + } +} diff --git a/Asterisk.2013/Asterisk.NET/Manager/ManagerConnection.cs b/Asterisk.2013/Asterisk.NET/Manager/ManagerConnection.cs index 37f983a..d6a34f1 100644 --- a/Asterisk.2013/Asterisk.NET/Manager/ManagerConnection.cs +++ b/Asterisk.2013/Asterisk.NET/Manager/ManagerConnection.cs @@ -427,9 +427,14 @@ namespace AsterNET.Manager public event EventHandler QueueMemberPause; /// - /// Raised when started or stopped music on hold by channel. + /// Raised when music on hold has started on a channel. /// - public event EventHandler MusicOnHold; + public event EventHandler MusicOnHoldStart; + + /// + /// Raised when music on hold has stopped on a channel. + /// + public event EventHandler MusicOnHoldStop; /// /// A ChallengeResponseFailed is triggered when a request's attempt to authenticate has been challenged, and the request failed the authentication challenge. @@ -574,7 +579,8 @@ namespace AsterNET.Manager Helper.RegisterEventHandler(registeredEventHandlers, typeof(QueueCallerJoinEvent), arg => fireEvent(QueueCallerJoin, arg)); Helper.RegisterEventHandler(registeredEventHandlers, typeof(QueueCallerLeaveEvent), arg => fireEvent(QueueCallerLeave, arg)); Helper.RegisterEventHandler(registeredEventHandlers, typeof(QueueMemberPauseEvent), arg => fireEvent(QueueMemberPause, arg)); - Helper.RegisterEventHandler(registeredEventHandlers, typeof(MusicOnHoldEvent), arg => fireEvent(MusicOnHold, arg)); + Helper.RegisterEventHandler(registeredEventHandlers, typeof(MusicOnHoldStartEvent), arg => fireEvent(MusicOnHoldStart, arg)); + Helper.RegisterEventHandler(registeredEventHandlers, typeof(MusicOnHoldStopEvent), arg => fireEvent(MusicOnHoldStop, arg)); Helper.RegisterEventHandler(registeredEventHandlers, typeof(ChallengeResponseFailedEvent), arg => fireEvent(ChallengeResponseFailed, arg)); Helper.RegisterEventHandler(registeredEventHandlers, typeof(InvalidAccountIDEvent), arg => fireEvent(InvalidAccountID, arg)); Helper.RegisterEventHandler(registeredEventHandlers, typeof(DeviceStateChangeEvent), arg => fireEvent(DeviceStateChanged, arg)); From 5b2dece94547843338d18544df65847424ab6dfe Mon Sep 17 00:00:00 2001 From: Craig Roberts Date: Thu, 6 Sep 2018 21:59:58 -0400 Subject: [PATCH 6/6] re-add musiconholdevent re-add musiconholdevent add summaries --- .../Manager/Event/MusicOnHoldEvent.cs | 45 +++++++++++++++++ .../Manager/Event/MusicOnHoldStartEvent.cs | 49 +++++++++++++++++- .../Manager/Event/MusicOnHoldStopEvent.cs | 50 ++++++++++++++++++- .../Asterisk.NET/Manager/ManagerConnection.cs | 13 ++++- 4 files changed, 152 insertions(+), 5 deletions(-) create mode 100644 Asterisk.2013/Asterisk.NET/Manager/Event/MusicOnHoldEvent.cs diff --git a/Asterisk.2013/Asterisk.NET/Manager/Event/MusicOnHoldEvent.cs b/Asterisk.2013/Asterisk.NET/Manager/Event/MusicOnHoldEvent.cs new file mode 100644 index 0000000..b460ccf --- /dev/null +++ b/Asterisk.2013/Asterisk.NET/Manager/Event/MusicOnHoldEvent.cs @@ -0,0 +1,45 @@ +namespace AsterNET.Manager.Event +{ + /// + /// A MusicOnHoldEvent is triggered when music on hold starts or stops on a channel.
+ /// It is implemented in res/res_musiconhold.c.
+ /// Available since Asterisk 1.6 + ///
+ public class MusicOnHoldEvent : ManagerEvent + { + /// + /// Creates a new . + /// + /// + public MusicOnHoldEvent(ManagerConnection source) : base(source) + { + } + + /// + /// Gets or sets the state. + /// + public string State { get; set; } + + /// + /// Gets or sets the class.
+ /// The class of music being played on the channel. + ///
+ public string Class { get; set; } + + /// + /// Gets or sets the account code. + /// + public string AccountCode { get; set; } + + /// + /// Gets or sets the language. + /// + public string Language { get; set; } + + /// + /// Gets or sets the Linked Id
+ /// UniqueId of the oldest channel associated with this channel. + ///
+ public string LinkedId { get; set; } + } +} diff --git a/Asterisk.2013/Asterisk.NET/Manager/Event/MusicOnHoldStartEvent.cs b/Asterisk.2013/Asterisk.NET/Manager/Event/MusicOnHoldStartEvent.cs index bfefb31..f54096c 100644 --- a/Asterisk.2013/Asterisk.NET/Manager/Event/MusicOnHoldStartEvent.cs +++ b/Asterisk.2013/Asterisk.NET/Manager/Event/MusicOnHoldStartEvent.cs @@ -15,24 +15,71 @@ } /// - /// Gets or sets the class of music being played on the channel. + /// Gets or sets the class.
+ /// The class of music being played on the channel. ///
public string Class { get; set; } + /// + /// Gets or sets the channel state.
+ /// A numeric code for the channel's current state, related to ChannelStateDesc + ///
public string ChannelState { get; set; } + + /// + /// Gets or sets the channel state description. + /// public string ChannelStateDesc { get; set; } + /// + /// Gets or sets the Caller*ID number. + /// public string CallerIDNum { get; set; } + + /// + /// Gets or sets the Caller*ID name. + /// public string CallerIDName { get; set; } + /// + /// Gets or sets the connected line number. + /// public string ConnectedLineNum { get; set; } + + /// + /// Gets or sets the connected line name. + /// public string ConnectedLineName { get; set; } + /// + /// Gets or sets the language. + /// public string Language { get; set; } + + /// + /// Gets or sets the account code. + /// public string AccountCode { get; set; } + + /// + /// Gets or sets the context. + /// public string Context { get; set; } + + /// + /// Gets or sets the exten. + /// public string Exten { get; set; } + + /// + /// Gets or sets the priority. + /// public string Priority { get; set; } + /// + /// Gets or sets the Linked Id + /// UniqueId of the oldest channel associated with this channel. + /// + public string LinkedId { get; set; } } } diff --git a/Asterisk.2013/Asterisk.NET/Manager/Event/MusicOnHoldStopEvent.cs b/Asterisk.2013/Asterisk.NET/Manager/Event/MusicOnHoldStopEvent.cs index 66598f3..4789628 100644 --- a/Asterisk.2013/Asterisk.NET/Manager/Event/MusicOnHoldStopEvent.cs +++ b/Asterisk.2013/Asterisk.NET/Manager/Event/MusicOnHoldStopEvent.cs @@ -13,21 +13,67 @@ public MusicOnHoldStopEvent(ManagerConnection source) : base(source) { } - + + /// + /// Gets or sets the channel state.
+ /// A numeric code for the channel's current state, related to ChannelStateDesc + ///
public string ChannelState { get; set; } + + /// + /// Gets or sets the channel state description. + /// public string ChannelStateDesc { get; set; } - + + /// + /// Gets or sets the Caller*ID number. + /// public string CallerIDNum { get; set; } + + /// + /// Gets or sets the Caller*ID name. + /// public string CallerIDName { get; set; } + /// + /// Gets or sets the connected line number. + /// public string ConnectedLineNum { get; set; } + + /// + /// Gets or sets the connected line name. + /// public string ConnectedLineName { get; set; } + /// + /// Gets or sets the language. + /// public string Language { get; set; } + + /// + /// Gets or sets the account code. + /// public string AccountCode { get; set; } + + /// + /// Gets or sets the context. + /// public string Context { get; set; } + + /// + /// Gets or sets the exten. + /// public string Exten { get; set; } + + /// + /// Gets or sets the priority. + /// public string Priority { get; set; } + /// + /// Gets or sets the Linked Id + /// UniqueId of the oldest channel associated with this channel. + /// + public string LinkedId { get; set; } } } diff --git a/Asterisk.2013/Asterisk.NET/Manager/ManagerConnection.cs b/Asterisk.2013/Asterisk.NET/Manager/ManagerConnection.cs index d6a34f1..e17075a 100644 --- a/Asterisk.2013/Asterisk.NET/Manager/ManagerConnection.cs +++ b/Asterisk.2013/Asterisk.NET/Manager/ManagerConnection.cs @@ -427,12 +427,20 @@ namespace AsterNET.Manager public event EventHandler QueueMemberPause; /// - /// Raised when music on hold has started on a channel. + /// Raised when music on hold has started/stopped on a channel.
+ /// Available since : Asterisk 1.6. + ///
+ public event EventHandler MusicOnHold; + + /// + /// Raised when music on hold has started on a channel.
+ /// Available since : Asterisk 12. ///
public event EventHandler MusicOnHoldStart; /// - /// Raised when music on hold has stopped on a channel. + /// Raised when music on hold has stopped on a channel.
+ /// Available since : Asterisk 12. ///
public event EventHandler MusicOnHoldStop; @@ -579,6 +587,7 @@ namespace AsterNET.Manager Helper.RegisterEventHandler(registeredEventHandlers, typeof(QueueCallerJoinEvent), arg => fireEvent(QueueCallerJoin, arg)); Helper.RegisterEventHandler(registeredEventHandlers, typeof(QueueCallerLeaveEvent), arg => fireEvent(QueueCallerLeave, arg)); Helper.RegisterEventHandler(registeredEventHandlers, typeof(QueueMemberPauseEvent), arg => fireEvent(QueueMemberPause, arg)); + Helper.RegisterEventHandler(registeredEventHandlers, typeof(MusicOnHoldEvent), arg => fireEvent(MusicOnHold, arg)); Helper.RegisterEventHandler(registeredEventHandlers, typeof(MusicOnHoldStartEvent), arg => fireEvent(MusicOnHoldStart, arg)); Helper.RegisterEventHandler(registeredEventHandlers, typeof(MusicOnHoldStopEvent), arg => fireEvent(MusicOnHoldStop, arg)); Helper.RegisterEventHandler(registeredEventHandlers, typeof(ChallengeResponseFailedEvent), arg => fireEvent(ChallengeResponseFailed, arg));