namespace AsterNET.Manager.Action { /// /// Redirects a given channel (and an optional additional channel) to a new extension. /// public class RedirectAction : ManagerAction { /// /// Creates a new empty RedirectAction. /// public RedirectAction() { } /// /// Creates a new RedirectAction that redirects the given channel to the given context, extension, priority triple. /// /// the name of the channel to redirect /// the destination context /// the destination extension /// the destination priority public RedirectAction(string channel, string context, string exten, int priority) { this.Channel = channel; this.Context = context; this.Exten = exten; this.Priority = priority; } /// /// Creates a new RedirectAction that redirects the given channels to the given context, extension, priority triple. /// /// the name of the first channel to redirect /// the name of the second channel to redirect /// the destination context /// the destination extension /// the destination priority public RedirectAction(string channel, string extraChannel, string context, string exten, int priority) { this.Channel = channel; this.ExtraChannel = extraChannel; this.Context = context; this.Exten = exten; this.Priority = priority; } /// /// Get the name of this action, i.e. "Redirect". /// public override string Action { get { return "Redirect"; } } /// /// Get/Set name of the channel to redirect. public string Channel { get; set; } /// /// Get/Set the name of the additional channel to redirect. /// public string ExtraChannel { get; set; } /// /// Get/Set the destination context. /// public string Context { get; set; } /// /// Get/Set the destination extension. /// public string Exten { get; set; } /// /// Get/Set the destination priority. /// public int Priority { get; set; } } }