Motorola 1 manual Input Element Type Phone, Data Format

Page 33

VoxML 1.0 Element Reference

INPUT Element : Type PHONE

INPUT Element : Type PHONE

The PHONE input is used to collect telephone numbers from the user.

Syntax

<INPUT TYPE="PHONE" NAME="value" NEXT="value" [NEXTMETHOD="value"] [TIMEOUT="value"] />

Attributes

Attribute Name

Allowed Values

 

 

NAME

identifier

 

 

NEXT

next step URL

 

 

NEXTMETHOD

GET *

 

POST

 

 

TIMEOUT

milliseconds (integer)

Examples

1 <STEP NAME="phone">

2<PROMPT> What is your phone number? </PROMPT>

3<INPUT TYPE="phone" NAME="ph" NEXT="#fax"/>

4</STEP>

In this simple example, the code on line 3 illustrates the use of the PHONE input type to collect a telephone number from the user, store the number in the VoxML variable named “ph”, and go to the STEP named “fax”.

Data Format

The PHONE input makes use of an input grammar to interpret the user’s response and store that response in a standard format. The phone number is interpreted as a string of digits, and stored in the VoxML variable as such.

If a user said “One, eight zero zero, seven five nine, eight eight eight eight”, the response would be stored as “18007598888”. Note that there is no punctuation added to the digits.

October 1998

VoxML 1.0 Language Reference 29

Image 33
Contents Revision VoxML Language ReferencePage Contents Appendices What is VoxML OverviewPurpose of this Document DIALOGs and STEPs Structure of a VoxML DocumentBasic Elements VoxML 1.0 Application Development Guide Other Reference DocumentationACK Element SyntaxAttributes Examples Audio Element Break Element Next step URL Cancel ElementExamples Case Element Integer Class ElementExamples Dialog Element EMP Element Error Element Input TYPE=OPTIONLIST Help Element Option NEXT=#end done /OPTION 11 /INPUT 12 /STEP Input Element Data Format Input Element Type DateInput Element Type Digits Input Element Type Grammar Input Element Type Hidden Input Element Type Money Input Element Type None Input Element Type Number Input Element Type Optionlist Input Element Type Phone Input Element Type PROFILE‡ Input Element Type Record Prompt Input Element Type Time Input Element Type Yorn Option Element VoxML 1.0 Element Reference Options Element Syntax Attributes Or ElementPrompt Element Pros Element Rename Element Response Element Examples Step Element Switch Element Prompt Value ElementAppendix a VoxML 1.0 Document Type Definition AppendicesOctober VoxML 1.0 Language Reference Vcard Profile Names and Subtypes Appendix B Vcard Profile Names and SubtypesFirst