Set Music

Since 0.5.0 AGI Commands Found this useful? Upvote it. ×

Enable/Disable Music on hold generator

Last reviewed 2026-04-14

set music boolean class
Description

Enables/Disables the music on hold generator. If class is not specified, then the default music on hold class will be used. This generator will be stopped automatically when playing a file.

Always returns 0.

Arguments
  • boolean required
    • on
    • off
  • class required

User Notes

No notes yet. Be the first to contribute a tip or example.

Contribute a note

Share a tip, gotcha, or practical example. Keep it under 2000 characters. No questions (use the Asterisk community forums for support). Wrap code in backticks.

Moderated before publishing. Email never shown.