Intel 05-1832-002 User Manual

Page of 564
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 
 structure. 
The type of digits collected depends on the digit detection mode set by th
 
function (for standard voice board digits) or by th
 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 
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 
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 
For more information about creating user-defined digits, see 
.
mode 
specifies whether to run dx_getdig( ) asynchronously or synchronously. 
Specify one of the following:
EV_ASYNC – run asynchronously
EV_SYNC – run synchronously (default)