Intel 05-1832-002 IP Phone User Manual


 
226 Voice API for Windows Operating Systems Library Reference — November 2003
dx_getdig( ) — collect digits from a channel digit buffer
dx_getdig( )
collect digits from a channel digit buffer
!
!!
! Description
The dx_getdig( ) function initiates the collection of digits from an open channel’s digit buffer.
Upon termination of the function, the collected digits are written in ASCIIZ format into the local
buffer, which is arranged as a DV_DIGIT structure.
The type of digits collected depends on the digit detection mode set by the dx_setdigtyp( )
function (for standard voice board digits) or by the dx_addtone( ) function (for user-defined
digits).
Note: The channel must be idle, or the function will return an EDX_BUSY error.
Name: int dx_getdig(chdev, tptp, digitp, mode)
Inputs: int chdev
valid channel device handle
DV_TPT *tptp
pointer to Termination Parameter Table structure
DV_DIGIT *digitp
pointer to User Digit Buffer structure
unsigned short mode
asynchronous/synchronous setting
Returns: 0 to indicate successful initiation (asynchronous)
number of digits (+1 for NULL) if successful (synchronous)
-1 if failure
Includes: srllib.h
dxxxlib.h
Category: I/O
Mode: asynchronous or synchronous
Platform: DM3, Springware
Parameter Description
chdev specifies the valid channel device handle obtained when the channel was
opened using dx_open( )
tptp points to the Termination Parameter Table structure, DV_TPT, which specifies
termination conditions for this function. For a list of possible termination
conditions, see DV_TPT, on page 485.
digitp points to the User Digit Buffer structure, DV_DIGIT, where collected digits
and their types are stored in arrays. For a list of digit types, see DV_DIGIT, on
page 483.
For more information about creating user-defined digits, see dx_addtone( ).
mode specifies whether to run dx_getdig( ) asynchronously or synchronously.
Specify one of the following:
EV_ASYNC – run asynchronously
EV_SYNC – run synchronously (default)