Enables the DTMF detector.
DWORD cdiStartDTMFDetector ( CTAHD ctahd, CDI_DTMFDETECTOR_PARMS *parms)
|
Argument |
Description |
|
ctahd |
Context handle. |
|
parms |
Pointer to a structure containing DTMF detection parameters. Specify NULL to use the default values. typedef struct Refer to CDI_DTMFDETECTOR_PARMS for field descriptions. |
|
Return value |
Description |
|
SUCCESS |
|
|
CTAERR_BAD_ARGUMENT |
Argument is not in the valid range. |
|
CTAERR_BOARD_ERROR |
Board is overheating, and has reached the protection stage. At this stage, the board does not accept or place calls on any ports. Refer to Monitoring board temperature for details. |
|
CTAERR_INVALID_STATE |
Port must be off-hook to invoke this function. |
|
CTAERR_FUNCTION_ACTIVE |
Function has already been invoked, and the DTMF detector is active. |
|
CTAERR_INVALID_CTAHD |
Handle is invalid. |
|
CTAERR_OUT_OF_RESOURCES |
DSP does not have enough MIPS to satisfy the request. Retry later. |
|
Event |
Description |
|
CDIEVN_DTMF_STARTED |
DTMF tone is detected. The event value field contains the ASCII representation of the key. The DTMF_mode parameter in CDI_DTMFDETECTOR_PARMS determines when this event is reported. |
|
CDIEVN_DTMF_ENDED |
DTMF tone currently detected just ended. |
When a station is off-hook, the DSP can detect DTMF tones and return their values to the application. To start DTMF detection, invoke cdiStartDTMFDetector. In the invocation, pass a pointer to the CDI_DTMFDETECTOR_PARMS structure.
If the board is running in enhanced mode, the DSP automatically stops DTMF detection for a station when the station is placed on-hook (CDIEVN_ON_HOOK is returned). Otherwise, invoke cdiStopDTMFDetector to stop DTMF detection.
Refer to Detecting DTMF tones for more information.