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