Previous PageTable Of Contents../index.htmlIndexNext Page

dt_dial( )

Description | Cautions | Example 1 | Example 2 | Errors | See Also

Name:

int dt_dial(devh,digstr,tmo)

Inputs:

int devh

  time slot device handle

 

char *digstr

  pointer to an ASCIIZ string of digits

 

unsigned int tmo

  timeout value

Returns:

0 on success
-1 on failure

Includes:

srllib.h
dtilib.h

Category:

Time Slot Signaling

Mode:

synchronous/asynchronous

Top Of PageDescription

The dt_dial( ) function allows the application to pulse dial an ASCIIZ string of digits on a specified D/240SC-T1, D/240SC-2T1, D/480SC-2T1, D/300SC-E1 D/300SC-2E1 or D/600SC-2E1 time slot. The function can operate in either the synchronous (blocking) or asynchronous (non-blocking) mode.

Parameter

Description

devh:

Specifies the valid time slot device handle returned by a call to dt_open( ). The specified time slot must be in the offhook, idle state when dt_dial( ) is called.

digstr:

Pointer to the ASCIIZ string of digits to dial. The maximum length of the string is 32 digits.

tmo:

Specifies the maximum number of seconds that the function will block while awaiting a dial status response from the D/xxxSC board.

Asynchronous Mode

To operate this function in asynchronous (non-blocking) mode, specify 0 for tmo. This allows the application to continue processing while awaiting a completion event. If event handling is set up properly for your application, DTEV_PDDONE will be returned by the sr_getevttype( ) function included in the SRL when the dial is successfully completed. See Appendix A - Standard Runtime Library for information on event handling.

Synchronous Mode

To operate the function in synchronous (blocking) mode, specify a length of time in seconds that the function will block for tmo. This causes the application to wait for a return from the function before performing any other processing. A suggested tmo setting for this function is 60.

Top Of PageCautions

  1. This function will fail under the following conditions:
  2. The time slot must be in signaling insertion mode before this function is called. Signaling insertion mode is enabled using the dt_setsigmod( ) function.
  3. To use this function in asynchronous mode, you must use the dt_setevtmsk( ) and SRL sr_enbhdlr( ) functions to enable trapping the completion event and create an event handler to process the event. See Appendix A - Standard Runtime Library for more information on Digital Network Interface event management.
  4. Make sure adequate time is given to the function to complete the dial if the synchronous mode is used.

Top Of PageExample 1

Top Of PageExample 2 -- Setting Flash Hook Using dt_dial( )

Top Of PageErrors

If the function returns -1, use the SRL Standard Attribute function ATDV_LASTERR( ) to obtain the error code. See Appendix A - Standard Runtime Library for more information on SRL functions. The error codes returned by ATDV_LASTERR are:

Error defines can be found in the file dtilib.h.

Top Of PageSee Also

In Voice Software Reference (for Linux or Windows):


Previous PageTable Of ContentsTop Of PageIndexNext Page

Click here to contact Dialogic Customer Engineering

Copyright 2001, Dialogic Corporation
All rights reserved
This page generated November, 2001