Voice API Programming Guide — June 2005 157
Global Tone Detection and Generation, and Cadenced Tone Generation
13.3 Cadenced Tone Generation
The following topics provide information on enabling and using cadenced tone generation:
Using Cadenced Tone Generation
How To Generate a Custom Cadenced Tone
How To Generate a Non-Cadenced Tone
TN_GENCAD Data Structure - Cadenced Tone Generation
How To Generate a Standard PBX Call Progress Signal
Predefined Set of Standard PBX Call Progress Signals
Important Considerations for Using Predefined Call Progress Signals

13.3.1 Using Cadenced Tone Generation

Cadenced tone generation is an enhancement to global tone generation that enables you to generate
a signal with up to four single or dual tone elements, each with its own on/off duration creating the
signal pattern or cadence.
Cadenced tone generation is accomplished with the dx_playtoneEx() function and the
TN_GENCAD data structure.
You can define your own custom cadenced tone or take advantage of the built-in set of standard
PBX call progress signals.
The functions and data structures associated with cadenced tone generation are described in the
Voice API Library Reference.

13.3.2 How To Generate a Custom Cadenced Tone

A custom cadenced tone is defined by specifying in a TN_GENCAD data structure the repeating
elements of the signal (the cycle) and the number of desired repetitions.
The cycle can consist of up to 4 segments, each with its own tone definition and cadence. A
segment consists of a TN_GEN single or dual tone definition (frequency, amplitude, & duration)
followed by a corresponding off-time (silence duration) that is optional. The dx_bldtngen()
function can be used to set up the TN_GEN components of the TN_GENCAD structure. The tone
duration, or on-time, from TN_GEN (tg_dur) and the offtime from TN_GENCAD are combined to
produce the cadence for the segment. The segments are seamlessly concatenated in ascending order
to generate the signal cycle.
Use the following procedure to generate a custom cadenced tone:
1. Identify the repeating elements of the signal (the cycle).
2. Use a TN_GENCAD structure to define the segments in the cycle:
a. Start with the first tone element in the cycle and identify the single or dual tone
frequencies, amplitudes, and duration (on-time).