Intel 05-1832-002 IP Phone User Manual


 
124 Voice API for Windows Operating Systems Library Reference — November 2003
dx_addtone( ) — add a user-defined tone
dx_addtone( )
add a user-defined tone
!
!!
! Description
The dx_addtone( ) function adds a user-defined tone that was defined by the most recent
dx_blddt( ) (or other global tone detection build-tone) function call, to the specified channel.
Adding a user-defined tone to a channel downloads it to the board and enables detection of tone-on
and tone-off events for that tone by default.
Use dx_distone( ) to disable detection of the tone, without removing the tone from the channel.
Detection can be enabled again using dx_enbtone( ). For example, if you only want to be notified
of tone-on events, you should call dx_distone( ) to disable detection of tone-off events.
For more information on user-defined tones and global tone detection (GTD), see the Voice API
Programming Guide.
Name: int dx_addtone(chdev, digit, digtype)
Inputs: int chdev
valid channel device handle
unsigned char digit
optional digit associated with the bound tone
unsigned char digtype
digit type
Returns: 0 if success
-1 if failure
Includes: srllib.h
dxxxlib.h
Category: Global Tone Detection
Mode: synchronous
Platform: DM3, Springware
Parameter Description
chdev specifies the valid channel device handle obtained when the channel was
opened using dx_open( )
digit specifies an optional digit to associate with the tone. When the tone is
detected, the digit will be placed in the DV_DIGIT digit buffer. These digits
can be retrieved using dx_getdig( ) (they can be used in the same way as
DTMF digits, for example).
If you do not specify a digit, the tone will be indicated by a DE_TONEON
event or DE_TONEOFF event.