spandsp 0.0.6

Modem connect tone detection

# What does it do?

Some telephony terminal equipment, such as modems, require a channel which is as clear as possible. They use their own echo cancellation. If the network is also performing echo cancellation the two cancellors can end up squabbling about the nature of the channel, with bad results. A special tone is defined which should cause the network to disable any echo cancellation processes. This is the echo canceller disable tone.

The tone detector's design assumes the channel is free of any DC component.

# How does it work?

A sharp notch filter is implemented as a single bi-quad section. The presence of the 2100Hz disable tone is detected by comparing the notched filtered energy with the unfiltered energy. If the notch filtered energy is much lower than the unfiltered energy, then a large proportion of the energy must be at the notch frequency. This type of detector may seem less intuitive than using a narrow bandpass filter to isolate the energy at the notch freqency. However, a sharp bandpass implemented as an IIR filter rings badly. The reciprocal notch filter is very well behaved for our purpose.