2014-01-08 14:16:39 +00:00
|
|
|
namespace AsterNET.Manager.Action
|
2013-01-18 15:55:50 +00:00
|
|
|
{
|
2015-01-03 15:37:29 +00:00
|
|
|
/// <summary>
|
|
|
|
/// The CommandAction sends a command line interface (CLI) command to the asterisk server.<br />
|
2015-01-04 14:26:32 +00:00
|
|
|
/// For a list of supported commands type help on asterisk's command line.
|
2015-01-03 15:37:29 +00:00
|
|
|
/// </summary>
|
|
|
|
public class CommandAction : ManagerAction
|
|
|
|
{
|
|
|
|
protected internal string command;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Creates a new CommandAction.
|
|
|
|
/// </summary>
|
|
|
|
public CommandAction()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Creates a new CommandAction with the given command.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="command">the CLI command to execute.</param>
|
|
|
|
public CommandAction(string command)
|
|
|
|
{
|
|
|
|
this.command = command;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Get the name of this action, i.e. "Command".
|
|
|
|
/// </summary>
|
|
|
|
public override string Action
|
|
|
|
{
|
|
|
|
get { return "Command"; }
|
|
|
|
}
|
2013-01-18 15:55:50 +00:00
|
|
|
|
2015-01-03 15:37:29 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Get/Set the CLI command to send to the asterisk server.
|
|
|
|
/// </summary>
|
|
|
|
public string Command
|
|
|
|
{
|
|
|
|
get { return command; }
|
|
|
|
set { command = value; }
|
|
|
|
}
|
|
|
|
}
|
2013-01-18 15:55:50 +00:00
|
|
|
}
|