Skip to end of metadata
Go to start of metadata

TONE_DETECT()

Synopsis

Asynchronously detects a tone

Description

The TONE_DETECT function detects a single-frequency tone and keeps track of how many times the tone has been detected.

When reading this function (instead of writing), supply tx to get the number of times a tone has been detected in the TX direction and rx to get the number of times a tone has been detected in the RX direction.

Example: intercept2600
Example: dropondialtone
Example: removedetector

Syntax

TONE_DETECT(freq[,duration_ms,options])
Arguments
  • 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.
    • p - Match immediately on audible ringback tone, instead of or in addition to a particular frequency.
    • 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).

See Also

Import Version

This documentation was imported from Asterisk Version GIT-20-5c114dc

  • No labels