Starts DTMF detection.
AG
CG
DWORD adiStartDTMFDetector ( CTAHD ctahd, ADI_DTMFDETECT_PARMS *parms)
|
Argument |
Description |
|
ctahd |
Context handle returned by ctaCreateContext or ctaAttachContext. |
|
parms |
Pointer to DTMF detection parameters according to the following structure (NULL value uses the default values): typedef struct Refer to ADI_DTMFDETECT_PARMS for field descriptions. |
|
Return value |
Description |
|
SUCCESS |
|
|
ADIERR_INVALID_CALL_STATE |
Function not valid in the current call state. |
|
CTAERR_FUNCTION_ACTIVE |
Function already started. |
|
CTAERR_INVALID_CTAHD |
Context handle is invalid. |
|
CTAERR_INVALID_STATE |
Function not valid in the current port state. |
|
CTAERR_SVR_COMM |
Server communication error. |
|
Event |
Description |
|
ADIEVN_DIGIT_BEGIN |
Raw DTMF digit detected on. |
|
ADIEVN_DIGIT_END |
Raw DTMF digit detected off. |
|
ADIEVN_DTMF_DETECT_DONE |
DTMF detector no longer running. The event value field contains one of the following: CTA_REASON_RELEASED Call terminated. CTAERR_xxx or ADIERR_xxx DTMF detector failed. CTA_REASON_STOPPED Function stopped with adiStopDTMFDetector. |
The following DSP file must be loaded to the board before running adiStartDTMFDetector:
|
For these boards... |
Load this DSP file... |
|
AG |
dtmf.m54 or dtmfe.m54 |
|
CG |
dtmf.f54 or dtmfe.f54 |
See DSP file summary for DSP file descriptions. Refer to the board installation and developer's manual for a table of MIPS usage for all functions.
Use this function to enable detection of DTMFs. By default, the DTMF detector is active after the NOCC protocol is started, or when the context enters the call control connected state. Therefore, this function is needed only to restart the DTMF detector if it was stopped using adiStopDTMFDetector or to modify the DTMF detector parameters.
An ADIEVN_DIGIT_BEGIN event and an ADIEVN_DIGIT_END event are generated for every digit detected. Each event contains the ASCII representation (character) of the digit: 0 through 9, A through D, * (asterisk), or # (number sign) in the event value field.
The DTMF detector must be enabled for the digit collection functions (for example, adiCollectDigits or adiGetDigit).