ADSI and ADSI_I

Use the ADSI and ADSI_I state tables to download SDC functions to the ADSI telephone and to execute those functions. The ADSI_I state table is very similar to the ADSI one, but it allows the user to interrupt the download to make a call.

ASCII syntax

InvokeStateTable ("DIRECT", ADSI, mode, file, func, parms);
InvokeStateTable ("DIRECT", ADSI_I, mode, file, func, parms, interrupt);

Entry point

mode
Specify one of:
data_mode
Download the function in data mode.

When you select data mode, the state table assumes that the ADSI telephone has been put into data mode using the switch_to_data SDC command. When the telephone is in data mode, data transfer is significantly faster because the initial CAS tone/DTMF exchange is not necessary.

voice_mode
Download the function in voice mode.

In voice mode, each data transmission is preceded by a CAS tone/DTMF sequence.

Description

file
The name of the SDC script file from which the ADSI function (specified in func) will be executed. The name is appended to the directory name $CUR_DIR/adsi/.
func
The name of the function to be executed.
parms
A string containing parameters to be passed to the ADSI function.

If you want to pass multiple parameters, you must concatenate them into one string, and separate each parameter using a 001 (X'01') delimiter. You could use the ADSI_Parameters state table to do this (see ADSI_Parameters).

If no parameters are to be passed to the ADSI function, set the parms parameter to a null string.

interrupt
Set this parameter to allow use of the telephone in an emergency while data is being downloaded.

This parameter is available on the ADSI_I state table only.

Specify one of the following values:

0
Transmission of data for an on-hook download is not interrupted when the telephone user presses a DTMF key or lifts the handset. This is the default.
1
Transmission of data is interrupted when the user presses a DTMF key.

Results

The InvokeStateTable action terminates with a result that indicates whether or not the operation was successful. If it was not successful, the result shows the reason for the failure:

0
Success
1
SDC function file not found
2
Function not found within the SDC function file
4
Error communicating with the ADSI device (no CAS tone acknowledgment)
5
Error communicating with the ADSI device (after 5 retries)
6
Line problem
7
Caller hung up

Example

This example is taken from the ADSI_Banking state table. It downloads and executes the connect function from the file adsicb.sdc.

InvokeStateTable("DIRECT", ADSI, voice_mode,
              "../ca/ADSI_dir/adsicb.sdc",
              "connect",
              parms)