Name

StartMusicOnHold() — Starts music on hold

Synopsis

StartMusicOnHold([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 CHANNEL(musicclass) function to set the default music class for the channel.

Returns immediately.

; transfer telemarketers to this extension to keep them busy
exten => 123,1,Answer()
exten => 123,2,Playback(tt-allbusy)
exten => 123,3,StartMusicOnHold(default)
exten => 123,4,Wait(600)
exten => 123,5,StopMusicOnHold()

Get Asterisk: The Future of Telephony, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.