Previous PageTable Of ContentsHomeIndexNext Page


4.4. Global DPD Application Programming Interface

Global Dial Pulse Detection uses the same Application Programming Interface (API) model as the standard DPD interface.

The Global DPD feature must be implemented on a call-by-call basis. Global DPD must be enabled for each call by calling dx_setdigtyp( ) for the Global DPD feature to work correctly.

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.

As shown in the following table, two defines are provided for identifying the Dial Pulse Detection digit type, depending upon how the digit type is retrieved.

#define

Digit Type

DG_DPD

Dial Pulse Detection digit from the DX_EBLK event queue data (cst_data) through a DE_DIGITS Call Status Transition event

DG_DPD_ASCII

Dial Pulse Detection digit from the DV_DIGIT dg_type digit buffer using dx_getdig( )

Obtaining the digit type for DPD digits is valid only in the case when the voice and DPD capabilities are both present on the same board. In the case where a voice board does not support DPD, you cannot detect DPD digits or obtain the DPD digit type even though you can enable DPD and digit type reporting without an error.

Several can be used to obtain the DV_DIGIT dg_type (digit type) from the digit buffer. These defines contain "_ASCII" extensions as shown in the following table. If you get the digit from the DV_DIGIT dg_type digit buffer using dx_getdig( ), you should use the digit type define that has the "_ASCII" suffix. Otherwise, if you get the digit from the DX_EBLK event queue data (cst_data) through a DE_DIGITS Call Status Transition event, you should use the digit type define without the "_ASCII" suffix

     

    Defines for dg_type from

    Digit Type

    Digit Buffer

    Event Queue

    DTMF

    DG_DTMF_ASCII

    DG_DTMF

    DPD

    DG_DPD_ASCII

    DG_DPD

    MF

    DG_MF_ASCII

    DG_MF

    GTD
    (user defined)

    DG_USER1_ASCII
    DG_USER2_ASCII
    DG_USER3_ASCII
    DG_USER4_ASCII
    DG_USER5_ASCII

    DG_USER1
    DG_USER2
    DG_USER3
    DG_USER4
    DG_USER5

NOTE:
Use the defines as shown above to determine the digit type from the value returned in the dg_type digit type field. If you get the digit from the digit buffer by using dx_getdig( ), you should use the digit type define that has the "_ASCII" extension. Otherwise, if you get the digit from the event queue through a DE_DIGITS Call Status Transition event, you should use the digit type define without the "_ASCII" extension.

  1. Define a data structure of type DV_DIGIT (the DV_DIGIT structure is specified in the DXDIGIT.H file).
  2. Enable DPD on the desired channels using the dx_setdigtyp( ) function. For new calls you must use the D_DPDZ mask that initializes the DPD detector for new calls.
  3. Execute the dx_getdig( ) function to collect and transfer the digits to the user's digit buffer. The digits are stored in the dg_value field of the DV_DIGIT structure with the corresponding digit types stored in the dg_type field of the DV_DIGIT structure.

Previous PageTable Of ContentsTop Of PageIndexNext Page

Click here to contact Dialogic Customer Engineering

Copyright 2001, Dialogic Corporation
All rights reserved
This page generated January, 2001