ADSI_Get_HEX

Use the ADSI_Get_HEX state table to receive encoded DTMF data from an ADSI telephone and store that data in hexadecimal format.

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_HEX state table stores the data as two hexadecimal characters, 3 and 1. Compare this with the ADSI_Get_Text state table in ADSI_Get_Text.

If the ADSI_Get_HEX 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_HEX, 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

In this example, the state table waits approximately one minute to receive the 4 bytes of data into the field named cpeid:

InvokeStateTable("DIRECT", ADSI_Get_HEX, get,
                cpeid,
                "4",
                "1")

Flags

Table 1 shows how the ADSI component stores the DTMF data.

Table 1. How DTMF data is stored
DTMF Data Received Data Stored   DTMF Data Received Data Stored

0

0

 

*1

A

1

1

*2

B

2

2

*3

C

3

3

*4

D

4

4

*5

E

5

5

*6

F

6

6

7

7

8

8

9

9

Related state tables