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 MonitorAction starts monitoring (recording) a channel.<br />
|
|
|
|
/// It is implemented in <code>res/res_monitor.c</code>
|
|
|
|
/// </summary>
|
|
|
|
public class MonitorAction : ManagerAction
|
|
|
|
{
|
|
|
|
#region Action
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Get the name of this action, i.e. "Monitor".
|
|
|
|
/// </summary>
|
|
|
|
public override string Action
|
|
|
|
{
|
|
|
|
get { return "Monitor"; }
|
|
|
|
}
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region Channel
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Get/Set the name of the channel to monitor.<br />
|
|
|
|
/// This property is mandatory.
|
|
|
|
/// </summary>
|
|
|
|
public string Channel { get; set; }
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region File
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Get/Set the name of the file to which the voice data is written.<br />
|
|
|
|
/// If this property is not set it defaults to to the channel name as per CLI with the '/' replaced by '-'.
|
|
|
|
/// </summary>
|
|
|
|
public string File { get; set; }
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region Format
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Get/Set the format to use for encoding the voice files.<br />
|
|
|
|
/// If this property is not set it defaults to "wav".
|
|
|
|
/// </summary>
|
|
|
|
public string Format { get; set; }
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region Mix
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Returns true if the two voice files should be joined at the end of the call.
|
|
|
|
/// </summary>
|
|
|
|
public bool Mix { get; set; }
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region MonitorAction()
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Creates a new empty MonitorAction.
|
|
|
|
/// </summary>
|
|
|
|
public MonitorAction()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region MonitorAction(string channel, string file)
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Creates a new MonitorAction that starts monitoring the given channel and
|
|
|
|
/// writes voice data to the given file(s).
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="channel">the name of the channel to monitor</param>
|
|
|
|
/// <param name="file">the (base) name of the file(s) to which the voice data is written</param>
|
|
|
|
public MonitorAction(string channel, string file)
|
|
|
|
{
|
|
|
|
Channel = channel;
|
|
|
|
File = file;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region MonitorAction(string channel, string file)
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Creates a new MonitorAction that starts monitoring the given channel and
|
|
|
|
/// writes voice data to the given file(s).
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="channel">the name of the channel to monitor</param>
|
|
|
|
/// <param name="file">the (base) name of the file(s) to which the voice data is written</param>
|
|
|
|
/// <param name="format">the format to use for encoding the voice files</param>
|
|
|
|
public MonitorAction(string channel, string file, string format)
|
|
|
|
{
|
|
|
|
Channel = channel;
|
|
|
|
File = file;
|
|
|
|
Format = format;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region MonitorAction(string channel, string file, string format, int mix)
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Creates a new MonitorAction that starts monitoring the given channel and
|
|
|
|
/// writes voice data to the given file(s).
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="channel">the name of the channel to monitor</param>
|
|
|
|
/// <param name="file">the (base) name of the file(s) to which the voice data is written</param>
|
|
|
|
/// <param name="format">the format to use for encoding the voice files</param>
|
|
|
|
/// <param name="mix">true if the two voice files should be joined at the end of the call</param>
|
|
|
|
public MonitorAction(string channel, string file, string format, bool mix)
|
|
|
|
{
|
|
|
|
Channel = channel;
|
|
|
|
File = file;
|
|
|
|
Format = format;
|
|
|
|
Mix = mix;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
}
|
2013-01-18 15:55:50 +00:00
|
|
|
}
|