Previous PageTable Of Contents../index.htmlIndexNext Page

dx_dial( )

Description | Cautions | Example 1: | Example 2: | Example 3: | Example 4: | Errors | See Also

Name:

int dx_dial(chdev,dialstrp,capp,mode)

Inputs:

int chdev

  valid Dialogic channel device handle

 

char *dialstrp

  pointer to the ASCIIZ dial string

 

DX_CAP *capp

  pointer to Call Analysis Parameter Structure

 

unsigned short mode

  asynchronous/synchronous setting and Call Analysis flag

Returns:

0 to indicate successful initiation (Asynchronous)

 

>=0 to indicate Call Analysis result if successful (Synchronous)

 

-1 if failure

Includes:

srllib.h
dxxxlib.h

Category:

I/O

Mode:

synchronous/asynchronous

Top Of PageDescription

The dx_dial( ) function dials an ASCIIZ string on an open, idle channel and optionally enables Call Analysis to provide information about the call. If the channel is onhook, the dialing will take place without Call Analysis. The dx_dial( ) function doesn't affect the hook state.

The function parameters are defined as follows:

Parameter

Description

chdev

specifies the valid channel device handle obtained when the channel was opened using dx_open( ).

dialstrp

points to the ASCII dial string. dialstrp must contain a null-terminated string of ASCII characters. Valid dialing and control characters are described in Table 7. Valid Dial String Characters.

capp

points to the Call Analysis Parameter Structure, DX_CAP.

 

To use the default Call Analysis parameters, specify NULL in capp and DX_CALLP in mode .

 

The D/40 board does not have the Call Analysis feature. When using dx_dial( ), do not pass capp to D/40 channels; pass a NULL pointer and do not set mode to DX_CALLP.

mode

specifies whether an ASCIIZ string should be dialed with or without Call Analysis enabled, and whether the function should run asynchronously or synchronously. mode is a bit mask that can be set to a combination of the following values:

 

DX_CALLP

  Enable Call Analysis. Note: If the channel is onhook, the dialing will take place without Call Analysis.

 

EV_ASYNC

  Run dx_dial( ) asynchronously.

 

EV_SYNC

  Run dx_dial( ) synchronously. (default)

 

To run dx_dial( ) without Call Analysis, specify only EV_ASYNC or EV_SYNC. Note that a dx_dial( ) without Call Analysis cannot be terminated using dx_stopch( ), unlike most I/O functions.


Table 7. Valid Dial String Characters

   

Valid in Dial Mode

Characters

Description

DTMF

MF

Pulse

On Keypad

       

0 1 2 3 4 5 6 7 8 9

digits

Yes

Yes

Yes

*

asterisk or star

Yes

Yes (KP)

 

#

pound, hash, number, or octothorpe

Yes

Yes (ST)

 

Not on Keypad

       

a

 

Yes

Yes (ST1)

 

b

 

Yes

Yes (ST2)

 

c

 

Yes

Yes (ST3)

 

d

 

Yes

   

Special Control

       

,

pause (comma)

Yes

Yes

 

&

flash (ampersand)

Yes

Yes

 

T

Dial Mode: Tone (DTMF) (default)

Yes

Yes

Yes

P

Dial Mode: Pulse

Yes

Yes

Yes

M

Dial Mode: MF

Yes

Yes

Yes

L

Call Analysis: local dial tone

Yes

Yes

Yes

I

Call Analysis: international dial tone

Yes

Yes

Yes

X

Call Analysis: special dial tone

Yes

Yes

Yes

NOTES:
1. Dial string characters are case sensitive.
2. The default dialing mode is "T" (DTMF tone dialing).
3. Dialogic Scbus and CT Bus boards do not support pulse digit dialing using dx_dial( ).
4. The L, I, and X control characters function only when dialing with PerfectCall Call Progress Analysis.
5. MF dialing is only available on systems with MF capability.
6. The pause character "," and the flash character "&" are not available in MF dialing mode. To send these characters with a string of MF digits, switch to DTMF or pulse mode before sending "," or "&", and then switch back to MF mode by sending an "M". For example:

M*1234T,M5678a
7. Dialing parameter default values can be set or retrieved using dx_getparm( ) and dx_setparm( ); see the board and channel parameter defines in Chapter 6. Voice Device Parameters.

To determine the state of the channel during a dial and/or Call Analysis, use ATDX_STATE( ), which will return one of the following:

CS_DIAL

  dial state (with or without Call Analysis)

CS_CALL

  Call Analysis state

Asynchronous Operation

Set the mode field to EV_ASYNC, using a bitwise OR. When running asynchronously, the function will return 0 to indicate it has initiated successfully, and will generate one of the following termination events to indicate completion (use the SRL Event Management functions to handle the termination event):

TDX_DIAL

  • termination of dialing (without Call Analysis)

TDX_CALLP

  • termination of dialing (with Call Analysis)

If asynchronous dx_dial( ) terminates with a TDX_DIAL event, use ATDX_TERMMSK( ) to determine the reason for termination. If dx_dial( ) terminates with a TDX_CALLP event, use ATDX_CPTERM( ) to determine the reason for termination.

Synchronous Operation

By default, this function runs synchronously, and will return a 0 to indicate that it has completed successfully.

When synchronous dialing terminates, the function will return the Call Progress result (if Call Analysis is enabled) or 0 to indicate success (if Call Analysis isn't enabled).

Call Analysis

Call Analysis provides information about the call. It is enabled to run on the call after dialing completes by setting the mode field. The function can be set to run using default Call Analysis parameters, or by using the Call Analysis Parameter structure (DX_CAP).

Call Analysis results can be retrieved using ATDX_CPTERM( ).

If dx_dial( ) is running synchronously, the Call Analysis results will also be returned by the dx_dial( ) function.

For more information about Call Analysis see the Voice Software Reference: Voice Features Guide.

Possible Call Analysis termination reasons are listed below:

CR_BUSY

  • line was busy

CR_CEPT

  • operator intercept

CR_CNCT

  • call connected

CR_ERROR

  • Call Analysis error

CR_FAXTONE

  • fax machine or modem

CR_NOANS

  • no answer

CR_NODIALTONE

  • no dial tone

CR_NORB

  • no ringback

CR_STOPD

If Call Analysis is enabled, additional information about the call can be obtained using the following Extended Attribute functions:

ATDX_ANSRSIZ( )

  • Returns duration of answer

ATDX_CONNTYPE( )

  • Returns the connection type for a completed call

ATDX_CPERROR( )

  • Returns Call Analysis error

ATDX_CPTERM( )

  • Returns last Call Analysis termination

ATDX_CRTNID( )

  • Returns tone identifier

ATDX_DTNFAIL( )

  • Returns dial tone fail character

ATDX_FRQDUR( )

  • Returns duration of first frequency detected

ATDX_FRQDUR2( )

  • Returns duration of second frequency detected

ATDX_FRQDUR3( )

  • Returns duration of third frequency detected

ATDX_FRQHZ( )

  • Returns frequency detected in Hz

ATDX_FRQHZ2( )

  • Returns frequency of second detected tone

ATDX_FRQHZ3( )

  • Returns frequency of third detected tone

ATDX_LONGLOW( )

  • Returns duration of longer silence

ATDX_FRQOUT( )

  • Returns percent of frequency out of bounds

ATDX_SHORTLOW( )

  • Returns duration of shorter silence

ATDX_SIZEHI( )

  • Returns duration of non-silence

Top Of PageCautions

  1. If you attempt to dial a channel in MF mode and do not have MF capabilities on that channel, DTMF tone dialing is used.
  2. Issuing a dx_stopch( ) on a channel that is dialing without Call Analysis enabled has no effect on the dial, and will return 0. The digits specified in the dialstrp parameter will still be dialed.
     
    Issuing a dx_stopch( ) on a channel that is dialing with Call Analysis enabled will cause the dialing to complete, but Call Analysis will not be executed. The digits specified in the dialstrp parameter will be dialed. Any Call Analysis information collected prior to the stop will be returned by Extended Attribute functions.
  1. This function must be issued when the channel is idle.

Top Of PageExample 1: Call Analysis with user-specified parameters (Synchronous Mode)

Top Of PageExample 2: Call Analysis with default parameters (Synchronous Mode)

Top Of PageExample 3: Call Analysis with default parameters (Asynchronous, Callback Mode)

Top Of PageExample 4: PerfectCall Call Analysis (Synchronous Mode)

Top Of PageErrors

If this function returns -1 to indicate failure, use ATDV_LASTERR( ) and ATDV_ERRMSGP( ) to retrieve one of the following error reasons:

EDX_BADPARM

  • Invalid Parameter

EDX_BUSY

  • Channel is busy

EDX_SYSTEM

Top Of PageSee Also

Retrieving termination reasons and events for dx_dial( ) with Call Analysis:

Retrieving termination reasons for dx_dial( ) without Call Analysis:

Call Analysis:


Previous PageTable Of ContentsTop Of PageIndexNext Page

Click here to contact Dialogic Customer Engineering

Copyright 2002, Dialogic Corporation
All rights reserved
This page generated February, 2002