180 Voice API for Windows Operating Systems Library Reference — November 2003
dx_createtone( ) — create a new tone definition for a specific call progress tone
When running asynchronously, the function returns 0 to indicate that it initiated successfully and
generates the TDX_CREATETONE event to indicate completion or the
TDX_CREATETONE_FAIL event to indicate failure.
By default, this function runs synchronously and returns 0 to indicate completion.
!
!!
! Cautions
• Only the default call progress tones as listed in the toneid parameter description are supported
for this function.
• If you call dx_createtone( ) prior to calling dx_deletetone( ), then dx_createtone( ) will fail
with an error EDX_TNQUERYDELETE.
• To modify a default tone definition, use the three functions dx_querytone( ),
dx_deletetone( ), and dx_createtone( ) in this order, for one tone at a time.
• When dx_createtone( ) is issued on a physical board device in asynchronous mode, and the
function is immediately followed by another similar call prior to completion of the previous
call on the same device, the subsequent call will fail with device busy.
Parameter Description
brdhdl specifies a valid physical board device handle (of the format brdBn)
obtained by a call to dx_open( )
toneid specifies the tone ID of the call progress tone whose definition needs to be
created. Valid values are:
• TID_DIAL_LCL
• TID_DIAL_INTL
• TID_BUSY1
• TID_RNGBK1
• TID_BUSY2
• TID_RNGBK2
• TID_DISCONNECT
• TID_FAX1
• TID_FAX2
• TID_SIT_NC (no circuit found)
• TID_SIT_IC (operator intercept)
• TID_SIT_VC (vacant circuit)
• TID_SIT_RO (reorder)
tonedata specifies a pointer to the TONE_DATA data structure which contains the
tone information to be created for the call progress tone identified by
toneid
mode specifies how the function should be executed, either EV_ASYNC
(asynchronous) or EV_SYNC (synchronous)