Avaya Logo

Previous Topic

Next Topic

Book Contents

Book Index

ttdelim

The ttdelim instruction defines touch-tone key functions.

Synopsis

ttdelim(erase-char,erase-all,delim1,delim2)

Description

The ttdelim instruction sets four control functions and the touch tone keys used by the caller to perform those functions. The functions for the erase-char and erase-all arguments are defined by the system. The functions for the delim1 and delim2 arguments are defined by the developer. The touch tone keys for performing all four functions are defined by the developer.

The system-defined functions erase-char and erase-all do not terminate the collection of touch tones initiated by the getinput instruction and those characters are removed from the buffer. The developer-defined functions delim1 and delim2 terminate the collection of touch tones and those characters remain in the buffer.

The touch-tone buffer is scanned for the delimiters currently in effect when a getinput instruction is executed rather than while the touch tones are entered.

The values for the ttdelim arguments are:

Value

Meaning

-1

Function is not used (default)

0

Do not change value of current function

'c' or `cc'

New value where c is: 0-9, #, *, or A-D (only on extended keypad, such as an operator console)

The following functions and characters might be specified for the instruction:

ttdelim('#1','#*','*1','*2')  

Characters

Meaning

#1

Erase one character

#*

Erase all characters

*1

Get operator

*2

Play help message

If a script does not use the ttdelim feature, then this instruction is not used. On the other hand, if it uses only one argument, then a default value must be entered for the other three arguments.

An example of a ttdelim instruction using only the erase-all function is:

ttdelim(-1,'#',-1,-1)

The ttdelim instruction works with the getinput and tttime instructions. For example, after requesting 5 digits with a getinput instruction, normally r.0 is set to 5 and the actual digits received are stored at the destination. To allow for the extra digits requested by a delim1 or delim2 argument, the getinput instruction should specify more digits than it needs. For instance, if a 5-digit entry is required, but it is anticipated that a caller might enter all incorrectly, and need to erase them, getinput would require a minimum of seven digits.

Whenever the ttdelim instruction is used, the getinput instruction has to check the values of r.0 and the received digits to determine if delim1 or delim2 was used.

Based on the previous arguments for the ttdelim instruction, the getinput instruction would have the results given by the following examples.

Input

r.0

Destination

Script Action

12345

5

12345

Use 5 digits.

123#*45678

5

45678

Use 5 digits.

12*1

4

12*1

Transfer to operator.

*1

2

*1

Transfer to operator.

12*2

4

12*2

Play help message and reprompt for input.

The timeouts for the two system defined functions, erase-char and erase-all, are the same. The tttime instruction only uses the firstdig argument once, but it repeatedly uses the interdig argument to wait the maximum amount of time specified to receive the next digit.

The script writer needs to write code to implement the functions. For example, delim2 would need a talk instruction to play the help message.

Example

The following example causes the last digit to be erased when the #1 keys are pressed, the entire entry erased when the # key is repeated, and the entry terminated when the * key is pressed. The value -1 indicates that the fourth argument is not used.

ttdelim('#1','##','*',-1)

Difficulty could arise with conflicting definitions (for example, # and #1). Since both a single character string and double character string are permitted, the system may respond when the first # key is pressed and never read the second key.

Any additional significance attached to the * key entry, other than entry termination, must be written into the script.

The digits entered at the delimiter must be accounted for in the getinput instruction. For example, if 8 digits plus a touch-tone terminator are expected, getinput must look for 8 digits plus the length of the touch-tone terminator.

© 2006 Avaya Inc. All Rights Reserved.