Voice API Programming Guide — June 2005 149
Global Tone Detection and Generation, and Cadenced Tone Generation
cadence components
Adding a tone template to a channel enables detection of a tone on that channel. Although only one
tone template can be created at a time, multiple tone templates can be added to a channel. Each
channel can have a different set of tone templates. Once created, tone templates can be selectively
enabled or disabled.
API Library Functions
The following functions are used to build and define tone templates:
dx_bldst( )
Defines a single frequency tone. Subsequent calls to dx_addtone( ) will use this tone until
another tone is defined.
dx_blddt( )
Defines a simple dual frequency tone. Subsequent calls to dx_addtone( ) will use this tone
until another tone is defined.
Note that the boards cannot detect dual tones with frequency components closer than
approximately 63 Hz. Use a single tone description to detect dual tones that are closer together
than the ranges specified above.
dx_bldstcad( )
Defines a simple single frequency cadence tone. Subsequent calls to dx_addtone() will use
this tone until another tone is defined. A single frequency cadence tone has single frequency
signals with specific on/off characteristics.
dx_blddtcad( )
Defines a simple dual frequency cadence tone. Subsequent calls to dx_addtone() will use this
tone until another tone is defined. A dual frequency cadence tone has dual frequency signals
with specific on/off characteristics. The minimum on- and off-time for cadence detection is 40
msec on and 40 msec off.
dx_setgtdamp( )
Sets the amplitudes used by GTD. The amplitudes set using dx_setgtdamp( ) are the default
amplitudes that apply to all tones built using the build-tone functions. The amplitudes remain
valid for all tones built until dx_setgtdamp( ) is called again and amplitudes are changed.
Instructions for Building Tone Templates
Follow these steps to build a tone template for global tone detection:
1. Determine the characteristics of the tone you wish to detect: single frequency or dual
frequency tone, frequency range, cadence components, and so on.
2. Use the appropriate build-tone function, such as dx_bldst( ), dx_blddt( ) and so on, to build
and define the tone template. The functions require that you specify a unique tone ID for each
tone template.
3. Use the dx_addtone( ) function to add the tone template to a channel. Subsequent calls to
dx_addtone() will add this tone template until another tone is defined. Adding a tone
template to a channel enables detection of a tone on that channel.
4. Repeat steps 1 - 3 as needed.