(Page 1 of 1 in this chapter) Version


Chapter 5

Tone Detection


5.1 Introduction
5.2 Tone Detection Parameters
5.3 Stopping Tone Detection

5.1 Introduction

The tone detector runs a precise tone filter for a single or dual frequency tone. Each instance of the ADI service (i.e., each CTA context) has up to three programmable tone detectors. If the current telephony protocol employs an inband cleardown tone detector, the first tone detector is not available. The tone detectors can generate the following events:

The ADI service provides the following functions to manually start or stop the tone detector:
If you want to...

Then use...

Start a tone detector

adiStartToneDetector

Stop a tone detector

adiStopToneDetector

5.2 Tone Detection Parameters

In addition to the tone detector identifier which specifies a tone ID of 1-3, adiStartToneDetector takes four parameters that describe a single or dual frequency tone:
Parameter

Description

freq1

Frequency 1; the center frequency in Hz of a single tone or the first of two frequencies in a dual tone.

bandw

Bandwidth 1; the bandwidth around Frequency 1 that is considered acceptable.

freq2

Frequency 2; the center frequency in Hz of the second of two frequencies in a dual tone. This value should be set to zero for single frequency tones.

bandw2

Bandwidth 2; the bandwidth around Frequency 2 that is considered acceptable. This value should be set to zero for single frequency tones.


Note that the range of frequencies detected will be the center frequency plus or minus one-half of the bandwidth.
Figure 21 illustrates these parameters.

Figure 21. Tone Detection Frequency Parameters


You can further modify the tone detector's default behavior by specifying the following parameters (that reside in the ADI_TONEDETECT_PARMS structure) when invoking adiStartToneDetector, or by modifying the system defaults:
Parameter

Description

qualampl

Qualification amplitude; the broadband qualification level in dBm required to further qualify any energy as tone.

qualtime

Qualification time; the time in milliseconds in which the tone must be present before reporting ADIEVN_TONE_n_BEGIN. After qualifying at tone, this parameter is used to qualify the absence of the tone to report ADIEVN_TONE_n_END.


Figure 22 illustrates the tone detection qualification parameters.

Figure 22. Tone Detection Qualification Parameters


Do not modify the remaining parameters in the structure (reflevel and reserved). These are parameters to the DSP algorithms and are included in the structure for diagnostic purposes when working with NMS Developer Support.

5.3 Stopping Tone Detection

adiStopToneDetector immediately terminates a tone detector. The ADI service generates an ADIEVN_TONEDETECT_DONE event with the value set to CTA_REASON_STOPPED.

The ADI service may also generate the ADIEVN_DTMFDETECT_DONE event with an error code, ADIERR_xxx or CTAERR_xxx, if the function is started incorrectly.



(Page 1 of 1 in this chapter) Version


tech_support@nmss.com
Copyright © 1999, Natural MicroSystems, Inc. All rights reserved.