B.71. MusicOnHold()

Plays music indefinitely.
MusicOnHold(class)
Plays music belonging to the specified class, as configured in musiconhold.conf. If class is not specified, the default class for the channel is used. To set the default class for the channel, use the function MUSICCLASS().
Returns only -1 when the channel is hung up.
; send telemarketers to this extension and hope they are very patient:
exten => 123,1,Answer()
exten => 123,2,Playback(tt-allbusy)
exten => 123,3,MusicOnHold(default)
exten => 123,4,Goto(2)

Note

Internal help for this application in Asterisk 1.4:
  -= Info about application 'MusicOnHold' =- 

[Synopsis]
Play Music On Hold indefinitely

[Description]
MusicOnHold(class): Plays hold music specified by class.  If omitted, the default
music source for the channel will be used. Set the default 
class with the SetMusicOnHold() application.
Returns -1 on hangup.
Never returns otherwise.
diff output to internal help in Asterisk 1.2:
- none -