Merge pull request #127 from Deantwo/Asterisk13-Queues

Fixed Queue Events
This commit is contained in:
Ben Merrills 2018-02-02 09:31:11 +00:00 committed by GitHub
commit 9d75563b96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 97 additions and 228 deletions

View file

@ -3,9 +3,17 @@ namespace AsterNET.Manager.Event
/// <summary>
/// A QueueCallerJoinEvent is triggered when a channel joins a queue.<br/>
/// </summary>
public class QueueCallerJoinEvent : QueueEvent
public class QueueCallerJoinEvent : JoinEvent
{
public string Position { get; set; }
// "Channel" in ManagerEvent.cs
// "Queue" in QueueEvent.cs
// "CallerId" in JoinEvent.cs
// "CallerIdName" in JoinEvent.cs
// "Position" in JoinEvent.cs
public QueueCallerJoinEvent(ManagerConnection source)
: base(source)

View file

@ -3,9 +3,13 @@ namespace AsterNET.Manager.Event
/// <summary>
/// A QueueCallerLeaveEvent is triggered when a channel leaves a queue.<br/>
/// </summary>
public class QueueCallerLeaveEvent : QueueEvent
public class QueueCallerLeaveEvent : LeaveEvent
{
public string Position { get; set; }
// "Channel" in ManagerEvent.cs
// "Queue" in QueueEvent.cs
// "Count" in QueueEvent.cs
public QueueCallerLeaveEvent(ManagerConnection source)
: base(source)

View file

@ -9,58 +9,6 @@ namespace AsterNET.Manager.Event
/// </summary>
public class QueueMemberAddedEvent : AbstractQueueMemberEvent
{
/// <summary>
/// Returns the name of the member's interface.<br/>
/// E.g. the channel name or agent group.
/// </summary>
public new string MemberName { get; set; }
/// <summary>
/// Get/Set if the added member is a dynamic or static queue member.
/// "dynamic" if the added member is a dynamic queue member,
/// "static" if the added member is a static queue member.
/// </summary>
public new string Membership { get; set; }
/// <summary>
/// Get/Set the penalty for the added member. When calls are distributed
/// members with higher penalties are considered last.
/// </summary>
public new int Penalty { get; set; }
/// <summary>
/// Get/Set the number of calls answered by the member.
/// </summary>
public new int CallsTaken { get; set; }
/// <summary>
/// Get/Set the time (in seconds since 01/01/1970) the last successful call answered by the added member was hungup.
/// </summary>
public new long LastCall { get; set; }
/// <summary>
/// Get/Set the status of this queue member.<br/>
/// Valid status codes are:<br/>
/// <list type="number" start="0">
/// <item>AST_DEVICE_UNKNOWN</item>
/// <item>AST_DEVICE_NOT_INUSE</item>
/// <item>AST_DEVICE_INUSE</item>
/// <item>AST_DEVICE_BUSY</item>
/// <item>AST_DEVICE_INVALID</item>
/// <item>AST_DEVICE_UNAVAILABLE</item>
/// <item>AST_DEVICE_RINGING</item>
/// <item>AST_DEVICE_RINGINUSE</item>
/// <item>AST_DEVICE_ONHOLD</item>
/// </list>
/// </summary>
public new int Status { get; set; }
/// <summary>
/// Get/Set value if this queue member is paused (not accepting calls).<br/>
/// true if this member has been paused or false if not.
/// </summary>
public new bool Paused { get; set; }
/// <summary>
/// Creates a new QueueMemberAddedEvent
/// </summary>

View file

@ -18,16 +18,6 @@ namespace AsterNET.Manager.Event
/// </summary>
public string Reason { get; set; }
/// <summary>
/// <b>Not Available</b>, use <see cref="QueueMemberPauseEvent"/> instead.
/// </summary>
public new string PausedReason { get; set; }
/// <summary>
/// <b>Not Available</b>, use <see cref="QueueMemberPauseEvent"/> instead.
/// </summary>
public new bool InCall { get; set; }
/// <summary>
/// Creates a new QueueMemberPausedEvent
/// </summary>

View file

@ -5,11 +5,6 @@ namespace AsterNET.Manager.Event
/// </summary>
public class QueueMemberPenaltyEvent : AbstractQueueMemberEvent
{
/// <summary>
/// Get/Set the penalty for the queue location.
/// </summary>
public new int Penalty { get; set; }
/// <summary>
/// Creates a new QueueMemberPenaltyEvent
/// </summary>

View file

@ -9,12 +9,6 @@ namespace AsterNET.Manager.Event
/// </summary>
public class QueueMemberRemovedEvent : AbstractQueueMemberEvent
{
/// <summary>
/// Returns the name of the member's interface.<br/>
/// E.g. the channel name or agent group.
/// </summary>
public new string MemberName { get; set; }
/// <summary>
/// Creates a new QueueMemberRemovedEvent
/// </summary>

View file

@ -5,13 +5,6 @@ namespace AsterNET.Manager.Event
/// </summary>
public class QueueMemberRinginuseEvent : AbstractQueueMemberEvent
{
/// <summary>
/// Evaluates <see langword="true"/> if Ringinuse,
/// <see langword="false"/> if not.<br />
/// </summary>
public new bool Ringinuse { get; set; }
/// <summary>
/// Creates a new QueueMemberRinginuseEvent
/// </summary>

View file

@ -5,69 +5,6 @@ namespace AsterNET.Manager.Event
/// </summary>
public class QueueMemberStatusEvent : AbstractQueueMemberEvent
{
/// <summary>
/// Returns the name of the member's interface.<br/>
/// E.g. the channel name or agent group.
/// </summary>
public new string MemberName { get; set; }
/// <summary>
/// Channel technology or location from which to read device state changes.<br />
/// </summary>
public new string StateInterface { get; set; }
/// <summary>
/// Get/Set if the added member is a dynamic or static queue member.
/// "dynamic" if the added member is a dynamic queue member,
/// "static" if the added member is a static queue member.
/// </summary>
public new string Membership { get; set; }
/// <summary>
/// Get/Set the penalty for the added member. When calls are distributed
/// members with higher penalties are considered last.
/// </summary>
public new int Penalty { get; set; }
/// <summary>
/// Get/Set the number of calls answered by the member.
/// </summary>
public new int CallsTaken { get; set; }
/// <summary>
/// Get/Set the time (in seconds since 01/01/1970) the last successful call answered by the added member was hungup.
/// </summary>
public new long LastCall { get; set; }
/// <summary>
/// Evaluates <see langword="true"/> if member is in call,
/// <see langword="false"/> after LastCall time is updated.<br />
/// </summary>
public new bool InCall { get; set; }
/// <summary>
/// Get/Set the status of this queue member.<br/>
/// Valid status codes are:<br/>
/// <list type="number" start="0">
/// <item>AST_DEVICE_UNKNOWN</item>
/// <item>AST_DEVICE_NOT_INUSE</item>
/// <item>AST_DEVICE_INUSE</item>
/// <item>AST_DEVICE_BUSY</item>
/// <item>AST_DEVICE_INVALID</item>
/// <item>AST_DEVICE_UNAVAILABLE</item>
/// <item>AST_DEVICE_RINGING</item>
/// <item>AST_DEVICE_RINGINUSE</item>
/// <item>AST_DEVICE_ONHOLD</item>
/// </list>
/// </summary>
public new int Status { get; set; }
/// <summary>
/// Get/Set value if this queue member is paused (not accepting calls).<br/>
/// true if this member has been paused or false if not.
/// </summary>
public new bool Paused { get; set; }
/// <summary>
/// Creates a new QueueMemberStatusEvent
/// </summary>