namespace AsterNET.Manager.Action
{
///
/// The SetCDRUserFieldAction causes the user field of the call detail record for the given channel to be changed.
///
/// Depending on the value of the append property the value is appended or overwritten.
/// The SetCDRUserFieldAction is implemented in apps/app_setcdruserfield.c
///
public class SetCDRUserFieldAction : ManagerAction
{
///
/// Creates a new empty SetCDRUserFieldAction.
///
public SetCDRUserFieldAction()
{
}
///
/// Creates a new SetCDRUserFieldAction that sets the user field of the call detail record for the given channel to the
/// given value.
///
/// the name of the channel
/// the new value of the userfield
public SetCDRUserFieldAction(string channel, string userField)
{
this.Channel = channel;
this.UserField = userField;
}
///
/// Creates a new SetCDRUserFieldAction that sets the user field of the call detail record for the given channel to the
/// given value.
///
/// the name of the channel
/// the new value of the userfield
/// true to append the value to the cdr user field or false to overwrite
public SetCDRUserFieldAction(string channel, string userField, bool append)
{
this.Channel = channel;
this.UserField = userField;
this.Append = append;
}
///
/// Get the name of the action, i.e. "SetCDRUserField".
///
public override string Action
{
get { return "SetCDRUserField"; }
}
///
/// Get/Set the name of the channel to set the cdr user field on.
/// This property is mandatory.
///
public string Channel { get; set; }
///
/// Get/Set the value of the cdr user field to set or append.
/// This property is mandatory.
///
public string UserField { get; set; }
///
/// Get/Set if the value of the cdr user field is appended or overwritten.
/// true
to append the value to the cdr user field or false
to overwrite.
///
public bool Append { get; set; }
}
}