Obtaining a Phone Number
(Application Speech Control Sample)
This sample illustrates the Phone Application Speech Control. In this sample, the control is configured so that an area code and main phone number are required, but an extension is optional.
Featured Highlights
- Default grammar
- Default built-in prompts
- A customized short time-out confirmation (The time-out value used in this sample is smaller than the default value for the Phone Application Speech Control.)
Running the Sample
The sample starts by asking for a phone number.
Respond by saying either:
- A three-digit area code followed by a seven-digit phone number and an extension of up to five digits. The application confirms each field of information separately.
- A three-digit area code followed by a seven-digit phone number. The application confirms the area code and phone number, and then asks if there is an extension. If the user supplies an extension, the application confirms the extension.
- A seven-digit phone number. Because the area code is a required field, the application asks for an area code. After the user provides the area code, the application confirms both the area code and phone number, and then asks if there is an extension. As in the first scenario, if the user supplies an extension at this point, the application confirms the extension.
The full value obtained (the area code, the phone number, and optionally, the extension) is returned in the SML output. The SML element contains three child elements, one for each type of information obtained: AreaCode, LocalNumber, and Extension. Each child element contains only numeric values.
Remarks
The global command "Help" is available at anytime.
See Also
Application Speech Controls | Command Control | Phone Control | SemanticMap Control | AreaCodeSemanticItem Property | BargeIn Property | ExtensionSemanticItem Property | LocalNumberSemanticItem Property | QuestionPrompt Property | RequiresAreaCode Property | Scope Property | Type Property | XPathTrigger Property