Platform SDK: Web Telephony Engine

Getting Text Input from the Caller

A WTE application gets text input from the caller by using entry fields. You should use entry fields to get pieces of information that you cannot get using a menu; that is, pieces of information that cannot feasibly be included in a list of menu items. For example, you would use entry fields to get the caller's account number, address, credit card number, and so on.

You create an entry field by using the TEXTAREA element or the INPUT element with the TYPE=text attribute. An entry field should be preceded by an introductory phrase, usually created by using the P element, that describes the type of data that the caller should enter. Also, entry fields are typically used inside a FORM element and are posted to and processed by an Active Server Pages (ASP) file or Common Gateway Interface (CGI) script. The following example shows an entry field that gets a seven-digit account number which is later posted to an ASP file called Customer.asp:

<FORM METHOD=post ACTION=customer.asp ID=custinfo>
<P VOICEFILE="enteraccount.wav">Please enter your account number followed by the pound key.
<INPUT TYPE="text" NAME="account number" SIZE="7" MAXLENGTH="7"></INPUT>
    .
    .
    .
</FORM>

The WTE renders the TEXTAREA element and text-type INPUT element in the same way. That is, when the engine reaches the element, the engine stops and waits for the caller's input, and then continues rendering the application after getting the input. The caller enters input by pressing telephony keys and, optionally, by speaking. For more information about using SR to enter text, see Taking Dictation.