Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated to GIT-18-ea94103

...

Code Block
titleExample: intercept2600
linenumberstrue

same => n,Set(TONE_DETECT(2600,1000,g(got-2600,s,1))=) ; detect 2600 Hz
same => n,Wait(15)
same => n,NoOp(${TONE_DETECT(rx)})

Code Block
titleExample: dropondialtone
linenumberstrue


same => n,Set(TONE_DETECT(0,,bg(my-hangup,s,1))=) ; disconnect a call if we hear a busy signal
same => n,Goto(somewhere-else)
same => n(myhangup),Hangup()

Code Block
titleExample: removedetector
linenumberstrue


same => n,Set(TONE_DETECT(0,,x)=) ; remove the detector from the channel

Syntax

No Format
TONE_DETECT(freq[,duration_ms,options])

...

  • freq - Frequency of the tone to detect. To disable frequency detection completely (e.g. for signal detection only), specify 0 for the frequency.
  • duration_ms - Minimum duration of tone, in ms. Default is 500ms. Using a minimum duration under 50ms is unlikely to produce accurate results.
  • options
    • a - Match immediately on Special Information Tones, instead of or in addition to a particular frequency.
    • b - Match immediately on a busy signal, instead of or in addition to a particular frequency.
    • c - Match immediately on a dial tone, instead of or in addition to a particular frequency.
    • d - Custom decibel threshold to use. Default is 16.
    • g - Go to the specified context,exten,priority if tone is received on this channel. Detection will not end automatically.
    • h - Go to the specified context,exten,priority if tone is transmitted on this channel. Detection will not end automatically.
    • n - Number of times the tone should be detected (subject to the provided timeout) before going to the destination provided in the g or h option. Default is 1.
    • r - Apply to received frames only. Default is both directions.
    • s - Squelch tone.
    • t - Apply to transmitted frames only. Default is both directions.
    • x - Destroy the detector (stop detection).

...

This documentation was imported from Asterisk Version GIT-18-d974710ea94103