Pause dialplan execution while waiting for a certain length of silence on the channel. When silence is detected, or when the timeout period has expired, dialplan processing will continue.
Click here to expand Table of Contents
detect_silence <silence_thresh> <silence_hits> <timeout> [<file>]
This function is similar to the wait_for_silence function except this does not require noise hits before listening for silence
"Silence" is determined by a combination of the <silence_thresh> value and the <silence_hits> value.
- The silence_thresh value is the silence threshold. The lower the value, the "quieter" the channel must be in order to be considered in a silent state. A larger value allows louder sound received from the endpoint to be treated as silence.
- The silence_hits value represents the number of consecutive frames received with an "energy level" below the silence_thresh value that must be seen before the channel is considered in a silent state. The higher this value, the longer the channel must be in a "silent" state before silence is detected.
- The <timeout_ms> value represents the overall time in milliseconds that the wait_for_silence app will attempt to detect silence before ending the wait and moving on to the next dialplan line.
- <file> is an optional sound file that can be read and analyzed for silence detection.
<action application="detect_silence" data="200 15 5000"/>