using System; namespace AsterNET.FastAGI.Command { /// /// Turns on music on hold on the current channel.
/// Always returns 0. ///
public class SetMusicOnCommand : AGICommand { /// /// Get/Set the music on hold class to play music from. /// /// the music on hold class to play music from or null for the default class. /// the music on hold class to play music from or null for the default class. public string MusicOnHoldClass { get { return musicOnHoldClass; } set { this.musicOnHoldClass = value; } } /// The music on hold class to play music from. private string musicOnHoldClass; /// Creates a new SetMusicOnCommand playing music from the default music on hold class. public SetMusicOnCommand() { this.musicOnHoldClass = null; } /// /// Creates a new SetMusicOnCommand playing music from the default music on hold class. /// /// the music on hold class to play music from. public SetMusicOnCommand(string musicOnHoldClass) { this.musicOnHoldClass = musicOnHoldClass; } public override string BuildCommand() { return "SET MUSIC ON" + (musicOnHoldClass == null?"":" " + EscapeAndQuote(musicOnHoldClass)); } } }