From 803576272115ce3d309100ce21c65182f660ce8f Mon Sep 17 00:00:00 2001 From: Craig Roberts Date: Wed, 29 Aug 2018 19:11:43 -0400 Subject: [PATCH 1/3] Add AgentRingNoAnswerEvent --- .../Manager/Event/AgentRingNoAnswerEvent.cs | 86 +++++++++++++++++++ .../Asterisk.NET/Manager/ManagerConnection.cs | 6 ++ 2 files changed, 92 insertions(+) create mode 100644 Asterisk.2013/Asterisk.NET/Manager/Event/AgentRingNoAnswerEvent.cs diff --git a/Asterisk.2013/Asterisk.NET/Manager/Event/AgentRingNoAnswerEvent.cs b/Asterisk.2013/Asterisk.NET/Manager/Event/AgentRingNoAnswerEvent.cs new file mode 100644 index 0000000..efe0b64 --- /dev/null +++ b/Asterisk.2013/Asterisk.NET/Manager/Event/AgentRingNoAnswerEvent.cs @@ -0,0 +1,86 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace AsterNET.Manager.Event +{ + /// + /// Raised when a queue member is notified of a caller in the queue and fails to answer. + /// + /// See https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+ManagerEvent_AgentRingNoAnswer + /// + public class AgentRingNoAnswerEvent : AbstractAgentVariables + { + /// + /// Creates a new using the given . + /// + /// + public AgentRingNoAnswerEvent(ManagerConnection source) + : base(source) + { + } + + + /// + /// Gets or sets the queue. + /// + public string Queue { get; set; } + + /// + /// Gets or sets the name of the agent. + /// + public string AgentName { get; set; } + + /// + /// Gets or sets the agent called. + /// + public string AgentCalled { get; set; } + + /// + /// Gets or sets the channel calling. + /// + public string ChannelCalling { get; set; } + + /// + /// Gets or sets the destination channel. + /// + public string DestinationChannel { get; set; } + + /// + /// Gets or sets the Caller*ID of the calling channel. + /// + public string CallerId { get; set; } + + /// + /// Get/Set the Caller*ID number of the calling channel. + /// + public string CallerIdNum { get; set; } + + /// + /// Get/Set the Caller*ID name of the calling channel. + /// + public string CallerIdName { get; set; } + + /// + /// Gets or sets the context. + /// + public string Context { get; set; } + + /// + /// Gets or sets the extension. + /// + public string Extension { get; set; } + + /// + /// Gets or sets the priority. + /// + public string Priority { get; set; } + + /// + /// Get/Set the amount of time the caller was on ring. + /// + public long RingTime { get; set; } + + } +} diff --git a/Asterisk.2013/Asterisk.NET/Manager/ManagerConnection.cs b/Asterisk.2013/Asterisk.NET/Manager/ManagerConnection.cs index d1fe667..e450fa2 100644 --- a/Asterisk.2013/Asterisk.NET/Manager/ManagerConnection.cs +++ b/Asterisk.2013/Asterisk.NET/Manager/ManagerConnection.cs @@ -120,6 +120,11 @@ namespace AsterNET.Manager /// public event EventHandler AgentLogoff; /// + /// An AgentRingNoAnswer is triggered when an agent was rang and did not answer.
+ /// To enable AgentRingNoAnswer you have to set eventwhencalled = yes in queues.conf.
+ ///
+ public event EventHandler AgentRingNoAnswer; + /// /// An AgentsCompleteEvent is triggered after the state of all agents has been reported in response to an AgentsAction. /// public event EventHandler AgentsComplete; @@ -484,6 +489,7 @@ namespace AsterNET.Manager Helper.RegisterEventHandler(registeredEventHandlers, typeof(AgentDumpEvent), arg => fireEvent(AgentDump, arg)); Helper.RegisterEventHandler(registeredEventHandlers, typeof(AgentLoginEvent), arg => fireEvent(AgentLogin, arg)); Helper.RegisterEventHandler(registeredEventHandlers, typeof(AgentLogoffEvent), arg => fireEvent(AgentLogoff, arg)); + Helper.RegisterEventHandler(registeredEventHandlers, typeof(AgentRingNoAnswerEvent), arg => fireEvent(AgentRingNoAnswer, arg)); Helper.RegisterEventHandler(registeredEventHandlers, typeof(AgentsCompleteEvent), arg => fireEvent(AgentsComplete, arg)); Helper.RegisterEventHandler(registeredEventHandlers, typeof(AgentsEvent), arg => fireEvent(Agents, arg)); Helper.RegisterEventHandler(registeredEventHandlers, typeof(AlarmClearEvent), arg => fireEvent(AlarmClear, arg)); From 1a8c4cd329eeaee8606306f135c81fc5e6653253 Mon Sep 17 00:00:00 2001 From: Craig Roberts Date: Thu, 30 Aug 2018 15:16:46 -0400 Subject: [PATCH 2/3] update comments --- .../Manager/Event/AgentRingNoAnswerEvent.cs | 21 +++++++++---------- .../Asterisk.NET/Manager/ManagerConnection.cs | 4 ++-- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/Asterisk.2013/Asterisk.NET/Manager/Event/AgentRingNoAnswerEvent.cs b/Asterisk.2013/Asterisk.NET/Manager/Event/AgentRingNoAnswerEvent.cs index efe0b64..9b0b2d9 100644 --- a/Asterisk.2013/Asterisk.NET/Manager/Event/AgentRingNoAnswerEvent.cs +++ b/Asterisk.2013/Asterisk.NET/Manager/Event/AgentRingNoAnswerEvent.cs @@ -6,8 +6,7 @@ using System.Text; namespace AsterNET.Manager.Event { /// - /// Raised when a queue member is notified of a caller in the queue and fails to answer. - /// + /// Raised when a queue member is notified of a caller in the queue and fails to answer.
/// See https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+ManagerEvent_AgentRingNoAnswer ///
public class AgentRingNoAnswerEvent : AbstractAgentVariables @@ -23,32 +22,32 @@ namespace AsterNET.Manager.Event /// - /// Gets or sets the queue. + /// Gets or sets the queue. /// public string Queue { get; set; } /// - /// Gets or sets the name of the agent. + /// Gets or sets the name of the agent. /// public string AgentName { get; set; } /// - /// Gets or sets the agent called. + /// Gets or sets the agent called. /// public string AgentCalled { get; set; } /// - /// Gets or sets the channel calling. + /// Gets or sets the channel calling. /// public string ChannelCalling { get; set; } /// - /// Gets or sets the destination channel. + /// Gets or sets the destination channel. /// public string DestinationChannel { get; set; } /// - /// Gets or sets the Caller*ID of the calling channel. + /// Gets or sets the Caller*ID of the calling channel. /// public string CallerId { get; set; } @@ -63,17 +62,17 @@ namespace AsterNET.Manager.Event public string CallerIdName { get; set; } /// - /// Gets or sets the context. + /// Gets or sets the context. /// public string Context { get; set; } /// - /// Gets or sets the extension. + /// Gets or sets the extension. /// public string Extension { get; set; } /// - /// Gets or sets the priority. + /// Gets or sets the priority. /// public string Priority { get; set; } diff --git a/Asterisk.2013/Asterisk.NET/Manager/ManagerConnection.cs b/Asterisk.2013/Asterisk.NET/Manager/ManagerConnection.cs index e450fa2..f56b77e 100644 --- a/Asterisk.2013/Asterisk.NET/Manager/ManagerConnection.cs +++ b/Asterisk.2013/Asterisk.NET/Manager/ManagerConnection.cs @@ -120,8 +120,8 @@ namespace AsterNET.Manager /// public event EventHandler AgentLogoff; /// - /// An AgentRingNoAnswer is triggered when an agent was rang and did not answer.
- /// To enable AgentRingNoAnswer you have to set eventwhencalled = yes in queues.conf.
+ /// An AgentRingNoAnswer is triggered when an agent was rang and did not answer. + /// To enable AgentRingNoAnswer you have to set eventwhencalled = yes in queues.conf. ///
public event EventHandler AgentRingNoAnswer; /// From d4dd90b65b5b05ea54613691c3f3945b80c725f6 Mon Sep 17 00:00:00 2001 From: Craig Roberts Date: Thu, 30 Aug 2018 15:27:52 -0400 Subject: [PATCH 3/3] update comment add line break --- Asterisk.2013/Asterisk.NET/Manager/ManagerConnection.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Asterisk.2013/Asterisk.NET/Manager/ManagerConnection.cs b/Asterisk.2013/Asterisk.NET/Manager/ManagerConnection.cs index f56b77e..1bb228a 100644 --- a/Asterisk.2013/Asterisk.NET/Manager/ManagerConnection.cs +++ b/Asterisk.2013/Asterisk.NET/Manager/ManagerConnection.cs @@ -120,7 +120,7 @@ namespace AsterNET.Manager /// public event EventHandler AgentLogoff; /// - /// An AgentRingNoAnswer is triggered when an agent was rang and did not answer. + /// An AgentRingNoAnswer is triggered when an agent was rang and did not answer.
/// To enable AgentRingNoAnswer you have to set eventwhencalled = yes in queues.conf. ///
public event EventHandler AgentRingNoAnswer;