[asterisk-dev] Tone Detection

izo marcin.izo at gmail.com
Fri Mar 3 20:34:19 MST 2006


Try to modify newly released by Roger Schreiter App Mwanalyze

<quote>

It performs a Fourier analysis for a fixed frequency and tells the amplitude.

The frequency is not limited to 1000 Hz, but can be passed as
argument. The periode duration must be a mulitple of 0.5 ms, thus the
valid frequences are: 2000 Hz, 1000 Hz, 666.666666667 Hz, 500 Hz, ...

Furthermore the application computes the ripple on that tone. In order
to detect audiogaps and short noise on the line, one can define a
treshold and a timeslice duration (typically 1s to 0.1s), and the
application will compute the ripple for each timeslice and count the
timeslices with a ripple greater than the given treshold.

Thus the application is a tool to verify the line quality, e.g. for
least-cost-but-not-too-bad-line routings.

For conveniance Mwanalyze also generates a tone of the frequency it
analyzes. Thus a bidirectional operation, and test for frequencies
other than Milliwatt's 1000 Hz are possible. Anyway Milliwatt is much
much more economic to CPU and RAM!

http://planinternet.net/download/voip/asterisk/app_mwanalyze.c

</quote>
On 3/3/06, David  wrote:
> I need to listen for single/mono tones of different frequencies. For
> example, a 900Hz tone. I have been looking hard for examples of how to do
> this but have came up short.
>
> I really want an application like "WaitForSilence", except
> "WaitForTone(hz/length, timeout).



More information about the asterisk-dev mailing list