Intel 05-1832-002 IP Phone User Manual


 
Voice API for Windows Operating Systems Library Reference — November 2003 125
add a user-defined tone — dx_addtone( )
!
!!
! Cautions
Ensure that dx_blddt( ) (or another appropriate “build tone” function) has been called to
define a tone prior to adding it to the channel using dx_addtone( ), otherwise an error will
occur.
Do not use dx_addtone( ) to change a tone that has previously been added.
There are limitations to the number of tones or tone templates that can be added to a channel,
depending on the type of board and other factors. See the global tone detection topic in the
Voice API Programming Guide for details.
When using this function in a multi-threaded application, use critical sections or a semaphore
around the function call to ensure a thread-safe application. Failure to do so will result in “Bad
Tone Template ID” errors.
!
!!
! Errors
If the function returns -1, use the Standard Runtime Library (SRL) Standard Attribute function
ATDV_LASTERR( ) to obtain the error code or use ATDV_ERRMSGP( ) to obtain a descriptive
error message. One of the following error codes may be returned:
EDX_ASCII
Invalid ASCII value in tone template description
EDX_BADPARM
Invalid parameter
EDX_BADPROD
Function not supported on this board
EDX_CADENCE
Invalid cadence component value
EDX_DIGTYPE
Invalid dg_type value in tone template description
digtype specifies the type of digit the channel will detect
On DM3 boards, the valid value is:
DG_USER1
On Springware boards, valid values are:
DG_USER1
DG_USER2
DG_USER3
DG_USER4
DG_USER5
Up to twenty digits can be associated with each of these digit types.
Note: These types can be specified in addition to the digit types already
defined for the voice library (DTMF, MF) which are specified using
dx_setdigtyp( ).
Parameter Description