(Page 47 of 80 in this chapter)


adiStartDial

Description

Starts the dialing function for the applications not using protocol-independent call control.

Prototype

DWORD adiStartDial( CTAHD ctahd,
char *digitstr,
ADI_DIAL_PARMS *parms )

ctahd Context handle returned by adiOpenPort.

digitstr Pointer to string of digits to be dialed.

parms Pointer to dialing parameters, stored in ADI_DIAL_PARMS structure as follows (NULL designates default values):

typedef struct
{
DWORD size; /* size of this structure */
DWORD method;
/* default dialing method: 0=DTMF, 1=pulse, 2=MF */
DWORD breaktime; /* duration of pulse digit break (ms) */
DWORD maketime; /* duration of pulse digit make (ms) */
DWORD interpulse;
/*interdigit delay between pulsed digits (ms) */
DWORD flashtime; /* duration of the flash-hook (ms) */
DWORD shortpause;
/* duration of the comma in dialing string (ms) */
DWORD longpause;
/* duration of the dot in dialing string (ms) */
INT32 dtmfampl1; /* first dtmf amplitude (dBm) */
INT32 dtmfampl2; /* second dtmf amplitude (dBm) */
DWORD dtmfontime; /* ON duration of DTMFs (ms) */
DWORD dtmfofftime; /* OFF duration of DTMFs (ms) */
DWORD dialtonewait;
/* max time to wait for dialtone (ms) on ';' */
/* precise dialtone parameters: */
DWORD tonefreq1; /* frequency to detect */
DWORD tonebandw1; /* bandwidth */
DWORD tonefreq2; /* 2nd frequency to detect (dualtone) */
DWORD tonebandw2; /* 2nd bandwidth */
INT32 tonequalampl; /* broadband qual level (in dBm) */
DWORD tonequaltime; /* qualification time (in ms) */
DWORD tonereflevel; /* reserved */
DWORD reserved; /* reserved, must be 0 */
} ADI_DIAL_PARMS;

Return Values

Events

DSP File Requirement

This function may require one or more of the following DSP files to be loaded by agmon depending on the digitstr and related parameters:

DSP File

Usage

tones.dsp

Generating DTMF and MF tones

signal.dsp

Generating pulse digits

callp.dsp

Precise dial tone detection

Details

Starts the dialing function. This function should not be confused with the adiPlaceCall function, which should be called when using standard call control. adiStartDial is provided mainly for NOCC users. adiStartDial is similar to adiStartDTMF, but also allows access to pulse-dialing, flashing and precise dial tone detection.

If you need to generate DTMFs while in the conversation state (ADI_CC_STATE_CONNECTED) and using standard call control, use adiStartDTMF.

digitstr may contain the following embedded escape characters which control the dialing sequence, as listed below:

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.

After calling adiStartDial, expect a DONE event. If the function is dialing DTMFs, the outbound voice path must be available (that is, not in use by another function). If the function is pulse dialing, the outbound signaling path must be available.

Note that the digit values are the same as those used by adiPlaceCall, adiStartDTMF, and adiStartDial, when MF digits are being dialed.

Please note the mapping to the U.S. MF names:

Digit

U.S. 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 might consider starting a call progress analysis operation (adiStartCallProgress) after receiving the DONE event.

See Also

adiStopDial, adiStartDTMF, adiPlaceCall, adiStartProtocol, adiStartMFDetector (for MF table)



(Page 47 of 80 in this chapter)


Tech_Support@nmss.com
Copyright © 1996, Natural MicroSystems, Inc. All rights reserved.