Previous PageTable Of Contents../index.htmlIndexNext Page

dx_setdigtyp( )

Description | Example | Cautions | Example | Errors | See Also

Name:

int dx_setdigtyp(chdev,dmask)

Inputs:

int chdev

  valid Dialogic channel device handle

 

unsigned short dmask

  type of digit the channel will detect

Returns:

0 if successful

 

-1 if failure

Includes:

srllib.h

 

dxxxlib.h

Category:

Configuration

Top Of PageDescription

The dx_setdigtyp( ) function controls the types of digits the Voice channel detects.

NOTE:
This function only applies to the standard Voice board digits (i.e., DTMF, MF, DPD). To set user-defined digits, use the dx_addtone( ) function.

dx_setdigtyp( ) does not clear the previously detected digits in the digit buffer.

The function parameters are defined as follows:

Parameter

Description

chdev

specifies the valid channel device handle obtained when the channel was opened using dx_open( ).

dmask

sets the type of digits the channel will detect. More than one type of digit detection can be enabled in a single function call, as shown in the function example. dmask can have one, or a combination of several, of the following values:

 

DM_DTMF

enable DTMF digits; detection (default setting)

 

DM_APD

enable audio pulse digits detection

 

DM_MF

enable MF digit detection

 

DM_DPD

enable dial pulse digit (DPD) detection

 

DM_DPDZ

enable zero train DPD detection

 

To disable digit detection, set dmask to NULL.

NOTES:
1. MF detection can only be enabled on systems with MF capability, such as D/4xD boards with MF support.
2. Global DPD can only be enabled on systems with this capability.
3. 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( ).
4. The digit detection type specified in dmask will remain valid after the channel has been closed and reopened.
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.

Top Of PageExample

Top Of PageCautions

    1. Some MF digits use approximately the same frequencies as DTMF digits (see Appendix C). 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, DTMF and MF detection should not be enabled at the same time.

Top Of PageExample

Top Of PageErrors

If this function returns -1 to indicate failure, use ATDV_LASTERR( ) and ATDV_ERRMSGP( ) to retrieve one of the following error reasons:

EDX_BADPARM

  • Invalid Parameter

EDX_SYSTEM

Top Of PageSee Also

Specifying user-defined digits:


Previous PageTable Of ContentsTop Of PageIndexNext Page

Click here to contact Dialogic Customer Engineering

Copyright 2002, Dialogic Corporation
All rights reserved
This page generated February, 2002