Page 474 - Asterisk™: The Future of Telephony
P. 474
See Also
WaitForSilence()
WaitForSilence() Waits for a specified amount of silence
WaitForSilence(silencerequired[,repeat[,timeout]])
Waits for repeat instances of silencerequired milliseconds of silence. If repeat is omit-
ted, the application waits for a single instance of silencerequired milliseconds of
silence.
If the timeout option is specified, this application will return to the next priority in the
dialplan after the specified number of seconds, even if silence has not been detected.
Please use the timeout with caution, as it may defeat the purpose of this
application, which is to wait indefinitely until silence is detected on the
line. You may want to set the timeout to a high value only to avoid an
infinite loop in cases where silence is never detected.
This applications sets a channel variable named WAITSTATUS to either SILENCE or TIMEOUT.
; wait for three instances of 300 ms of silence
exten => 123,WaitForSilence(300,3)
See Also
WaitForRing()
WaitMusicOnHold() Waits the specified number of seconds, playing music on hold
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
While() Starts a while loop
While(expr)
446 | Appendix B: Application Reference