Previous PageTable Of Contents../index.htmlIndexNext Page

li_attendant( )

Description | Cautions | Source Code | Example | Errors | See Also

Name:

int li_attendant(pAtt)

Inputs:

PDX_ATTENDANT *pAtt

  pointer to DX_ATTENDANT data structure

Returns:

0 if success

 
 

EDX_BADPARM

 
 

EDX_BADPROD

 
 

EDX_SYSTEM

 
 

-1 if failure

 

Includes:

syntellect.h

 

Category:

Licenses and Technologies

Mode:

Synchronous, multitasking

Top Of PageDescription

The li_attendant( ) function performs the actions of an automated attendant. It is an implementation of an automated attendant application and works as a created thread. Before the application can create the thread, it must initialize the DX_ATTENDANT data structure.

This function loops forever or until the named event specified in the szEventName field of the DX_ATTENDANT data structure becomes signaled. While waiting for the named event to be signaled, this function checks for an incoming call. By default, it assumes that an analog front end is present and uses dx_setevtmsk( ) and dx_getevt( ) to determine if an incoming call is present.

The application can override the default analog front end behavior by supplying a function in the pfnWaitForRings field of the data structure.

Once an incoming call is detected, the call is answered. A voice file intro.att is played back, and li_attendant( ) waits for digit input. By default, dx_sethook( ) is called unless pfnAnswerCall is not NULL. The application can override the default analog front end behavior by supplying a function in the pfnAnswerCall field.

The maximum number of DTMF digits is specified in the nExtensionLength field. If timeout occurs or the maximum number is reached, the translation function in the pfnExtensionMap field is called. The translated string, whose maximum length is nDialStringLength, is then dialed. The translation function should insert pauses and flash hook sequences where appropriate. The call is terminated using dx_sethook( ) unless pfnDisconnectCall is registered, and li_attendant( ) awaits the next incoming call. The application can override the default analog front end behavior by supplying a function in the pfnDisconnectCall field.

Parameter

Description

pAtt

Points to the Automated Attendant data structure, DX_ATTENDANT, that specifies termination conditions for this function and more. For details, refer to the chapter on Data Structures.

Top Of PageCautions

Top Of PageSource Code

To view the source code for li_attendant( ), refer to the syntellect.c file in the samples\syntellect directory under the Dialogic home directory.

Top Of PageExample

To view the source file for the example, refer to the attendant.c file in the samples\syntellect directory under the Dialogic home directory.

Top Of PageErrors

This function fails and returns the specified error under the following conditions:

Equate

Returned When

-1

  • Unable to open the device specified in the szDevName field.
  • pfnDisconnectCall fails the first time around.

EDX_BADPARM

  • pAtt is NULL
  • pfnExtensionMap is NULL
  • nDialStringLength is 0
  • nExtensionLength is 0
  • named event does not exist.

EDX_BADPROD

The opened device is on a board that is not enabled with the Syntellect patent license (non-STC board).

EDX_SYSTEM

Error from operating system; use dx_fileerrno( ) to obtain error value. Unable to allocate nDialStringLength +1 characters.

Top Of PageSee Also


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