Starts the dialing function for applications that are not using protocol-independent call control.
AG
CG
DWORD adiStartDial ( CTAHD ctahd, char *digitstr, ADI_DIAL_PARMS *parms)
Argument |
Description |
ctahd |
Context handle returned by ctaCreateContext or ctaAttachContext. |
digitstr |
Pointer to string of digits to be dialed (ADI_MAX_DIGITS). |
parms |
Pointer to dialing parameters, stored in ADI_DIAL_PARMS structure as follows (NULL designates default values): typedef struct In some instances, the dtmfofftime can increase by 20 ms. Refer to ADI_DIAL_PARMS for field descriptions. |
Return value |
Description |
SUCCESS |
|
CTAERR_BAD_ARGUMENT |
digitstr is NULL. |
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_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_DIAL_DONE |
The reason in the value field can contain either an error or one of the following: CTA_REASON_FINISHED CTA_REASON_RELEASED CTA_REASON_STOPPED |
For AG boards and CG boards, adiStartDial requires one or more of the following DSP files to be loaded, depending on the digitstr and related parameters:
CG boards |
AG boards |
Use |
---|---|---|
tone.f54 |
tone.m54 |
Generating DTMF and MF tones. |
None |
signal.m54 (AG 2000, AG 2000C, and AG 2000-BRI only) |
Generating pulse digits. |
ptf.f54 |
ptf.m54 |
Precise dial tone detection. |
Use this function to start dialing for NOCC users. adiStartDial is similar to adiStartDTMF, but also allows access to pulse-dialing, flashing, and precise dial tone detection.
Note: The DTMF detector is disabled while adiStartDial is active.
digitstr can contain the following embedded escape characters that control the dialing sequence:
Character |
Description |
---|---|
; |
(semicolon) Wait for precise dial tone. |
. |
(period) Insert long pause in dialing. |
, |
(comma) Insert short pause in dialing. |
! |
Flash hook. |
P |
Switch to pulse dialing. |
T |
Switch to DTMF dialing. |
M |
Switch to MF dialing. |
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 |
NOCC users can start a call progress analysis operation (adiStartCallProgress) after receiving the DONE event.
After calling adiStartDial, expect a DONE event. If the function is dialing DTMFs, the outbound voice path must be available (not in use by another function). If the function is pulse dialing, the outbound signaling path must be available.