Keep the following points in mind when using erase-character or erase-entry arguments in the ttdelim instruction.
For example, if a 5-digit string is requested, and a caller has entered 8275, it is possible at this point to erase the 5 in the string 8275. However, once another digit is entered, the result is immediately processed by the script. One exception arises and is explained as number 2 below.
For example, suppose a script accepts a 5-digit ID as input. Normal input in this case consists of any 5-digit touch-tone string comprised solely of digits. Suppose that the following ttdelim instruction appears in the script:
ttdelim ('#','6#',-1,-1)
Here, # is used to erase the last character and 6# is used to erase the last string entered.
Whenever the first character of a two-character erase argument is entered, the script always waits for another touch tone to be entered to determine if it is the second character of the two-character erase argument.
A problem arises with the preceding use of the ttdelim instruction. Assume that a caller enters 28136 in response to a request for five touch tones. The script does not immediately process these five touch tones. The system waits for a # to be entered because the 6 is the first of a 2-character erase argument. If the caller does not enter any more touch tones, the request for five touch tones times out. In this example, it is impossible to enter IDs that end with the digit 6.
To avoid this problem, use either single character erase arguments or, if 2-character erase arguments must be used, make sure that the first character cannot be part of a normal input string. The problem in this example can be solved by simply reversing the 6 and #. The new ttdelim instruction would be as follows:
ttdelim ('#','#6',-1,-1)
In this case, 28136 would be immediately processed by the script.