160 Voice API Programming Guide — June 2005
Global Tone Detection and Generation, and Cadenced Tone Generation
13.3.3 How To Generate a Non-Cadenced Tone
Both dx_playtoneEx( ) and dx_playtone( ) can generate a non-cadenced tone.
Non-cadenced call progress signals can be generated by the dx_playtone() function if you define
them in a TN_GEN: Dial Tone, Executive Override Tone, and Busy Verification Tone Part A.
The dx_playtoneEx( ) function can also generate a non-cadenced tone by using a TN_GENCAD
data structure that defines a single segment.
If you want to generate a continuous, non-cadenced signal, use a single segment and zero off-time,
and specify 1) an infinite number of cycles, 2) an infinite on-time, or 3) both. (You must also
specify the appropriate termination conditions in a DV_TPT structure or else the tone will never
end). For example:
cycles = 255;
numsegs = 1;
offtime[0] = 0;
tone[0].tg_dur = -1
13.3.4 TN_GENCAD Data Structure - Cadenced Tone Generation
TN_GENCAD is a voice library data structure (dxxxlib.h) that defines a cadenced tone that can be
generated by using the dx_playtoneEx() function.
The TN_GENCAD data structure contains a tone array with four elements that are TN_GEN data
structures (Tone Generation Templates). For details on TN_GEN and TN_GENCAD, see the Voice
API Library Reference.
For examples of TN_GENCAD, see the definitions of standard call progress signals in Table20,
“TN_GENCAD Definitions for Standard PBX Call Progress Signals”, on page 165.
13.3.5 How To Generate a Standard PBX Call Progress Signal
Use the following procedure to generate a standard PBX call progress signal from the predefined
set of standard PBX call progress signals:
1. Select a call progress signal from Table1 9, “Standard PBX Call Progress Signals”, on
page 162 and note the signal ID (see also Figure 20, “Standard PBX Call Progress Signals
(Part 1)”, on page163).
2. Set the termination conditions in a DV_TPT structure.
3. Call the dx_playtoneEx( ) function and specify the signal ID for the tngencadp parameter.
For example:
dx_playtoneEx(dxxxdev, CP_BUSY, tpt, EV_SYNC)