(Page 6 of 8 in this chapter)
5.5 Using Tone Detectors
- The tone detector runs a precise tone filter for a single or dual frequency tone. Each AG Access port has up to three programmable tone detectors. If the port is running a protocol employing an inband cleardown tone detector, the first tone detector is not available. The tone detectors can generate the following events:
- ADIEVN_TONE_n_END - where n is the programmable tone ID (1-3)
- You can manually start or stop the tone detector using these functions:
5.5.1 Tone Detection Parameters
- In addition to the tone detector identifier which specifies a tone ID of 1-3, the adiStartToneDetector function takes four parameter arguments that describe a single or dual frequency tone:
- bandw - The bandwidth around Frequency 1 that is considered acceptable.
- freq2 - 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 - 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 16 illustrates these parameters.

Figure 16. 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:
- qualtime - 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.
- For further information about these parameters, see the AG Access Function Reference Manual. Figure 17 illustrates the tone detection qualification parameters:

Figure 17. Tone Detection Qualification Parameters
- The remaining parameters in the structure (reflevel and reserved) should not be modified. These are parameters to the DSP algorithms and are included in the structure for diagnostic purposes when working with NMS Developer Support.
5.5.2 Terminating Tone Detection
- adiStopToneDetector immediately terminates a tone detector. AG Access generates an ADIEVN_TONEDETECT_DONE event with the value set to CTA_REASON_STOPPED.
- AG Access may also generate the ADIEVN_DTMFDETECT_DONE event with an error code, ADIERR_xxx or CTAERR_xxx, if the function is started incorrectly.
(Page 6 of 8 in this chapter)
tech_support@nmss.com
Copyright © 1997, Natural MicroSystems, Inc. All rights
reserved.