Starts generating a string of DTMFs or MFs.
AG
CG
DWORD adiStartDTMF ( CTAHD ctahd, char *digits, ADI_DTMF_PARMS *parms)
|
Argument |
Description |
|
ctahd |
Context handle returned by ctaCreateContext or ctaAttachContext. |
|
digits |
Pointer to a string of DTMF digits including 0 though 9, A through F, * (asterisk), # (number sign), and , (comma) or . (period) for pauses. All other characters are ignored. |
|
parms |
Pointer to DTMF parameters according to the following structure (NULL value uses the default values): typedef struct In some instances, the dtmfofftime can increase by 20 ms. Refer to ADI_DTMF_PARMS for field descriptions. |
|
Return value |
Description |
|
SUCCESS |
|
|
CTAERR_INVALID_CTAHD |
Context handle is invalid. |
|
CTAERR_OUTPUT_ACTIVE |
Open port failed because the stream and slot are already opened on another port. |
|
CTAERR_SVR_COMM |
Server communication error. |
|
Event |
Description |
|
ADIEVN_TONES_DONE |
Value field can contain CTA_REASON_FINISHED or CTA_REASON_STOPPED. |
The following DSP file must be loaded to the board before running adiStartDTMF:
|
For these boards... |
Load this DSP file... |
|
AG |
tone.m54 |
|
CG |
tone.f54 |
See DSP file summary for DSP file descriptions. Refer to the board-specific installation and developer's manual for a table of MIPS usage for all functions.
Use this function to start generating a sequence of DTMF tones or MF tones. Use adiStopTones to terminate DTMF or MF generation.
Note: While adiStartDTMF is active, the DTMF detector is disabled.
digits can contain the following embedded escape characters that control the dialing sequence:
|
Character |
Description |
|---|---|
|
. |
(period) Insert long pause in dialing. |
|
, |
(comma) Insert short pause in dialing. |
|
T |
Switch to DTMF dialing (default). |
|
M |
Switch to MF dialing. |
To generate MF tones, precede the string with an M.
The following table lists the mapping to the United States MF digits for MF dialing:
|
Digit |
United States MF name |
|---|---|
|
0 to 9 |
Specific digit address |
|
B |
MF ST3P |
|
C |
MF STP |
|
D |
MF KP |
|
E |
MF KP2, MF ST2P |
|
F |
MF ST |