Previous PageTable Of Contents../index.htmlIndexNext Page

d42_openfeaturesession( )

Description | Cautions | Example | Errors

ED42_FWREQFAILURE

Firmware error

ED42_BADDEVICE

Invalid or wrong device handle

ED42_UNSUPPORTED

Function not supported on this board

ED42_INVALARG

Invalid argument passed to function

DXLIB_INVNRB

Internal voice library error

Name:

int d42_openfeaturesession(devh, bufferp, termtype, evtmask)

Inputs:

int devh

  channel descriptor

 

char *bufferp

  pointer to a buffer specifying a valid phone extension number in ASCII character string format

 

int *termtype

  pointer to memory location that receives the type of phone display

 

int evtmask

  specifies the events to enable for the feature session

Returns:

ED42_NOERROR

  if success

 

-1

  if error (see Errors list)

Includes:

D42LIB.H

Mode:

synchronous

Supports:

D/42-NS

Top Of PageDescription

The d42_openfeaturesession( ) function opens a phone extension feature session on a specified channel, associating the telephone extension with the channel number. It returns information about the display used by the telephone set. It also enables for the feature session the asynchronous events specified in evtmask and allows the use of any functions that require an open feature session, such as d42_writetodisplay( ) and d42_closefeaturesession( ).

Parameter

Description

devh:

specifies the valid channel device descriptor obtained by a call to dx_open( )

bufferp:

pointer to ASCII character string application buffer where the NULL terminated phone extension number is placed

termtype

pointer to the application variable that will receive information on the type of phone display that is associated with the extension. The information is used in the d42_writetodisplay( ) function. Values returned are:

0x00 No display available
0x01 No display available
0x02 16-byte display
0x03 32-byte display

evtmask

specifies in a bit mask the events to enable for the feature session. Values are (can be ORed):

    D42_EVT_SOFTKEY
    Enables the asynchronous event TD42_SOFTKEYINPUT, which reports on the completion of softkey input.

    D42_EVT_ASYNCCLOSEFEATSESSION
    Enables the asynchronous event TD42_ASYNCCLOSEFEATSESSION, which reports on the close of a feature session.

Top Of PageCautions

Only one feature session can be open on a channel at any time.

Top Of PageExample

Top Of PageErrors

If this function returns -1 to indicate a failure, use ATDV_LASTERR( ) and ATDV_ERRMSGP( ) to retrieve one of the following (most common) errors. For a complete list of error codes and definitions, refer to Appendix C.

ED42_FEATSESSION
  ALREADYOPEN

Attempt to open more than one feature session per channel

ED42_FWREQFAILURE

Firmware error

ED42_BADDEVICE

Invalid or wrong device handle

ED42_UNKNOWNBOARD

Unknown D/42 board type

ED42_UNSUPPORTED

Function not supported on this board

ED42_INVALARG

Invalid argument passed to function

DXLIB_INVNRB

Internal voice library error


Previous PageTable Of ContentsTop Of PageIndexNext Page

Click here to contact Dialogic Customer Engineering

Copyright 2000, Dialogic Corporation
All rights reserved
This page generated January, 2002