using System; namespace Asterisk.NET.Manager.Action { /// /// The AgentCallbackLoginAction sets an agent as logged in with callback.
/// You can pass an extentsion (and optionally a context) to specify the /// destination of the callback.
/// In contrast to the AgentCallbackLogin application that you can use within /// Asterisk's dialplan, you don't need to know the agent's password when logging /// in an agent.
/// Available since Asterisk 1.2 ///
public class AgentCallbackLoginAction : ManagerAction { private string agent; private string exten; private string context; private bool ackCall; private long wrapupTime; /// /// Get the name of this action, i.e. "AgentCallbackLogin". /// override public string Action { get { return "AgentCallbackLogin"; } } /// /// Get/Set the name of the agent to log in, for example "1002".
/// This is property is mandatory. ///
public string Agent { get { return this.agent; } set { this.agent = value; } } /// /// Get/Set the extension to use for callback.
/// This is property is mandatory. ///
public string Exten { get { return this.exten; } set { this.exten = value; } } /// /// Get/Set the context of the extension to use for callback. /// public string Context { get { return this.context; } set { this.context = value; } } /// /// Get/Set if an acknowledgement is needed when agent is called back.
/// true if acknowledgement by '#' is required when agent is called back, false otherwise. /// This property is optional, it allows you to override the defaults defined in Asterisk's configuration. ///
public bool AckCall { get { return this.ackCall; } set { this.ackCall = value; } } /// /// Returns the minimum amount of time (in milliseconds) after disconnecting before the caller can receive a new call.
/// This property is optional, it allows you to override the defaults defined in Asterisk's configuration. ///
public long WrapupTime { get { return this.wrapupTime; } set { this.wrapupTime = value; } } /// /// Creates a new empty AgentCallbackLoginAction. /// public AgentCallbackLoginAction() { } /// /// Creates a new AgentCallbackLoginAction, that logs in the given agent at /// the given callback extension. /// /// the name of the agent to log in /// the extension that is called to connect a queue member with this agent public AgentCallbackLoginAction(string agent, string exten) { this.agent = agent; this.exten = exten; } /// /// Creates a new AgentCallbackLoginAction, that logs in the given agent at /// the given callback extension in the given context. /// /// the name of the agent to log in /// the extension that is called to connect a queue member with this agent /// the context of the extension to use for callback public AgentCallbackLoginAction(string agent, string exten, string context) : this(agent, exten) { this.context = context; } } }