TAPI - Retrieving parameters from TAPIΒΆ

tapiGetValue()

Retrieve parameters from TAPI


SYNTAX

tapiGetValue(DeviceID, Param1,[, Param2])

This function is included for use in situations where the calling function may return more than one parameter from TAPI.

The DeviceID is an integer containing the number of the line device to be queried, counting from 1 up to the total number of devices. Where DeviceID is not relevant, any value can be supplied.

Param1 specifies the name of the variable whose value is required. When this variable is a structure, a second parameter, Param2, is included to specify the name of the field.

Definitions of the valid parameters that can be sent to tapiGetValue can be found in the include file $SCULPTOR/include/tapi.h with the prefix TAPI_VAR_ (variables) or TAPI_FLD_ (fields). See the section on each individual Sculptor TAPI function for a list of the values applicable.

The return value is the return code from the TAPI function call, unless the call cannot be completed, in which case the value -1 is returned.


EXAMPLES

tmp.CallerID = tapiGetValue(DevID, TAPI_VAR_CALL_INFO, TAPI_FLD_CALLER_ID)

tmp.NumDevs = tapiGetValue(0, TAPI_VAR_NUMDEVS)
Device.DevStatusFlags[tmp.DevID] \
    = tapiGetValue(tmp.DevID, TAPI_VAR_DEV_STATUS, TAPI_FLD_DEV_STATUS_FLAGS)

RELATED TOPICS

TAPI

Assisted telephony service functions

Basic telephony service functions