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

WaitMusicOnHold() — Waits the specified number of seconds, playing Music on Hold

Synopsis

    WaitMusicOnHold(delay)

Plays hold music for the specified number of seconds. If no hold music is available the delay will still occur, but with no sound.

Returns 0 when done, or -1 on hangup.

    ; allow caller to hear Music on Hold for five minutes
    exten => 123,1,Answer()
    exten => 123,2,WaitMusicOnHold(300)
    exten => 123,3,Hangup()

See Also

SetMusicOnHold(), musiconhold.conf

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