ADSI_Get_Text

Use the ADSI_Get_Text state table to receive encoded DTMF data from an ADSI telephone and store that data as ASCII characters.

For example, when the caller presses key 1, the send_encoded_user_input statement (see send_encoded_user_input) sends the value 1, and the state table receives the encoded DTMF data string 31.The ADSI_Get_Text state table stores the data as the ASCII character 1. Compare this with the ADSI_Get_HEX state table in ADSI_Get_HEX.

If the ADSI_Get_Text state table receives any DTMF data that is not in Table 1, it returns with the result 0. The ADSI_Banking state table uses this feature: it expects the caller to press the Enter softkey to terminate the data they type. This soft key sends the two DTMF tones **.

ASCII syntax

InvokeStateTable ("DIRECT", ADSI_Get_Text, get, text, MaximumLength, TimeOut);

Entry point

get
You must specify the string get.

Description

Text
Specify the name of a variable that will store the data received from the telephone.
MaximumLength
Specify the number of characters of data you expect to receive from the telephone.

The state table returns with result 0 when it receives this many characters.

If more than this many characters are sent, your application must retrieve or discard them:

  • To retrieve them, you could use a GetKey state table action.
  • To discard them, you could use the ADSI_I state table in voice mode.
TimeOut
Specify an integer to represent how long you want the state table to wait for the MaximumLength number of characters. The state table waits for approximately that number of minutes.

However, note that the state table returns before this time (with result 0) if it receives DTMF data that is not in Table 1.

Results

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

0
Success.
5
The timeout has expired.
7
Caller hung up.
9
Blueworx Voice Response internal error.

Example

This example is taken from the ADSI_Banking state table. In this example, the state table waits approximately 30 minutes to receive 20 characters from the telephone, and converts those characters to ASCII format:

InvokeStateTable("DIRECT", ADSI_Get_Text, get,
              surname,
              "20",
              "30")

Related state tables