Intel 05-1832-002 IP Phone User Manual


 
Voice API for Windows Operating Systems Library Reference — November 2003 375
control the types of digits detected by the voice channel — dx_setdigtyp( )
Notes: 1. MF detection can only be enabled on systems with MF capability.
2. The digit detection type specified in dmask will remain valid after the channel has been closed
and reopened.
3. Global DPD can only be enabled on systems with this capability.
4. The Global DPD feature must be implemented on a call-by-call basis to work correctly. Global
DPD must be enabled for each call by calling dx_setdigtyp( ).
5. dx_setdigtyp( ) overrides digit detection enabled in any previous use of dx_setdigtyp( ).
For any digit detected, you can determine the digit type, DTMF, MF, GTD (user-defined) or DPD,
by using the DV_DIGIT data structure in the application. When a dx_getdig( ) call is performed,
the digits are collected and transferred to the user’s digit buffer. The digits are stored as an array
inside the DV_DIGIT structure. This method allows you to determine very quickly whether a pulse
or DTMF telephone is being used. For more information on this structure, see DV_DIGIT, on
page 483.
!
!!
! Cautions
Some MF digits use approximately the same frequencies as DTMF digits (see Chapter 6,
“Supplementary Reference Information”). 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, do NOT enable DTMF and MF detection at the same
time.
!
!!
! 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_BADPARM
Invalid parameter
EDX_SYSTEM
Error from operating system; use dx_fileerrno( ) to obtain error value
!
!!
! Example
/*$ dx_setdigtyp( )and dx_getdig( ) example for Global Dial Pulse Detection $*/
#include <stdio.h>
#include <srllib.h>
#include <dxxxlib.h>
void main(int argc, char **argv)
{
int dev; /* device handle */
DV_DIGIT dig;
DV_TPT tpt;
/*
* Open device, make or accept call
*/