Merge pull request #173 from moldypenguins/AgentRingNoAnswerEvent

Implemented AgentRingNoAnswerEvent
This commit is contained in:
Deantwo 2018-09-22 12:34:01 +02:00 committed by GitHub
commit 449c9faeb4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 91 additions and 0 deletions

View file

@ -0,0 +1,85 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace AsterNET.Manager.Event
{
/// <summary>
/// Raised when a queue member is notified of a caller in the queue and fails to answer.<br/>
/// See <see target="_blank" href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+ManagerEvent_AgentRingNoAnswer">https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+ManagerEvent_AgentRingNoAnswer</see>
/// </summary>
public class AgentRingNoAnswerEvent : AbstractAgentVariables
{
/// <summary>
/// Creates a new <see cref="AgentRingNoAnswerEvent"/> using the given <see cref="ManagerConnection"/>.
/// </summary>
/// <param name="source"></param>
public AgentRingNoAnswerEvent(ManagerConnection source)
: base(source)
{
}
/// <summary>
/// Gets or sets the queue.
/// </summary>
public string Queue { get; set; }
/// <summary>
/// Gets or sets the name of the agent.
/// </summary>
public string AgentName { get; set; }
/// <summary>
/// Gets or sets the agent called.
/// </summary>
public string AgentCalled { get; set; }
/// <summary>
/// Gets or sets the channel calling.
/// </summary>
public string ChannelCalling { get; set; }
/// <summary>
/// Gets or sets the destination channel.
/// </summary>
public string DestinationChannel { get; set; }
/// <summary>
/// Gets or sets the Caller*ID of the calling channel.
/// </summary>
public string CallerId { get; set; }
/// <summary>
/// Get/Set the Caller*ID number of the calling channel.
/// </summary>
public string CallerIdNum { get; set; }
/// <summary>
/// Get/Set the Caller*ID name of the calling channel.
/// </summary>
public string CallerIdName { get; set; }
/// <summary>
/// Gets or sets the context.
/// </summary>
public string Context { get; set; }
/// <summary>
/// Gets or sets the extension.
/// </summary>
public string Extension { get; set; }
/// <summary>
/// Gets or sets the priority.
/// </summary>
public string Priority { get; set; }
/// <summary>
/// Get/Set the amount of time the caller was on ring.
/// </summary>
public long RingTime { get; set; }
}
}

View file

@ -121,6 +121,11 @@ namespace AsterNET.Manager
/// </summary> /// </summary>
public event EventHandler<AgentLogoffEvent> AgentLogoff; public event EventHandler<AgentLogoffEvent> AgentLogoff;
/// <summary> /// <summary>
/// An AgentRingNoAnswer is triggered when an agent was rang and did not answer.<br/>
/// To enable AgentRingNoAnswer you have to set eventwhencalled = yes in queues.conf.
/// </summary>
public event EventHandler<AgentRingNoAnswerEvent> AgentRingNoAnswer;
/// <summary>
/// An AgentsCompleteEvent is triggered after the state of all agents has been reported in response to an AgentsAction. /// An AgentsCompleteEvent is triggered after the state of all agents has been reported in response to an AgentsAction.
/// </summary> /// </summary>
public event EventHandler<AgentsCompleteEvent> AgentsComplete; public event EventHandler<AgentsCompleteEvent> AgentsComplete;
@ -511,6 +516,7 @@ namespace AsterNET.Manager
Helper.RegisterEventHandler(registeredEventHandlers, typeof(AgentDumpEvent), arg => fireEvent(AgentDump, arg)); Helper.RegisterEventHandler(registeredEventHandlers, typeof(AgentDumpEvent), arg => fireEvent(AgentDump, arg));
Helper.RegisterEventHandler(registeredEventHandlers, typeof(AgentLoginEvent), arg => fireEvent(AgentLogin, arg)); Helper.RegisterEventHandler(registeredEventHandlers, typeof(AgentLoginEvent), arg => fireEvent(AgentLogin, arg));
Helper.RegisterEventHandler(registeredEventHandlers, typeof(AgentLogoffEvent), arg => fireEvent(AgentLogoff, 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(AgentsCompleteEvent), arg => fireEvent(AgentsComplete, arg));
Helper.RegisterEventHandler(registeredEventHandlers, typeof(AgentsEvent), arg => fireEvent(Agents, arg)); Helper.RegisterEventHandler(registeredEventHandlers, typeof(AgentsEvent), arg => fireEvent(Agents, arg));
Helper.RegisterEventHandler(registeredEventHandlers, typeof(AlarmClearEvent), arg => fireEvent(AlarmClear, arg)); Helper.RegisterEventHandler(registeredEventHandlers, typeof(AlarmClearEvent), arg => fireEvent(AlarmClear, arg));