Voice API Programming Guide — June 2005 151
Global Tone Detection and Generation, and Cadenced Tone Generation
dx_deltones( )
Removes all tone templates previously added to a channel with dx_addtone(). If no tone
templates were previously enabled for this channel, the function has no effect.
dx_deltones( ) does not affect tones defined by build-tone template functions and tone
templates not yet defined. If you have added tones for call progress analysis, these tones are
also deleted.
dx_distone( )
Disables detection of a user-defined tone on a channel as well as the DE_TONEON and/or
DE_TONEOFF events for that tone. Detection capability for user-defined tones is enabled on a
channel by default when dx_addtone( ) is called.
dx_enbtone( )
Enables detection of a user-defined tone that was previously disabled by dx_distone(). Also
enables detection of DE_TONEON and/or DE_TONEOFF events for that tone. Detection
capability for user-defined tones is enabled on a channel by default when dx_addtone() is
called.
13.1.6 Retrieving Tone EventsTone-on events (DE_TONEON) and tone-off events (DE_TONEOFF) are call status transition
(CST) events. Retrieval of these events is handled differently for asynchronous and synchronous
applications. Table15 outlines the different processes for retrieving tone events.
You can optionally specify an associated ASCII digit (and digit type) with the tone template. In this
case, the tone template is treated like DTMF tones. When the digit is detected, it is placed in the
digit buffer and can be used for termination. When an associated ASCII digit is specified, tone
events will not be generated for that tone.
Note: Cadence tone on events are reported differently on DM3 boards versus Springware boards. On
DM3 boards, if a cadence tone occurs continuously, a DE_TONEON event is reported for each
on/off cycle. On Springware boards, a DE_TONEON event is reported for the first on/off cycle
only. On both types of boards, a DE_TONEOFF event is reported when the tone is no longer
present.
Table15. Asynchronous/Synchronous Tone Event Handling
Synchronous Asynchronous
Call dx_addtone() or dx_enbtone( ) to
enable tone-on/off detection.
Call dx_addtone() or dx_enbtone( ) to
enable tone-on/off detection.
Call dx_getevt() to wait for CST event(s).
Events are returned in the DX_EBLK data
structure.
Use Standard Runtime Library (SRL) to
asynchronously wait for TDX_CST event(s).
N/A Use sr_getevtdatap() to retr ieve DX_CST
data structure.
Note: These procedures are the same as the retrieval of any other CST event, except that
dx_addtone() or dx_enb tone( ) are used to enable event detection instead of
dx_setevtmsk().