namespace AsterNET.Manager.Event
{
///
/// A QueueMemberAddedEvent is triggered when a queue member is added to a queue.
/// It is implemented in apps/app_queue.c
.
/// Available since Asterisk 1.2
///
public class QueueMemberAddedEvent : AbstractQueueMemberEvent
{
private string memberName;
private string membership;
private int penalty;
private int callsTaken;
private long lastCall;
private int status;
private bool paused;
///
/// Returns the name of the member's interface.
/// E.g. the channel name or agent group.
///
public string MemberName
{
get { return this.memberName; }
set { this.memberName = value; }
}
///
/// 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.
///
public string Membership
{
get { return membership; }
set { this.membership = value; }
}
///
/// Get/Set the penalty for the added member. When calls are distributed
/// members with higher penalties are considered last.
///
public int Penalty
{
get { return penalty; }
set { this.penalty = value; }
}
///
/// Get/Set the number of calls answered by the member.
///
public int CallsTaken
{
get { return callsTaken; }
set { this.callsTaken = value; }
}
///
/// Get/Set the time (in seconds since 01/01/1970) the last successful call answered by the added member was hungup.
///
public long LastCall
{
get { return lastCall; }
set { this.lastCall = value; }
}
///
/// Get/Set the status of this queue member.
/// Valid status codes are:
///
/// - AST_DEVICE_UNKNOWN (0)
/// - Queue member is available
/// - AST_DEVICE_NOT_INUSE (1)
/// - ?
/// - AST_DEVICE_INUSE (2)
/// - ?
/// - AST_DEVICE_BUSY (3)
/// - ?
/// - AST_DEVICE_INVALID (4)
/// - ?
/// - AST_DEVICE_UNAVAILABLE (5)
/// - ?
///
///
public int Status
{
get { return status; }
set { this.status = value; }
}
///
/// Get/Set value if this queue member is paused (not accepting calls).
/// true
if this member has been paused or false
if not.
///
public bool Paused
{
get { return paused; }
set { this.paused = value; }
}
public QueueMemberAddedEvent(ManagerConnection source)
: base(source)
{
}
}
}