Intel 05-1832-002 IP Phone User Manual


 
Voice API for Windows Operating Systems Library Reference — November 2003 227
collect digits from a channel digit buffer — dx_getdig( )
!
!!
! Asynchronous Operation
To run this function asynchronously, set the mode parameter to EV_ASYNC. In asynchronous
mode, this function returns 0 to indicate success, and generates a TDX_GETDIG termination event
to indicate completion. Use the Standard Runtime Library (SRL) Event Management functions to
handle the termination event. For more information, see the Standard Runtime Library API Library
Reference.
When operating asynchronously, ensure that the digit buffer stays in scope for the duration of the
function.
After dx_getdig( ) terminates, use the ATDX_TER MMSK( ) function to determine the reason for
termination.
!
!!
! Synchronous Operation
By default, this function runs synchronously. Termination of synchronous digit collection is
indicated by a return value greater than 0 that represents the number of digits received (+1 for
NULL). Use ATDX_TERMMSK( ) to determine the reason for termination.
The channel’s digit buffer contains up to 31 digits, collected on a First-In First-Out (FIFO) basis.
Since the digits remain in the channel’s digit buffer until they are overwritten or cleared using
dx_clrdigbuf( ), the digits in the channel’s buffer may have been received prior to this function
call. The DG_MAXDIGS define in dxxxlib.h specifies the maximum number of digits (that is, 31)
that can be returned by a single call to dx_getdig( ).
Note: By default, after the thirty-first digit, all subsequent digits will be discarded. You can use the
dx_setdigbuf( ) function with the mode parameter set to DX_DIGCYCLIC, which will cause all
incoming digits to overwrite the oldest digit in the buffer.
If the function is operating synchronously and there are no digits in the buffer, the return value from
this function will be 1, which indicates the NULL terminator.
!
!!
! Cautions
On DM3 boards, Global DPD is not supported (DG_DPD_ASCII is not available).
Some MF digits use approximately the same frequencies as DTMF digits (see Section 6.1,
“DTMF and MF Tone Specifications”, on page 539). Because there is a frequency overlap, if
you have the incorrect kind of detection enabled, MF digits may be mistaken for DTMF digits,
and vice versa. To ensure that digits are correctly detected, only one kind of detection should
be enabled at any time. To set MF digit detection, use the dx_setdigtyp( ) function.
A digit that is set to adjust play speed or play volume (using dx_setsvcond( )) will not be
passed to dx_getdig( ), and will not be used as a terminating condition. If a digit is defined
both to adjust play and to terminate play, then the play adjustment will take priority.
The dx_getdig( ) does not support terminating on a user-defined tone (GTD). Specifying
DX_TONE in the DV_TPT tp_termno field has no effect on dx_getdig( ) termination and will
be ignored.
In a TDM bus configuration, when a caller on one voice board is routed in a conversation on an
analog line with a caller on another voice board (analog inbound/outbound configuration) and
either caller sends a DTMF digit, both voice channels will detect the DTMF digit if the