VoiceXML built-in grammar types

This section describes the VoiceXML 2.0 built-in grammar types.

Note: Vocalizer supports <say-as> equivalents for all these built-ins. See <value>.

boolean

Specifies negative and positive responses. The interpreter returns false for negative responses such as no, and true for positive responses such as yes.

date

Specifies date formats, for example, yyyymmdd (20010314).

digits

Specifies digit strings, for example, 12345.

currency

Specifies currencies in dollars and cents, for example, $146.50. The maximum currency setting is one hundred thousand dollars.

number

Specifies whole numbers or decimals, for example, 30 or 30.5.

phone

Specifies telephone numbers that adhere to the North American Dialing Plan, for example, 650-732-1234.

time

Specifies time given in hours and minutes, for example, 9:30. It returns the following five-character string in the format: hhmmx. The x value can be one of:

  • "a" for a.m.
  • "p" for p.m.
  • "h" to specify a time using the 24-hour clock.
  • "?" to specify an ambiguous time.