namespace AsterNET.Manager.Action
{
///
/// The QueueAddAction adds a new member to a queue.
/// It is implemented in apps/app_queue.c
///
public class QueueAddAction : ManagerAction
{
///
/// Creates a new empty QueueAddAction.
///
public QueueAddAction()
{
}
///
/// Creates a new QueueAddAction that adds a new member on the given interface to the given queue.
///
/// the name of the queue the new member will be added to
/// Sets the interface to add. To add a specific channel just use the channel name, e.g. "SIP/1234".
public QueueAddAction(string queue, string iface)
{
this.Queue = queue;
this.Interface = iface;
}
///
/// Creates a new QueueAddAction that adds a new member on the given interface to the given queue.
///
/// the name of the queue the new member will be added to
/// Sets the interface to add. To add a specific channel just use the channel name, e.g. "SIP/1234".
/// the name of the the new member will be added to
public QueueAddAction(string queue, string iface, string memberName)
{
this.Queue = queue;
this.Interface = iface;
this.MemberName = memberName;
}
///
/// Creates a new QueueAddAction that adds a new member on the given
/// interface to the given queue with the given penalty.
///
/// the name of the queue the new member will be added to
/// Sets the interface to add. To add a specific channel just use the channel name, e.g. "SIP/1234".
/// the name of the the new member will be added to
///
/// the penalty for this member.
/// The penalty must be a positive integer or 0 for no penalty. When calls are
/// distributed members with higher penalties are considered last.
///
public QueueAddAction(string queue, string iface, string memberName, int penalty)
{
this.Queue = queue;
this.Interface = iface;
this.MemberName = memberName;
this.Penalty = penalty;
}
///
/// Get the name of this action, i.e. "QueueAdd".
///
public override string Action
{
get { return "QueueAdd"; }
}
///
/// Get/Set the name of the queue the new member will be added to.
/// This property is mandatory.
///
public string Queue { get; set; }
///
/// Get/Set the interface to add. To add a specific channel just use the channel name, e.g. "SIP/1234".
/// This property is mandatory.
///
public string Interface { get; set; }
///
/// Get/Set the member to add.
///
public string MemberName { get; set; }
///
/// Get/Set the penalty for this member.
/// The penalty must be a positive integer or 0 for no penalty. If it is not set 0 is assumed.
/// When calls are distributed members with higher penalties are considered last.
///
public int Penalty { get; set; }
///
/// Get/Set if the queue member should be paused when added.
/// true if the queue member should be paused when added.
///
public bool Paused { get; set; }
///
/// Get/Set an alternate interface to be used to determine the state of the member.
/// Available since Asterisk 12.
///
public string StateInterface { get; set; }
}
}