O'Reilly logo

Asterisk: The Future of Telephony by Leif Madsen, Jared Smith, Jim Van Meggelen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

MusicOnHold() — Plays Music on Hold indefinitely

Synopsis

    MusicOnHold(class)

Plays hold music specified by class, as configured in musiconhold.conf. If omitted, the default music class for the channel will be used. You can use the SetMusicOnHold() application to set the default music class for the channel.

Returns -1 on hangup; otherwise, does not return.

    ; transfer telemarketers to this extension to keep them busy
    exten => 123,1,Answer()
    exten => 123,2,Playback(tt-allbusy)
    exten => 123,3,MusicOnHold(default)

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required