Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Table of Contents
1 Element Summary ............................................................................................................................................ 1
2 <assign> Element .......................................................................................................................................... 10
3 <audio> Element ............................................................................................................................................ 13
4 <block> Element ............................................................................................................................................ 20
5 <break> Element ............................................................................................................................................ 23
6 <catch> Element ............................................................................................................................................ 26
7 <choice> Element .......................................................................................................................................... 32
8 <clear> Element ............................................................................................................................................. 41
9 <data> Element .............................................................................................................................................. 43
10 <disconnect> Element .................................................................................................................................. 54
11 <else> Element ............................................................................................................................................ 56
12 <elseif> Element .......................................................................................................................................... 59
13 <emphasis> Element .................................................................................................................................... 62
14 <enumerate> Element .................................................................................................................................. 64
15 <error> Element ........................................................................................................................................... 66
16 <example> Element ...................................................................................................................................... 70
17 <exit> Element ............................................................................................................................................. 73
18 <field> Element ............................................................................................................................................ 75
2
2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited by law.
3
2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited by law.
4
2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited by law.
5
2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited by law.
Element Summary
Element Summary
The following table lists each VoiceXML element, and the attributes, parents and children of the element.
Element
Attributes
Parents
Children
<assign>
name, expr
None
<audio>, <block>,
<catch>, <choice>,
<enumerate>, <error>,
<field>, <filled>, <help>,
<if>, <initial>, <menu>,
<noinput>, <nomatch>,
<prompt>, <record>,
<subdialog>, <transfer>
<audio>, <break>,
<emphasis>,
<enumerate>, <foreach>,
<mark>, <phoneme>,
<prosody>, <say-as>,
<value>
<audio>
<block>
<break>
<catch>
strength, time
<form>
<audio>, <choice>,
<emphasis>,
<enumerate>,
<paragraph>, <prompt>,
<prosody>, <sentence>
<assign>, <audio>,
<clear>, <disconnect>,
<enumerate>, <exit>,
<goto>, <if>, <log>,
<prompt>, <reprompt>,
<return>, <script>,
<submit>, <throw>,
<value>, <var>
None
<assign>, <audio>,
<clear>, <disconnect>,
<enumerate>, <exit>,
<goto>, <if>, <log>,
<prompt>, <reprompt>,
<return>, <script>,
Page 1 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
Element Summary
<submit>, <throw>,
<value>, <var>
<choice>
<menu>
<audio>, <break>,
<emphasis>,
<enumerate>,
<grammar>, <mark>,
<paragraph>,
<phoneme>, <prosody>,
<say-as>, <sentence>,
<value>
namelist
None
ecmaxmltype, enctype,
fetchaudio, fetchhint,
fetchtimeout, maxage,
maxstale, method, name,
namelist, src
None
<disconnect>
namelist
None
<else>
None
<if>
None
<elseif>
cond
<if>
None
<audio>, <choice>,
<emphasis>,
<enumerate>, <option>,
<paragraph>, <prompt>,
<prosody>, <sentence>
<audio>, <break>,
<emphasis>,
<enumerate>, <mark>,
<phoneme>, <prosody>,
<say-as>, <value>
<clear>
<data>
<emphasis>
<enumerate>
level
None
<audio>, <block>,
<catch>, <choice>,
<error>, <field>, <filled>,
<help>, <if>, <initial>,
<menu>, <prompt>
<audio>, <break>,
<emphasis>,
<enumerate>, <mark>,
<paragraph>,
<phoneme>, <prosody>,
Page 2 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
Element Summary
<say-as>, <sentence>,
<value>
<assign>, <audio>,
<clear>, <disconnect>,
<enumerate>, <exit>,
<goto>, <if>, <log>,
<prompt>, <reprompt>,
<return>, <script>,
<submit>, <throw>,
<value>, <var>
<error>
cond, count
<example>
None
<rule>
None
<exit>
expr, namelist
None
<field>
<filled>
<foreach>
mode, namelist
array, item
<form>
<audio>, <catch>,
<enumerate>, <error>,
<filled>, <foreach>,
<grammar>, <help>,
<link>, <noinput>,
<nomatch>, <option>,
<prompt>, <property>,
<value>
<assign>, <audio>,
<clear>, <disconnect>,
<enumerate>, <exit>,
<goto>, <if>, <log>,
<prompt>, <reprompt>,
<return>, <script>,
<submit>, <throw>,
<value>, <var>
<assign>, <audio>,
<break>, <clear>,
<data>, <disconnect>,
<enumerate>, <exit>,
<foreach>, <goto>, <if>,
<log>, <mark>,
<prompt>, <reprompt>,
Page 3 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
Element Summary
<return>, <script>,
<submit>, <throw>,
<value>, <var>
<form>
<goto>
<grammar>
<help>
<if>
<block>, <catch>,
<data>, <error>, <field>,
<filled>, <grammar>,
<help>, <initial>, <link>,
<noinput>, <nomatch>,
<property>, <record>,
<script>, <subdialog>,
<transfer>, <var>
id, scope
<vxml>
None
<rule>
fetchhint, fetchtimeout,
maxage, maxstale, mode,
root, scope, src, srcexpr,
tag-format, type, version,
voxeo:useuri, weight,
xml:base, xml:lang, xmlns
cond, count
cond
<assign>, <audio>,
<clear>, <disconnect>,
<enumerate>, <exit>,
<goto>, <if>, <log>,
<prompt>, <reprompt>,
<return>, <script>,
<submit>, <throw>,
<value>, <var>
<assign>, <audio>,
<clear>, <data>,
<disconnect>, <else>,
<elseif>, <enumerate>,
<exit>, <goto>, <if>,
<log>, <prompt>,
<reprompt>, <return>,
<script>, <submit>,
<throw>, <value>, <var>
Page 4 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
Element Summary
<audio>, <catch>,
<enumerate>, <error>,
<help>, <link>,
<noinput>, <nomatch>,
<prompt>, <property>,
<value>
<initial>
<form>
<item>
<item>, <one-of>,
<ruleref>, <tag>, <token>
<grammar>
<value>
<link>
<log>
expr, label
<mark>
name, nameexpr
<media>
soundLevel, speed
<audio>, <choice>,
<emphasis>,
<enumerate>, <option>,
<paragraph>, <prompt>,
<prosody>, <sentence>
<prompt>
None
None
<audio>, <catch>,
<choice>, <enumerate>,
<error>, <help>,
<noinput>, <nomatch>,
<prompt>, <property>,
<script>, <value>
<menu>
<vxml>
<meta>
<vxml>
None
<assign>, <audio>,
<clear>, <exit>, <goto>,
<if>, <reprompt>,
<return>, <script>
<noinput>
cond, count
Page 5 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
Element Summary
<assign>, <audio>,
<clear>, <disconnect>,
<enumerate>, <exit>,
<goto>, <if>, <log>,
<prompt>, <reprompt>,
<return>, <script>,
<submit>, <throw>,
<value>, <var>
<nomatch>
cond, count
<one-of>
xml:lang
<item>, <rule>
<item>
<option>
<field>
None
<paragraph>
xml:lang
None
None
<param>
<param>, <subdialog>
<param>
<phoneme>
alphabet, ph
None
None
<prompt>
<audio>, <break>,
<emphasis>,
<enumerate>, <foreach>,
<mark>, <paragraph>,
<phoneme>, <prosody>,
<say-as>, <sentence>,
<value>
<property>
name, value
<prosody>
<audio>, <choice>,
<emphasis>,
<enumerate>,
<paragraph>, <prompt>,
<sentence>
None
None
Page 6 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<record>
Element Summary
<form>
<audio>, <catch>,
<enumerate>, <error>,
<filled>, <grammar>,
<help>, <noinput>,
<nomatch>, <prompt>,
<property>, <value>
<reprompt>
None
None
<return>
None
<rule>
id, scope
<grammar>
<example>, <item>,
<one-of>, <ruleref>,
<tag>, <token>
<ruleref>
<item>, <rule>
None
<audio>, <choice>,
<emphasis>,
<enumerate>, <option>,
<paragraph>, <prompt>,
<prosody>, <sentence>
<say-as>
<script>
charset, fetchhint,
fetchtimeout, maxage,
maxstale, src, srcexpr
<sentence>
xml:lang
None
None
<sub>
alias
None
None
<form>
<audio>, <catch>,
<error>, <filled>, <help>,
<noinput>, <nomatch>,
<param>, <property>
<subdialog>
<value>
None
Page 7 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
Element Summary
maxstale, method, name,
namelist, src, srcexpr
None
<tag>
None
<item>, <rule>
None
<throw>
None
<token>
xml:lang
<item>, <rule>
None
<submit>
<transfer>
<form>
<audio>, <block>,
<catch>, <choice>,
<enumerate>, <error>,
<field>, <filled>, <help>,
<if>, <initial>, <log>,
<menu>, <nomatch>,
<prompt>, <record>,
<transfer>
<audio>, <catch>,
<error>, <filled>,
<grammar>, <help>,
<noinput>, <nomatch>,
<prompt>, <property>,
<value>
<value>
expr
None
<var>
expr, name
None
<voxeo:logcontrol>
mode
<block>
None
<voxeo:recordcall>
<block>
None
Page 8 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<vxml>
Element Summary
application, version, xml:base,
xml:lang, xmlns, xmlns:voxeo,
xmlns:xsi, xsi:schemaLocation
None
None
See Also
VoiceXML Development Guide v2.1 Overview
Voxeo Support
Page 9 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<assign> Element
<assign> Element
The <assign> element is used to explicitly assign a value to a variable. The Prophecy implementation does not require that a variable
be pre-declared to assign a value to it, for ease of development. For more information about variable scooping and assignment, see
VoiceXML Variables.
Syntax
The following code example shows the syntax for the <assign> element.
<assign expr="myExprCDATA" name="myNameCDATA" />
Attribute Details
The following table describes the attributes for the <assign> element.
Required: true
Type: CDATA
Default: none
name
Specifies the variable to be assigned to.
Valid Values: Any currently-available variable name within the current scope.
Required: true
Type: CDATA
Default: none
expr
Specifies the value to assign to the variable.
Valid Values: A valid ECMAScript Expression.
Shadow Variables
None.
Parents
<block> <catch> <error> <filled> <help> <if> <noinput> <nomatch>
Page 10 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<assign> Element
Children
None.
Code Samples
The following code sample shows use of the <assign> element.
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
<form id="F_1">
<block>
<prompt>
Here we use the assign elements attributes of name and expression.
</prompt>
<prompt>
The initial value for the variable is
<value expr="Var1" />
</prompt>
</block>
<block>
<assign name="Var1" expr="'chupacabra'" />
<prompt>
But after using the assign element, the value of the variable is now
<value expr="Var1" />
</prompt>
</block>
</form>
</vxml>
Page 11 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<assign> Element
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
Page 12 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<audio> Element
<audio> Element
The <audio> element lets you play an audio sound file in your application. Files must be in one of the following formats:
In the event that your audio URL cannot be located, you can nest backup text within the <audio> elements to ensure that an
informative message is played. For more information, see All Things Audio.
Syntax
The following code example shows the syntax for the <audio> element.
<audio expr="myExprCDATA" fetchhint="prefetch" fetchtimeout="myFetchtimeoutCDATA"
maxage="myMaxageCDATA" maxstale="myMaxstaleCDATA" src="mySrcURI" />
Page 13 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<audio> Element
Attribute Details
The following table describes the attributes for the <audio> element.
Page 14 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<audio> Element
Required: false
expr
Type: CDATA
Default: none
fetchhint
Default: safe
Specifies when the resource should be fetched during application execution. The
following values are permitted:
safe - Only fetch the resource when it is specifically called in the application
Required: false
fetchtimeout
Type: CDATA
Default: 5s
Specifies how long, in seconds or milliseconds, that the interpreter should wait for the
content to be returned before reverting to backup TTS if defined, or before the
application skips the contents of the <audio> element, if no backup TTS is defined.
Valid Values: A character string in CSS2 format, for example, 3s, 850ms, 0.7s, .5s,
and +1.5s.
Required: false
Type: CDATA
Default: none
We do not recommend that you rely on this attribute for cache control; caching is
always best controlled by the response headers of the hosting server. If no headers
are specified, then no cache control is present, regardless of the value set for the
maxage attribute.
Valid Values: An ECMAScript Expression that returns a valid time value for the
request.
Required: false
Type: CDATA
Default: none
Page 15 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<audio> Element
Specifies the maximum acceptable staleness, in seconds, of the resource in question.
maxstale
We do not recommend that you rely on this attribute for cache control; caching is
always best controlled by the response headers of the hosting server. If no headers
are specified, then no cache control is present, regardless of the value set for the
maxstale attribute.
Valid Values: An ECMAScript Expression that returns a valid time value for the
request.
Required: false
Type: URI
Default: none
Specifies a URI pointing to a valid audio file for your application to play.
src
Example
<audio src="MyServer/MyDir/MyFile.wav" />
You can also use the following syntax to send out-of-band DTMF tones in your
applications: <audio src="dtmf:1234" />.
Valid Values: A valid URI.
Constraints: Exactly one of the expr and src attributes must be specified.
Shadow Variables
None.
Parents
<audio> <block> <catch> <choice> <enumerate> <error> <field> <filled> <help> <if> <initial>
<menu> <noinput> <nomatch> <prompt> <record> <subdialog> <transfer>
Children
<audio> <break> <emphasis> <enumerate> <foreach> <mark> <phoneme> <prosody> <say-as> <value>
Page 16 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<audio> Element
Code Samples
The following code samples show use of the <audio> element.
<!-- fetchhint attribute Code Sample -->
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
<form id="F_1">
<block>
<prompt>
Here we use the audio fetch hint attribute with the value of prefetch.
</prompt>
<audio src="MySoundFile.wav" fetchhint="prefetch" />
<prompt>
Here we use the audio fetch hint attribute with the value of safe.
</prompt>
<audio src="MySoundFile.wav" fetchhint="safe" />
</block>
</form>
</vxml>
<form id="F_1">
<block>
<prompt>
Here we use the audio fetch time out attribute with the value of 10 seconds.
</prompt>
<audio src="MySoundFile.wav" fetchtimeout="10s" />
</block>
</form>
Page 17 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<audio> Element
</vxml>
<form id="F_1">
<block>
<prompt>
Here we demonstrate the max age and max stale attributes.
</prompt>
<audio src="MySoundFile.wav" maxage="500" maxstale="1000" />
</block>
</form>
</vxml>
<form id="F_1">
<var name="AudioVar" expr="'MyAudioFile.wav'" />
<block>
<prompt>
Here we use the audio expression attribute rather than a URI for our audio file.
</prompt>
<audio expr="AudioVar" />
</block>
</form>
</vxml>
Page 18 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<audio> Element
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
Page 19 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<block> Element
<block> Element
The <block> element is a form-item container element for executable content. The content is executed only when the cond attribute is
true and the expr attribute is undefined.
Syntax
The following code example shows the syntax for the <block> element.
<block cond="myCondCDATA" expr="myExprCDATA" name="myNameNMTOKEN">
Attribute Details
The following table describes the attributes for the <block> element.
Required: false
cond
Type: CDATA
Default: true
Specifies an expression which can be evaluated to true or false. The value of the
cond attribute must evaluate to true for any enclosed operations to be performed.
Valid Values: An ECMAScript Expression that evaluates to true or false.
Required: false
Type: CDATA
Default: ECMAScript
undefined
expr
Specifies the initial value of the element. The content is visited and executed only when
the value of this attribute is undefined.
Required: false
Type: NMTOKEN
name
Specifies the identifier of the element. If unspecified, this attribute defaults to an
inaccessible internal variable.
Shadow Variables
None.
Page 20 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<block> Element
Parents
<form>
Children
<assign> <audio> <clear> <data> <disconnect> <enumerate> <exit> <goto> <if> <log> <prompt>
<reprompt> <return> <script> <submit> <throw> <value> <var>
Code Samples
The following code sample shows use of the <block> element.
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
<form id="F_1">
<block name="B_1" expr="'someValue'">
<prompt>
Since the expression of the block is not undefined,
this is skipped by the interpreter.
</prompt>
</block>
Page 21 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<block> Element
</prompt>
</block>
</form>
</vxml>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
Page 22 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<break> Element
<break> Element
The <break> element is used to designate a pause in the TTS output. The length of the pause is defined either as a user-specified time
value, or in the strength attribute. SSML elements are ignored by some TTS engines. For more information, see
Text-To-Speech Guide.
Syntax
The following code example shows the syntax for the <break> element.
<break strength="weak" time="myTimeCDATA" />
Attribute Details
The following table describes the attributes for the <break> element.
Page 23 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<break> Element
Type: none| x-weak | weak | medium | strong |
x-strong
Default: medium
Specifies the strength of the prosodic break in the TTS output. The following values are permitted:
strength
Required: false
time
Type: CDATA
Default: none
Specifies the duration of a pause to be inserted in the TTS output. The value can be specified in
seconds or milliseconds. If a value is specified with no suffix, the value is interpreted as milliseconds.
Valid Values: A character string in CSS2 format.
Shadow Variables
None.
Parents
<audio> <choice> <emphasis> <enumerate> <paragraph> <prompt> <prosody> <sentence>
Children
None.
Code Samples
The following code sample shows use of the <break> element.
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
Page 24 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<break> Element
<form id="F_1">
<block>
<prompt>
We will now force a pause in our T T S output starting right here
<break strength="weak" />
and then we will have another right
<break time="2000" />
here.
</prompt>
</block>
</form>
</vxml>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
Page 25 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<catch> Element
<catch> Element
The <catch> element is used to intercept application and user-defined errors, conditions, and messages, allowing the developer to
assign event handlers on a scoped basis. The content nested within the catch element will only be executed when its particular event
is thrown. For more information, see Exceptions and Errors.
Syntax
The following code example shows the syntax for the <catch> element.
<catch cond="myCondCDATA" count="myCountCDATA" event="myEventNMTOKEN">
Attribute Details
The following table describes the attributes for the <catch> element.
Page 26 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<catch> Element
Type: CDATA
Default: true
Specifies an expression which can be evaluated to true or false. The value of the
cond attribute must evaluate to true for any enclosed operations to be performed.
Valid Values: An ECMAScript Expression that evaluates to true or false.
Required: false
Type: CDATA
Default: 1
Specifies the number of errors of this type that should have occurred for the enclosed
operations to be performed. If multiple events are specified in the event attribute, a
separate counter is maintained for each event type.
count
When an event is thrown for the first time, the <catch> element with the count attribute
set to " 1 " is executed. On the second instance of the same event, the FIA looks for a
<catch> element with the count attribute set to " 2 ". If none exists, the <catch>
element with the count attribute set to " 1 " is executed again.
Required: false
Type: NMTOKEN
Default: none
event
Specifies a space-separated list of event names that must be thrown for the <catch>
element to execute. If unspecified, all events are caught.
Shadow Variables
The following table describes the shadow variables for the <catch> element.
_event
Contains the event name that caused the exception. This variable lets the developer log or submit the
resultant exception or error to a database, or to save it to another local variable.
_message
Contains the value of any user-defined message that is explicitly thrown. Currently, Voxeo has no
platform-defined messages for any standard events, such as error.badfetch or error.semantic, so
any caught messages must be user-defined.
Parents
<field> <form> <initial> <menu> <record> <subdialog> <transfer> <vxml>
Page 27 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<catch> Element
Children
<assign> <audio> <clear> <disconnect> <enumerate> <exit> <goto> <if> <log> <prompt> <reprompt>
<return> <script> <submit> <throw> <value> <var>
Code Samples
The following code samples show use of the <catch> element.
<!-- Catch Sample -->
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
<catch event="MyUserDefinedEvent">
<prompt>
We caught the thrown event.
</prompt>
</catch>
<form id="F_1">
<block>
<prompt>
Getting ready to throw an event to be caught.
</prompt>
</block>
<block>
<throw event="MyUserDefinedEvent" />
</block>
</form>
</vxml>
Page 28 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<catch> Element
<catch event="MyUserDefinedEvent">
<prompt>
<value expr="_message" />
and the event is
<value expr="_event" />
</prompt>
<goto next="aTotallyBogusPage.vxml" />
</catch>
<catch event="error.badfetch">
<prompt>
Our error for the bogus go to statement is a
<value expr="_event" />
</prompt>
</catch>
<form id="F_1">
<block>
<prompt>
Getting ready to throw an event to be caught.
</prompt>
</block>
<block>
<throw event="MyUserDefinedEvent" message="'Here is the catch message'" />
</block>
</form>
</vxml>
Page 29 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<catch> Element
<form id="F1">
<block name="B_1">
<prompt>
Getting ready to throw an event to be caught.
</prompt>
<throw event="MyUserDefinedEvent" />
</block>
<block name="B_2">
<throw event="MyUserDefinedEvent" message="'Here is the message'" />
Page 30 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<catch> Element
</block>
</form>
</vxml>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
Page 31 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<choice> Element
<choice> Element
The <choice> element is used in conjunction with the <menu> element to create robust voice menus that allow the caller multiple
navigational choices without the need for traditional grammar structures. The <menu> element acts as the container element, while the
<choice> element defines the available menu items.
Syntax
The following code example shows the syntax for the <choice> element.
<choice accept="approximate" dtmf="myDtmfCDATA" event="myEventNMTOKEN"
eventexpr="myEventExprCDATA" expr="myExprCDATA" fetchaudio="myFetchAudioURI" fetchhint="safe"
fetchtimeout="myFetchTimeoutCDATA" maxage="myMaxAgeCDATA" maxstale="myMaxStaleCDATA"
message="myMessageCDATA" messageexpr="myMessageExprCDATA" next="myNextCDATA">
Page 32 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<choice> Element
Attribute Details
The following table describes the attributes for the <choice> element.
Page 33 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<choice> Element
Required: false
Default: exact
Specifies whether an exact or an approximate utterance is considered a valid grammar match for
the phrase contained within the <choice> element. The following values are permitted:
accept
exact - The text of the <choice> element defines the exact phrase to be recognized.
The <choice> element accept attribute value overrides the <menu> element accept attribute
setting.
Required: false
Type: CDATA
Default: none
dtmf
Specifies the DTMF sequence for this menu choice.
Required: false
event
Type: NMTOKEN
Default: none
eventexpr
Type: CDATA
Default: none
Specifies an ECMAScript expression that evaluates to the event that is thrown to the application
upon a choice match.
Constraints: Exactly one of the event, eventexpr, expr, or next attributes must be
specified.
Required: false
expr
Type: CDATA
Default: none
Specifies a variable expression to determine the resultant dialog or document URI that the
application transitions to upon choice match.
Constraints: Exactly one of the event, eventexpr, expr, or next attributes must be
specified.
Required: false
Type: URI
Default: none
fetchaudio
Page 34 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<choice> Element
Specifies the URI of the audio file to play to the caller in the event of an extended document fetch.
This attribute allows audio to be played to the caller while the fetch is being made, instead of
silence.
Required: false
fetchhint
Default: safe
Specifies when the resource should be fetched during application execution. The following values
are permitted:
safe - Only fetch the resource when it is specifically called in the application
Required: false
fetchtimeout
Type: CDATA
Default: 5s
Specifies how long, in seconds or milliseconds, that the interpreter should wait for the content to
be returned before reverting to backup TTS if defined, or before the application skips the contents
of the <audio> element, if no backup TTS is defined.
Valid Values: A character string in CSS2 format, for example, 3s, 850ms, 0.7s, .5s, and +1.5s.
Required: false
Type: CDATA
Default: none
Type: CDATA
Default: none
Type: CDATA
Default: none
Page 35 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<choice> Element
Specifies a descriptive message about the event that is thrown. The message is accessible in the
<catch> element _message shadow variable.
Constraints: Exactly one of the message, or messageexpr attributes may be specified.
Required: false
messageexpr
Type: CDATA
Default: none
Specifies an ECMAScript expression that evaluates to a descriptive message about the event
that is thrown. The message is accessible in the <catch> element _message shadow variable.
Constraints: Exactly one of the message, or messageexpr attributes may be specified.
Required: false
next
Type: URI
Default: none
Specifies the dialog or document URI that the application transitions to upon selection.
Constraints: Exactly one of the event, eventexpr, expr, or next attributes must be
specified.
Shadow Variables
None.
Parents
<menu>
Children
<audio> <break> <emphasis> <enumerate> <grammar> <mark> <paragraph> <phoneme> <prosody> <say-as>
<sentence> <value>
Code Samples
The following code samples show use of the <choice> element.
<!-- Choice event-fetchhint-maxage sample -->
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
Page 36 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<choice> Element
<catch event="Grobleski_event">
<prompt>
hey we caught the choice event.
</prompt>
</catch>
<menu id="M_1">
<prompt>
Say choice one to trigger the event.
</prompt>
<choice event="Grobleski_event" fetchhint="prefetch" maxage="500">
Choice one.
</choice>
</menu>
</vxml>
<menu id="M_1">
<prompt>
Say choice one to test the choice element.
</prompt>
<choice next="#F1" fetchtimeout="10s" maxstale="500">
Choice one
</choice>
</menu>
<form id="F1">
<block>
<prompt>
Page 37 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<choice> Element
Test successful.
</prompt>
</block>
</form>
</vxml>
<menu id="M_1">
<prompt>
Say choice one to test the choice element.
</prompt>
<choice next="SomePageThatTakesForeverToLoad.vxml" fetchaudio="MySoundFile.wav">
Choice one
</choice>
</menu>
</vxml>
Page 38 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<choice> Element
</menu>
<form id="F1">
<block>
<prompt>
Test successful.
</prompt>
</block>
</form>
</vxml>
<menu id="menu">
<prompt>
For the first option, say one.
For the second option, say two.
</prompt>
<choice event="Event_1" accept="approximate" dtmf="1" message="'You chose the first
option'">
One
</choice>
<choice event="Event_2" accept="exact" dtmf="2" message="'You chose the second option'">
Two
</choice>
Page 39 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<choice> Element
</menu>
</vxml>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
Page 40 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<clear> Element
<clear> Element
The <clear> element is used to set any existing VoiceXML variable or element guard variables, such as any user-defined variable set
with the <var> or <assign> elements, to an undefined value. The <clear> element can also be used to clear any block, subdialog,
menu, record, transfer, or field guard variables, thus, programmatically allowing a caller to revisit these form items.
Syntax
The following code example shows the syntax for the <clear> element.
<clear namelist="myNamelistNMTOKEN" />
Attribute Details
The following table describes the attributes for the <clear> element.
Required: false
Type: NMTOKEN
namelist
Specifies a space-separated list of variables or guard variables to be cleared upon
execution. When the namelist attribute is not specified, all form items in the current
form are cleared.
Shadow Variables
None.
Parents
<block> <catch> <error> <filled> <help> <if> <noinput> <nomatch>
Children
None.
Code Samples
The following code sample shows use of the <clear> element.
<?xml version="1.0" encoding="UTF-8"?>
Page 41 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<clear> Element
<vxml version="2.1">
<form id="F1">
<field name="F_1">
<prompt>
Which affliction plagued George W Bush as a child. Was it chronic bed wetting, or cooties?
</prompt>
<grammar type="text/gsl">
[(?chronic bed wetting) cooties]
</grammar>
<filled>
<prompt>
Our variables values is
<value expr="F_1" />
</prompt>
</filled>
</field>
<block>
<clear namelist="F_1" />
<prompt>
But, after clearing it, it is
<value expr="F_1" />
</prompt>
<disconnect />
</block>
</form>
</vxml>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
Page 42 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<data> Element
<data> Element
The <data> element lets the developer fetch content from an XML source without having to use any server-side logic, and without
having to transition to a new dialog. The XML data fetched by the <data> element is bound to ECMAScript through the named variable
that exposes a read-only subset of the W3C Document Object Model (DOM).
The <data> element shares the same scoping rules as the <var> element. If a <data> element has the same name attribute value as a
pre-declared variable in the same scope, the variable is assigned a reference to the DOM exposed by the <data> element.
There is a platform limitation regarding the maximum amount of text data that can be fetched using this element, which equates to 200
KB. Any file that exceeds this limit throws an error.semantic event.
The access-control element for the fetched content is entirely optional; content that does not have this element specified can still be
retrieved on the Voxeo platform.
If the XML data source itself is not well-formed content, then a fatal error.semantic event is thrown to the application.
If you want to send a custom event to a CCXML session that starts a VoiceXML application using the <dialogstart> element, you
can use the <data> element and the srcexpr attribute to inject the event with Prophecy SessionControl manager. For more
information, see Sending Custom Events in the CCXML 1.0 Development Guide.
Syntax
The following code examples show the syntax for the <data> element.
<data ecmaxmltype="myEcmaXmlTypeCDATA" enctype="myEncTypeCDATA" fetchaudio="myFetchAudioCDATA"
fetchhint="safe" fetchtimeout="myFetchTimeoutCDATA" maxage="myMaxAgeCDATA"
maxstale="myMaxStaleCDATA" method="GET" name="myNameCDATA" namelist="myNamelistNMTOKEN"
srcexpr="mySrcExprCDATA" />
- or <data ecmaxmltype="myEcmaXmlTypeCDATA" enctype="myEncTypeCDATA" fetchaudio="myFetchAudioCDATA"
fetchhint="safe" fetchtimeout="myFetchTimeoutCDATA" maxage="myMaxAgeCDATA"
maxstale="myMaxStaleCDATA" method="GET" name="myNameCDATA" namelist="myNamelistNMTOKEN"
src="mySrcURI" />
Page 43 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<data> Element
Attribute Details
The following table describes the attributes for the <data> element.
Page 44 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<data> Element
Required: false
Type: CDATA
Default: dom
Specifies if E4X is enabled in the data element instead of DOM. The following values are
permitted:
ecmaxmltype
e4x - Indicates that the data is fetched as an E4X object. E4X is an acronym for
ECMAScript for XML, which is a language extension that adds native XML support
to ECMAScript. The result is a simpler means of accessing data contained in an
external XML document. For more information, see ECMAScript for XML (E4X)
Specification.
Required: false
Type: CDATA
Default:
application/x-www-form-u
rlencoded
enctype
Specifies the MIME type encoding for any data submitted in the namelist attribute. The
following values are permitted:
Required: false
Type: URI
Default: none
fetchaudio
Specifies the URI of the audio file to play to the caller in the event of an extended document
fetch. This attribute allows audio to be played to the caller while the fetch is being made,
instead of silence.
Required: false
fetchhint
Default: safe
Specifies when the resource should be fetched during application execution. The following
values are permitted:
safe - Only fetch the resource when it is specifically called in the application
Required: false
Type: CDATA
Default: 5s
Page 45 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<data> Element
Specifies the total amount of time before abandoning the attempt and returning an
error.badfetch.
Valid Values: A character string in CSS2 format, for example, 3s, 850ms, 0.7s, .5s, and
+1.5s.
Required: false
Type: CDATA
Default: none
Type: CDATA
Default: none
Default: GET
Specifies the HTTP method to use. The allowable values for this attribute are:
method
If unspecified, then the GET value is assumed, unless the submission of multi-part or form
data is encountered, in which case the POST value is assumed.
Required: true
Type: CDATA
Default: none
name
Specifies the name of the ECMAScript form item variable. Each name assigned to a data
element must be unique.
Required: false
Type: NMTOKEN
Default: none
Page 46 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<data> Element
namelist
Specifies a space-separated list of variables to submit. By default, no variables are submitted.
Required: true
Type: URI
Default: none
src
Specifies the URI where the external XML content is located.
Constraints: Exactly one of the src or srcexpr attributes must be specified.
Required: false
Type: CDATA
Default: none
srcexpr
Specifies an ECMAScript expression that evaluates to the target URI.
Constraints: Exactly one of the src or srcexpr attributes must be specified.
Shadow Variables
None.
Parents
<block> <catch> <error> <filled> <form> <help> <if> <noinput> <nomatch> <vxml>
Children
None.
Code Samples
The following code samples show use of the <data> element.
<!-- data-name-src sample -->
<?xml version="1.0" ?>
<vxml version="2.1">
<data> Element
<form id="F2">
<script>
<![CDATA[
function GetData(d, t) {
return (d.getElementsByTagName(t).item(0).firstChild.data);
}
]]>
</script>
<block>
<prompt>
The values are <value expr="GetData(MyData, 'child1')" />.
the next value is <value expr="GetData(MyData, 'child2')" />.
the next value is <value expr="GetData(MyData, 'child3')" />.
the next value is <value expr="GetData(MyData, 'child4')" />.
the next value is <value expr="GetData(MyData, 'child5')" />.
</prompt>
</block>
</form>
</vxml>
Page 48 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<data> Element
<form id="F1">
<block>
<data name="MyData" srcexpr="MyXMLDest" namelist="Var1 Var2" method="get" />
<assign name="document.MyData" expr="MyData.documentElement" />
<goto next="#F2" />
</block>
</form>
<form id="F2">
<script>
<![CDATA[
function GetData(d, t) {
return (d.getElementsByTagName(t).item(0).firstChild.data);
}
]]>
</script>
<block>
Page 49 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<data> Element
<prompt>
Heres a good joke for you.
<break strength="medium"/>
So
<value expr="GetData(MyData, 'child1')"/>
and
<value expr="GetData(MyData, 'child2')"/>
walk into a bar.
<break strength="medium"/>
Then they get eaten by Marlon Brando.
</prompt>
</block>
</form>
</vxml>
<form id="F1">
<block>
<data name="MyData" srcexpr="MyXMLDest" namelist="Var1 Var2" method="get" />
<assign name="document.MyData" expr="MyData.documentElement" />
<goto next="#F2" />
</block>
</form>
<form id="F2">
Page 50 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<data> Element
<script>
<![CDATA[
function GetData(d, t) {
return (d.getElementsByTagName(t).item(0).firstChild.data);
}
]]>
</script>
<block>
<prompt>
Heres a good joke for you.
<break strength="medium"/>
So
<value expr="GetData(MyData, 'child1')"/>
and
<value expr="GetData(MyData, 'child2')"/>
walk into a bar.
<break strength="medium"/>
Then they get eaten by Marlon Brando.
</prompt>
</block>
</form>
</vxml>
Page 51 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<data> Element
</parent>
</xml>
</CFOUTPUT>
<form id="Weather">
<block>
<prompt>
We will now get the weather for you.
</prompt>
<data name="theData" src="http://www.google.com/ig/api?weather=orlando"
ecmaxmltype="e4x" />
<assign name= "response" expr="theData" />
<log expr="'******' + response.weather.forecast_information.postal_code.@data" />
<assign name= "City" expr="response.weather.forecast_information.postal_code.@data" />
<log expr="'******' + response.weather.current_conditions.condition.@data" />
<assign name= "Condition" expr="response.weather.current_conditions.condition.@data" />
<log expr="'******' + response.weather.current_conditions.temp_f.@data" />
<assign name= "Temp_F" expr="response.weather.current_conditions.temp_f.@data" />
<log expr="'******' + response.weather.current_conditions.temp_c.@data" />
<assign name= "Temp_C" expr="response.weather.current_conditions.temp_c.@data" />
<prompt bargein="false">
The current conditions in
Page 52 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<data> Element
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
Page 53 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<disconnect> Element
<disconnect> Element
The <disconnect> element is used to programmatically disconnect the caller from the voice application. The disconnection throws a
connection.disconnect event to the interpreter.
Syntax
The following code example shows the syntax for the <disconnect> element.
<disconnect namelist="myNamelistNMTOKEN" />
Attribute Details
The following table describes the attributes for the <disconnect> element.
Required: false
Type: NMTOKEN
Default: none
namelist
Specifies a space-separated list of variable names to be returned to the interpreter. If
unspecified, no variables are returned.
Shadow Variables
None.
Parents
<block> <catch> <error> <filled> <help> <if> <noinput> <nomatch>
Children
None.
Code Samples
The following code sample shows use of the <disconnect> element.
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
Page 54 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<disconnect> Element
<catch event="connection.disconnect">
<!-Catch the disconnect event, and submit any existing variables to our server.
-->
<log expr="'*********************************************************'"/>
<log expr="' CAUGHT THE DISCONNECT EVENT'"/>
<log expr="'*********************************************************'"/>
<!-<submit next="MyWebserver.com/MyCGIFile.cgi" namelist=Var1"/>
-->
</catch>
<form id="F1">
<block>
<prompt>
Getting ready to disconnect the call, which will throw a connection dot disconnect
event.
</prompt>
</block>
<block>
<disconnect />
</block>
</form>
</vxml>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
Page 55 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<else> Element
<else> Element
The <else> element is used as the final logic constructor in an array of conditional statements. The content nested within the <else>
element is executed when all other <if> and <elseif> element cond attributes evaluate to false.
Syntax
The following code example shows the syntax for the <else> element.
<else />
Attribute Details
None.
Shadow Variables
None.
Parents
<if>
Children
None.
Code Samples
The following code sample shows use of the <else> element.
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
<form id="F1">
<field name="F_1">
<prompt>
Who would win in a fist fight, Oprah, Madonna, or James Brown?
Page 56 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<else> Element
</prompt>
<grammar xml:lang="en-us" root="myrule">
<rule id="myrule">
<one-of>
<item> Oprah </item>
<item> Madonna </item>
<item> James Brown </item>
</one-of>
</rule>
</grammar>
<filled>
<if cond="F_1=='Oprah'">
<prompt>
You really think Oprah could duke it out with the Godfather of soul?
</prompt>
<elseif cond="F_1=='Madonna'" />
<prompt>
Madonna would get creamed, who do you think you are kidding?
</prompt>
<else />
<prompt>
James Brown would whip up on both Oprah and Madonna.
</prompt>
</if>
</filled>
</field>
</form>
</vxml>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Page 57 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<else> Element
Voxeo Support
Page 58 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<elseif> Element
<elseif> Element
The <elseif> element is used to specify additional content when all other <else> or <if> elements equate to false. When a series of
<if>, <elseif>, and <else> elements is encountered, the application executes the first one which evaluates to true.
Syntax
The following code example shows the syntax for the <elseif> element.
<elseif cond="myCondCDATA" />
Attribute Details
The following table describes the attributes for the <elseif> element.
Required: true
Type: CDATA
Default: none
cond
Specifies an expression which can be evaluated to true or false. The value of the
cond attribute must evaluate to true for any enclosed operations to be performed.
Shadow Variables
None.
Parents
<if>
Children
None.
Page 59 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<elseif> Element
Code Samples
The following code sample shows use of the <elseif> element.
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
<form id="F1">
<field name="F_1">
<prompt>
Who would win in a fist fight, Oprah, Madonna, or James Brown?
</prompt>
<grammar xml:lang="en-us" root="myrule">
<rule id="myrule">
<one-of>
<item> Oprah </item>
<item> Madonna </item>
<item> James Brown </item>
</one-of>
</rule>
</grammar>
<filled>
<if cond="F_1=='Oprah'">
<prompt>
You really think Oprah could duke it out with the Godfather of soul?
</prompt>
<else />
<prompt>
James Brown would whip up on both Oprah and Madonna.
</prompt>
Page 60 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<elseif> Element
</if>
</filled>
</field>
</form>
</vxml>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
Page 61 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<emphasis> Element
<emphasis> Element
The <emphasis> element lets the developer specify the level, or stress, of any contained text. SSML elements are ignored by some
TTS engines. For more information, see Text-To-Speech Guide.
Syntax
The following code example shows the syntax for the <emphasis> element.
<emphasis level="strong">
Attribute Details
The following table describes the attributes for the <emphasis> element.
Required: false
level
Default: moderate
Specifies the amount of emphasis or de-emphasis that is assigned to the nested TTS. The
following values are permitted:
strong
moderate
reduced
none
Shadow Variables
None.
Parents
<audio> <choice> <emphasis> <enumerate> <option> <paragraph> <prompt> <prosody> <sentence>
Page 62 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<emphasis> Element
Children
<audio> <break> <emphasis> <enumerate> <mark> <phoneme> <prosody> <say-as> <value>
Code Samples
None.
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
Page 63 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<enumerate> Element
<enumerate> Element
The <enumerate> element is used to read a list of menu choices to the caller, using either TTS or a user-defined audio file. The
<enumerate> element may be used within the <prompt> and the <catch> elements associated with <menu> elements and with <field>
elements that contain <option> elements. An error.semantic event is thrown if an <enumerate> element is used elsewhere.
Syntax
The following code example shows the syntax for the <enumerate> element.
<enumerate />
Attribute Details
None.
Shadow Variables
None.
Parents
<audio> <block> <catch> <choice> <error> <field> <filled> <help> <if> <initial> <menu> <prompt>
<record>
Children
<audio> <break> <emphasis> <enumerate> <mark> <paragraph> <phoneme> <prosody> <say-as> <sentence>
<value>
Code Samples
The following code sample shows use of the <enumerate> element.
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
<menu id="menu">
<prompt>
Page 64 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<enumerate> Element
<form id="F1">
<block>
<prompt>
Eat it up, yummy!
</prompt>
</block>
</form>
</vxml>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
Page 65 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<error> Element
<error> Element
The <error> element is shorthand for the <catch event="error"> element, and catches all events that begin with error. For
more information, see Exceptions and Errors.
Syntax
The following code example shows the syntax for the <error> element.
<error cond="myCondCDATA" count="myCountCDATA">
Attribute Details
The following table describes the attributes for the <error> element.
Page 66 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<error> Element
Type: CDATA
Default: true
Specifies an expression which can be evaluated to true or false. The value of the
cond attribute must evaluate to true for any enclosed operations to be performed.
Valid Values: An ECMAScript Expression that evaluates to true or false.
Required: false
Type: CDATA
Default: none
Specifies the number of errors of this type that should have occurred for the enclosed
operations to be performed.
count
When an event is thrown for the first time, the <error> element with the count attribute
set to " 1 " is executed. On the second instance of the same event, the FIA looks for an
<error> element with the count attribute set to " 2 ". If none exists, the <error> element
with the count attribute set to " 1 " is executed again.
Shadow Variables
The following table describes the shadow variables for the <error> element.
_event
Contains the event name that caused the exception. This variable lets the developer log or submit the
resultant exception or error to a database, or to save it to another local variable.
_message
Contains the value of any user-defined message that is explicitly thrown. Currently, Voxeo has no
platform-defined messages for any standard events, such as error.badfetch or error.semantic, so
any caught messages must be user-defined.
Parents
<field> <form> <initial> <menu> <record> <subdialog> <transfer> <vxml>
Children
<assign> <audio> <clear> <disconnect> <enumerate> <exit> <goto> <if> <log> <prompt> <reprompt>
<return> <script> <submit> <throw> <value> <var>
Page 67 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<error> Element
Code Samples
The following code samples show use of the <error> element.
<!-- Error count-cond sample -->
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
<form id="F1">
</error>
<block>
<prompt>
Preparing to throw the error.
</prompt>
<throw event="error.MyError" />
</block>
Page 68 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<error> Element
</form>
</vxml>
<error>
<prompt>
The message is <value expr="_message" />.
The event is <value expr="_event" />.
</prompt>
</error>
<form id="F1">
<block>
<prompt>
Hey, lets throw an error, what do you say?
</prompt>
<throw event="error.MyError" message="'hey its an error'" />
</block>
</form>
</vxml>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
Page 69 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<example> Element
<example> Element
The <example> element defines an example phrase, which can be used to create a successful recognition result for a grammar. This
element is part of the Speech Recognition Grammar Specification, and is only usable within XML grammar constructs.
Syntax
The following code example shows the syntax for the <example> element.
<example />
Attribute Details
None.
Shadow Variables
None.
Parents
<rule>
Children
None.
Code Samples
The following code samples show use of the <example> element.
<!-- MyGram.xml-->
<?xml version= "1.0"?>
<grammar xml:lang="en-US" root="MYRULE">
<rule id="MYRULE" scope="public">
<example>
spanish for tripe
</example>
Page 70 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<example> Element
<example>
OR, spanish for really lame
</example>
<one-of>
<item>
menudo
<tag> out.F_1 = "menudo" </tag>
</item>
<item>
n sync
<tag> out.F_1 = "n sync" </tag>
</item>
</one-of>
</rule>
</grammar>
<form id="F1">
<field name="F_1">
<prompt>
Which boy band should be sent to work in the salt mines as punishment for subverting good taste in music?
Is it menudo, or N sync?
</prompt>
<grammar src="MyGram.xml" type="application/grammar-xml" />
s<filled>
<prompt>
Page 71 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<example> Element
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
Page 72 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<exit> Element
<exit> Element
The <exit> element terminates the current dialog and exits the browser. This element also lets the developer specify an expression
that can be sent back to a starting browser. Though the <exit> element is similar to the <disconnect> element, the <disconnect>
element has no inherent method of sending such information back to the browser. When the <exit> element is executed, it does not
throw a connection.disconnect event.
If the VoiceXML dialog was started by a CCXML browser, the <exit> element causes the VoiceXML browser to exit, and both a
dialog.exit event and the data held in the <exit> element attributes are returned to the CCXML browser.
Syntax
The following code example shows the syntax for the <exit> element.
<exit expr="myExprCDATA" namelist="myNamelistNMTOKEN" />
Attribute Details
The following table describes the attributes for the <exit> element.
Required: false
expr
Type: CDATA
Default: none
namelist
Type: NMTOKEN
Default: none
Shadow Variables
None.
Page 73 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<exit> Element
Parents
<block> <catch> <error> <filled> <help> <if> <noinput> <nomatch>
Children
None.
Code Samples
The following code sample shows use of the <exit> element.
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
Page 74 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<field> Element
<field> Element
The <field> element facilitates a dialog that lets the interpreter collect information from the user. Caller utterances are matched against
any active grammars, until the filled condition of the element is executed.
Syntax
The following code example shows the syntax for the <field> element.
<field cond="myCondCDATA" expr="myExprCDATA" modal="true" name="myNameCDATA" slot="mySlotNMTOKEN"
type="myTypeCDATA">
Page 75 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<field> Element
Attribute Details
The following table describes the attributes for the <field> element.
Page 76 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<field> Element
Required: false
cond
Type: CDATA
Default: true
Specifies an expression which can be evaluated to true or false. The value of the cond
attribute must evaluate to true for the element to be visited.
Valid Values: An ECMAScript Expression that evaluates to true or false.
Required: false
Type: CDATA
expr
Specifies the initial value of the element. If the attribute value is undefined, then the element is
visited by the FIA. Otherwise, the element is not visited until explicitly cleared.
Required: false
modal
Default: false
Specifies whether to use all active grammars while collecting this field, or only the grammars for
the specific field. The following values are permitted:
Required: false
Type: CDATA
Default: none
name
Specifies the ECMAScript variable name that holds the result. Each field name within a form must
be unique, else a fatal error.badfetch event is thrown.
Required: false
Type: NMTOKEN
slot
Specifies the name of a grammar Slot used to populate the variable. If no value is specified, then
the interpreter will assume it to be the same as the field name attribute.
Required: false
Type: CDATA
Default: none
type
Specifies the type of the field, which is the name of a platform-defined built-in grammar. For more
information, see GSL Built-in Grammar Types.
Page 77 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<field> Element
Shadow Variables
The following table describes the shadow variables for the <field> element.
name$.utterance
name$.inputmode
Contains the mode in which user input was provided, either dtmf or voice.
name$.interpretation
name$.confidence
Contains the confidence level for the field, which ranges from 0.0 to 1.0. A value of 0.0
indicates minimum confidence, and a value of 1.0 indicates maximum confidence.
Parents
<form>
Children
<audio> <catch> <enumerate> <error> <filled> <foreach> <grammar> <help> <link> <noinput> <nomatch>
<option> <prompt> <property> <value>
Code Samples
The following code samples show use of the <field> element.
<!-- Field cond-expr sample -->
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
<form id="F1">
<field name="F_1" expr="'SomeValue'" cond="false">
<grammar xml:lang="en-us" root="myrule">
<rule id="myrule">
<item> Garbage </item>
</rule>
Page 78 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<field> Element
</grammar>
<prompt>
The expression is not set to undefined,
and the condition is set to false. Therefore, this
field will never be visited.
</prompt>
</field>
<prompt>
The expression is set to undefined,
and the condition is set to true. Therefore, this
field will be visited. You may now say garbage with impunity.
</prompt>
Page 79 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<field> Element
</field>
<filled namelist="F_3">
<prompt>
You said garbage.
</prompt>
</filled>
</form>
</vxml>
<form id="F1">
<grammar xml:lang="en-us" root="myrule">
<rule id="myrule" scope="public">
<item>
estrada
<tag> out.F_1 = "estrada"</tag>
</item>
</rule>
</grammar>
<prompt>
Page 80 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<field> Element
<form id="F1">
<!-- ***************************************************************** -->
<!-- for purposes of simplicity, we will use the built-in boolean type -->
Page 81 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<field> Element
<filled>
<prompt>
You said <value expr="F_1"/>.
</prompt>
</filled>
</field>
</form>
</vxml>
Page 82 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<field> Element
<form id="F1">
<field name="F_1" slot="MySlot">
<grammar src="Grammar.xml" type="application/grammar-xml" />
<prompt>
Who is the coolest of the three stooges?
</prompt>
<filled>
<prompt>
You said <value expr="F_1" />
</prompt>
</filled>
</field>
<filled>
<prompt>
You said <value expr="F_2" />
</prompt>
</filled>
</field>
</form>
</vxml>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Page 83 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<field> Element
Voxeo Support
Page 84 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<filled> Element
<filled> Element
The <filled> element specifies actions to take when a grammar match occurs. Once the interpreter recognizes a valid match for any or
all of the variables specified in the <filled> element namelist attribute, the <filled> element then executes any code contained within
it.
Syntax
The following code example shows the syntax for the <filled> element.
<filled mode="all" namelist="myNamelistNMTOKEN">
Attribute Details
The following table describes the attributes for the <filled> element.
Page 85 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<filled> Element
Required: false
mode
Default: all
Specifies when the enclosed operations in the element execute. The following values
are permitted:
any - The element executes as soon as a valid grammar match occurs for any
variables specified in the namelist attribute.
all - The element executes only when a valid grammar match occurs for all
variables specified in the namelist attribute.
Required: false
Type: NMTOKEN
namelist
Specifies a space-separated list of the input items to trigger on. If a <filled> element is
contained within a form, the namelist attribute defaults to the names of the <field>
elements. If the namelist attribute is specified within a <filled> element that is
contained by an input item, such as a <field> element, the interpreter throws a fatal
error.badfetch event.
Shadow Variables
None.
Parents
<field> <form> <record> <subdialog> <transfer>
Children
<assign> <audio> <clear> <disconnect> <enumerate> <exit> <goto> <if> <log> <prompt> <reprompt>
<return> <script> <submit> <throw> <value> <var>
Code Samples
The following code samples show use of the <filled> element.
<!-- Filled mode sample -->
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
Page 86 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<filled> Element
<form id="F1">
<field name="F_1">
<grammar xml:lang="en-us" root="myrule">
<rule id="myrule">
<one-of>
<item> Yes </item>
<item> No </item>
<item> ha ha </item>
</one-of>
</rule>
</grammar>
<prompt>
Do you love this tutorial?
</prompt>
<filled mode="any">
<prompt>
You must have filled one field.
</prompt>
</filled>
</field>
<field name="F_2">
<grammar xml:lang="en-us" root="myrule">
<rule id="myrule">
<one-of>
<item> Yes </item>
<item> No </item>
<item> Maybe </item>
</one-of>
</rule>
Page 87 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<filled> Element
</grammar>
<prompt>
Do you think it will rain today?
</prompt>
</field>
<filled mode="all">
<prompt>
You must have filled both fields.
</prompt>
</filled>
</form>
</vxml>
<form id="F1">
<field name="F_1">
<grammar xml:lang="en-us" root="myrule">
<rule id="myrule">
<one-of>
<item>
Very <item repeat="0-1"> scary </item>
</item>
<item>
Not very <item repeat="0-1"> scary </item>
</item>
<item>
I live in fear
Page 88 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<filled> Element
</item>
</one-of>
</rule>
</grammar>
<prompt>
Star Trek fans. How scary are they?
</prompt>
</field>
<field name="F_2">
<grammar xml:lang="en-us" root="myrule">
<rule id="myrule">
<one-of>
<item> Yes </item>
<item> No </item>
</one-of>
</rule>
</grammar>
<prompt>
Are you a Star Trek fan?
</prompt>
</field>
Page 89 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<filled> Element
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
Page 90 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<foreach> Element
<foreach> Element
The <foreach> element lets the developer loop through items in an array. This element may be used within executable content and
within a <prompt> element. When the <foreach> element is used within a <prompt> element, it can only contain elements that are
valid within the <enumerate> element.
Syntax
The following code example shows the syntax for the <foreach> element.
<foreach array="myArrayCDATA" item="myItemNMTOKEN">
Attribute Details
The following table describes the attributes for the <foreach> element.
Required: true
array
Type: CDATA
Default: none
Specifies the name of the array to iterate over. Failure to specify this attribute results in an
error.semantic event being thrown.
Valid Values: An ECMAScript expression that evaluates to an ECMAScript array.
Required: true
Type: NMTOKEN
Default: none
item
Specifies the name of the variable that stores each array value as the array is iterated
within the loop.
Shadow Variables
None.
Parents
<block> <catch> <error> <filled> <foreach> <help> <if> <noinput> <nomatch> <prompt>
Page 91 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<foreach> Element
Children
<assign> <audio> <break> <clear> <data> <disconnect> <enumerate> <exit> <foreach> <goto> <if>
<log> <mark> <prompt> <reprompt> <return> <script> <submit> <throw> <value> <var>
Code Samples
The following code sample shows use of the <foreach> element.
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
<form id="F1">
<block>
<prompt>
Welcome to ABC Frozen Yogurt.
</prompt>
<script>
var arrayFlavors = ["mango", "cotton candy", "apple pie",
"cheesecake", "raspberry" ];
</script>
<prompt>
The current flavors of the week are
<break />
</prompt>
<prompt>
Page 92 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<foreach> Element
Thank you for calling ABC Frozen Yogurt. We hope you stop by soon.
</prompt>
</block>
</form>
</vxml>
foreach.zip
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
Page 93 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<form> Element
<form> Element
The <form> element is a container for all field items, such as a <field> element or a <subdialog> element, and for all control items,
such as a <block> element or an <initial> element.
Syntax
The following code example shows the syntax for the <form> element.
<form id="myID" scope="dialog">
Attribute Details
The following table describes the attributes for the <form> element.
Page 94 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<form> Element
Required: false
Type: ID
Default: none
id
Specifies the navigational identifier of the <form> element. Once specified, the form can
be referenced within the document or from another document.
Required: false
scope
Default: dialog
Specifies the scope of any grammars contained within the form. The following values are
permitted:
dialog - All form grammars are only active within the current form
The scope attribute of a <form> element takes precedence over the default scope.
Required: false
voxeo:cleardtmf
Default: true
Clears the DTMF buffer when the form is entered. The following values are permitted:
Shadow Variables
None.
Parents
<vxml>
Children
<block> <catch> <data> <error> <field> <filled> <grammar> <help> <initial> <link> <noinput>
<nomatch> <property> <record> <script> <subdialog> <transfer> <var>
Page 95 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<form> Element
Code Samples
The following code sample shows use of the <form> element.
<?xml version="1.0" encoding="UTF-8" ?>
<vxml version="2.1">
<!-- The utterance of 'david hasselhoff' anywhere in the application will fill this
namelist-->
<filled namelist="MySlot">
<goto next="#F3" />
</filled>
<field name="F_1">
<grammar xml:lang="en-us" root="myrule">
<rule id="myrule">
<item> Moe Green </item>
</rule>
</grammar>
<prompt>
Who should get the next crack at playing Hamlet?
His initials are d h.
</prompt>
</field>
Page 96 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<form> Element
<filled namelist="F_1">
<prompt>
You said <value expr="F_1" />. Really?
</prompt>
<goto next="#F2" />
</filled>
<!-- This empty field matching the form grammar's slot is required -->
<field name="MySlot" />
</form>
<prompt>
Who is the biggest celebrity in Germany?
</prompt>
<filled>
<prompt>
I dont think so.
</prompt>
</filled>
</field>
<!-- This empty field matching the form grammar's slot is required. -->
Page 97 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<form> Element
<form id="F3">
<block>
<prompt>
Our form level grammar was filled.
</prompt>
</block>
</form>
</vxml>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
Page 98 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<goto> Element
<goto> Element
The <goto> element is used to transition application execution to another element or document. The <goto> element can transition to a
specific form within the current form, dialog in the current document, or to a separate document. Additionally, it can transition execution
to a a specific form within a separate document.
Syntax
The following code example shows the syntax for the <goto> element.
<goto expr="myExprCDATA" expritem="myExprItemCDATA" fetchaudio="myFetchAudioURI" fetchhint="safe"
fetchtimeout="myFetchTimeoutCDATA" maxage="myMaxAgeCDATA" maxstale="myMaxStaleCDATA"
next="myNextCDATA" nextitem="myNextItemNMTOKEN" />
Page 99 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<goto> Element
Attribute Details
The following table describes the attributes for the <goto> element.
Required: false
expr
Type: CDATA
Default: none
Specifies an ECMAScript expression that evaluates to the dialog or document URI to transition
to.
Constraints: Exactly one of the expr, expritem, next, or nextitem attributes may be
specified.
Required: false
expritem
Type: CDATA
Default: none
Specifies an ECMAScript expression that evaluates to the name of the specific form item in the
current document to transition to.
Constraints: Exactly one of the expr, expritem, next, or nextitem attributes may be
specified.
Required: false
Type: URI
Default: none
fetchaudio
Specifies the URI of the audio file to play to the caller in the event of an extended document
fetch. This attribute allows audio to be played to the caller while the fetch is being made,
instead of silence.
Required: false
fetchhint
Default: safe
Specifies when the resource should be fetched during application execution. The following
values are permitted:
safe - Only fetch the resource when it is specifically called in the application
Required: false
Type: CDATA
Default: none
<goto> Element
Valid Values: An ECMAScript Expression that returns a valid time value for the request.
Required: false
Type: CDATA
Default: none
Type: CDATA
Default: none
Examples
next
Full URI
<goto next="http://MyServer.com/MyFile.vxml" />
Relative URI
<goto next="MyFile.vxml" />
Constraints: Exactly one of the expr, expritem, next, or nextitem attributes may be
specified.
Required: false
nextitem
Type: NMTOKEN
Default: none
Specifies the specific form item within the current document to transition to.
Constraints: Exactly one of the expr, expritem, next, or nextitem attributes may be
specified.
<goto> Element
Shadow Variables
None.
Parents
<block> <catch> <error> <filled> <help> <if> <noinput> <nomatch>
Children
None.
Code Samples
The following code samples show use of the <goto> element.
<!-- Goto expr-fetchaudio sample -->
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
<goto> Element
<block name="B_2">
<prompt>
Preparing to go to the next form item variable.
</prompt>
<block name="B_3">
<prompt>
This block will be skipped, and will be the last block executed by the FIA.
</prompt>
</block>
<block name="B_4">
<prompt>
Test successful.
</prompt>
</block>
</form>
</vxml>
<goto> Element
<form id="F1">
<block name="B_1">
<prompt>
Preparing to go to another page.
</prompt>
<form id="F1">
<block name="B_1">
<prompt>
Preparing to go to another page.
</prompt>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Page 104 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<goto> Element
Voxeo Support
<grammar> Element
<grammar> Element
The <grammar> element lets the developer specify a GSL or XML recognition grammar for either voice or DTMF input. Grammars
may be defined inline, or as an external file. For more information, see GSL Grammars and grXML Grammars.
Syntax
The following code example shows the syntax for the <grammar> element.
<grammar fetchhint="safe" fetchtimeout="myFetchTimeoutCDATA" maxage="myMaxAgeCDATA"
maxstale="myMaxStaleCDATA" mode="dtmf" root="myRootIDREF" scope="dialog" src="mySrcURI"
srcexpr="mySrcExprCDATA" tag-format="myTagFormatCDATA" type="application/grammar-xml"
version="1.0" voxeo:useuri="true" weight="myWeightCDATA" xml:base="myXmlBaseCDATA"
xml:lang="myXmlLangNMTOKEN" xmlns="http://www.w3.org/2001/06/grammar">
<grammar> Element
Attribute Details
The following table describes the attributes for the <grammar> element.
Required: false
fetchhint
Default: safe
Specifies when the resource should be fetched during application execution. The following values
are permitted:
safe - Only fetch the resource when it is specifically called in the application
Required: false
fetchtimeout
Type: CDATA
Default: 5s
Specifies how long, in seconds or milliseconds, that the interpreter should wait for the content to
be returned before reverting to backup TTS if defined, or before the application skips the contents
of the <audio> element, if no backup TTS is defined.
Valid Values: A character string in CSS2 format, for example, 3s, 850ms, 0.7s, .5s, and +1.5s.
Required: false
Type: CDATA
Default: none
Type: CDATA
Default: none
Default: voice
<grammar> Element
Specifies the mode of the grammar. The following values are permitted:
dtmf
voice
Required: false
root
Type: IDREF
Default: none
Default: none
Specifies the scope of the grammar. For input item and link grammars, the scope cannot be
specified. The following values are permitted:
scope
Note: The scope attribute can only be used in a grammar element if the element is
a child of the vxml element or form element, otherwise an error.badfetch event is
thrown.
Type: URI
Default: none
<grammar> Element
</item>
</rule>
</grammar>
Similarly, to declare an inline grXML subgrammar, the src attribute is also not used. The
following code example shows an inline grXML subgrammar.
<?xml version= "1.0"?>
<grammar xml:lang="en-us" root="TOPLEVEL">
src
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<grammar> Element
<item> jovi <tag> out="jovi ";</tag> </item>
</one-of>
</rule>
</grammar>
Constraints: Exactly one of the srcexpr and src attributes may be specified.
Required: false
srcexpr
Type: CDATA
Default: none
Specifies an ECMAScript expression that evaluates to the target URI of the grammar file.
Constraints: Exactly one of the srcexpr and src attributes may be specified, or an inline
grammar.
Required: false
Type: CDATA
Default: semantics/1.0
tag-format
Specifies the grammar tag format of an inline XML grammar construct. The only permitted value
is semantics/1.0.
Required: true
Default: none
Specifies the preferred MIME media type of the grammar, for example:
type
application/grammar-xml
application/gsl
application/srgs
application/srgs+xml
text/gsl
text/plain
The media type defined must be supported by the ASR engine you use.
Required: false
Type: NMTOKEN
Default: 1.0
version
Specifies the version of the grammar. The only permitted value is 1.0.
Required: false
Default: false
<grammar> Element
Specifies whether to bypass the Prophecy grammar translator and send the URI directly to an
external recognizer, such as Nuance, or Loquendo. The following values are permitted:
voxeo:useuri
false - Indicates that the Prophecy grammar translator should not be bypassed
This attribute is useful for large grammars that can be compiled and cached by an external
recognizer.
Required: false
weight
Type: CDATA
Default:
Type: CDATA
Default: none
xml:base
Specifies the base URI of the document. All relative URIs contained in the document are derived
from the xml:base attribute value. If omitted, the platform assumes that the current URI is the
value of the xml:base attribute.
Required: true
Type: NMTOKEN
Default: en-us
xml:lang
Specifies the language and locale information of the element. If omitted, this value is inherited
from the document hierarchy, or ultimately from the platform default. The Prophecy platform
default is en-us.
Required: false
Type: URI
xmlns
Default:
http://www.w3.org/20
01/06/grammar
<grammar> Element
Defines the grXML namespace. All elements and attributes belong to this namespace. This
attribute is required when using grXML grammars that do not use Voxeo Prophecy, and the only
permitted value is http://www.w3.org/2001/06/grammar.
Shadow Variables
None.
Parents
<choice> <field> <form> <link> <record> <transfer>
Children
<rule>
Code Samples
The following code samples show use of the <grammar> element.
<!-- Grammar xml:lang-version-type-mode sample -->
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
<form id="F1">
<field name="F_1">
<prompt>
What are the chances of the Michael Moore making an unbiased, relevant
documentary movie in his lifetime?
</prompt>
<grammar> Element
</rule>
</grammar>
</field>
<filled>
<prompt>
I would have to agree with you, sir!
</prompt>
</filled>
</form>
</vxml>
<!-- The utterance of 'david hasselhoff' anywhere in the application will fill this
namelist-->
<filled namelist="MySlot">
<goto next="#F3" />
</filled>
<field name="F_1">
Page 113 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<grammar> Element
<prompt>
Who should get the next crack at playing Hamlet?
His initials are d h.
</prompt>
</field>
<filled namelist="F_1">
<prompt>
You said <value expr="F_1" />. Are you insane?
</prompt>
<goto next="#F2" />
</filled>
<!-- this empty field matching the form grammar's slot is required -->
<field name="MySlot" />
</form>
<prompt>
<grammar> Element
<filled>
<prompt>
Now thats just crazy talk.
</prompt>
</filled>
</field>
<!-- This empty field matching the form grammar's slot is required. -->
<field name="MySlot" />
</form>
<form id="F3">
<block>
<prompt>
Our form level grammar was filled.
</prompt>
</block>
</form>
</vxml>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
<help> Element
<help> Element
The <help> element is shorthand for the <catch event="help"> element, and catches all help events.
Syntax
The following code example shows the syntax for the <help> element.
<help cond="myCondCDATA" count="myCountCDATA">
Attribute Details
The following table describes the attributes for the <help> element.
Required: false
cond
Type: CDATA
Default: true
Specifies an expression which can be evaluated to true or false. The value of the
cond attribute must evaluate to true for any enclosed operations to be performed.
Valid Values: An ECMAScript Expression that evaluates to true or false.
Required: false
count
Type: CDATA
Default: none
Specifies the number of errors of this type that should have occurred for the enclosed
operations to be performed.
When an event is thrown for the first time, the <help> element with the count attribute
set to " 1 " is executed. On the second instance of the same event, the FIA looks for a
<help> element with the count attribute set to " 2 ". If none exists, the <help> element
with the count attribute set to " 1 " is executed again.
Shadow Variables
The following table describes the shadow variables for the <help> element.
_event
Contains the event name that caused the exception. This variable lets the developer log or
submit the resultant exception or error to a database, or save it to another local variable.
<help> Element
Parents
<field> <form> <initial> <menu> <record> <subdialog> <transfer> <vxml>
Children
<assign> <audio> <clear> <disconnect> <enumerate> <exit> <goto> <if> <log> <prompt> <reprompt>
<return> <script> <submit> <throw> <value> <var>
Code Samples
The following code samples show use of the <help> element.
<!-- Help count-cond sample -->
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
<field name="F_1">
<grammar type="text/gsl">
[(slappy white)]
</grammar>
<prompt>
Say help here.
</prompt>
<help> Element
<filled>
<prompt>why did you fill the field, you dummy?</prompt>
</filled>
</form>
</vxml>
<help> Element
<form id="F1">
<field name="F_1">
<grammar type="text/gsl">
[dummy]
</grammar>
<prompt>
Say help to check out the shadow variable values.
</prompt>
<filled>
<prompt>
You really shouldnt have said dummy.
</prompt>
</filled>
</field>
</form>
</vxml>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
<if> Element
<if> Element
The <if> element provides a method to utilize conditional logic expressions to change the control flow within the application based on
user utterances, variable values, or events.
Syntax
The following code example shows the syntax for the <if> element.
<if cond="myCondCDATA">
Attribute Details
The following table describes the attributes for the <if> element.
Required: true
Type: CDATA
Default: none
cond
Specifies an expression which can be evaluated to true or false. The value of the
cond attribute must evaluate to true for any enclosed operations to be performed.
Shadow Variables
None.
Parents
<block> <catch> <error> <filled> <help> <if> <noinput> <nomatch>
Children
<assign> <audio> <clear> <data> <disconnect> <else> <elseif> <enumerate> <exit> <goto> <if> <log>
<prompt> <reprompt> <return> <script> <submit> <throw> <value> <var>
Code Samples
The following code sample shows use of the <if> element.
<?xml version="1.0" encoding="UTF-8"?>
<if> Element
<vxml version="2.1">
<form id="F1">
<field name="F_1">
<prompt>
Who would win in a fist fight, Oprah, Madonna, or James Brown?
</prompt>
<grammar xml:lang="en-us" root="myrule">
<rule id="myrule">
<one-of>
<item> Oprah </item>
<item> Madonna </item>
<item> James Brown </item>
</one-of>
</rule>
</grammar>
<filled>
<if cond="F_1=='Oprah'">
<prompt>
You really think Oprah could duke it out with the Godfather of soul?
</prompt>
<else />
<prompt>
James Brown would whip up on both Oprah and Madonna.
</prompt>
</if>
</filled>
</field>
<if> Element
</form>
</vxml>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
<initial> Element
<initial> Element
The <initial> element is used in mixed-initiative dialogs, in which the first utterances from the caller dictate application flow. This
element allows the caller to fill in form-wide information with only one utterance. Usually, the first prompt in a mixed initiative dialog
queries the caller for all information, and then only executes the individual fields when it determines that all field variables have not
been filled. The <initial> element does not contain any grammars or filled events of its own; rather, it relies on the grammars and filled
elements of each individual field.
Syntax
The following code example shows the syntax for the <initial> element.
<initial cond="myCondCDATA" expr="myExprCDATA" name="myNameNMTOKEN">
Attribute Details
The following table describes the attributes for the <initial> element.
<initial> Element
Type: CDATA
Default: true
cond
Specifies an expression which can be evaluated to true or false. The value of the cond attribute
must evaluate to true for any enclosed operations to be performed.
Required: false
Type: CDATA
Default: ECMAScript
undefined
expr
Specifies the initial value of the element. If the attribute value is undefined, then the element is visited
by the FIA. Otherwise, the element is not visited until explicitly cleared.
Required: false
Type: NMTOKEN
name
Specifies the name of the ECMAScript form item variable. Each name assigned to an <initial> element
must be unique, otherwise a fatal error.badfetch event is thrown. If unspecified, this attribute
defaults to an inaccessible internal variable.
Shadow Variables
None.
Parents
<form>
Children
<audio> <catch> <enumerate> <error> <help> <link> <noinput> <nomatch> <prompt> <property> <value>
Code Samples
The following code sample shows use of the <initial> element.
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
<form id="F1">
<grammar xml:lang="en-us" root="TOPLEVEL">
<initial> Element
<rule id="TOPLEVEL">
<item> dummy </item>
</rule>
</grammar>
<block>
<goto next="#F2" />
</block>
</form>
<form id="F2">
<grammar xml:lang="en-us" root = "myrule" mode="dtmf">
<rule id="myrule" scope="public">
<item>
1
<tag> out.F_1 = "1" </tag>
</item>
</rule>
</grammar>
<initial> Element
</prompt>
<nomatch count="1">
<prompt>
Okay, I will ask you for information one piece at a time.
</prompt>
<assign name="Initial_2" expr="true" />
<reprompt />
</nomatch>
<noinput>
<prompt>
Okay, the quiet type, eh?
I will ask you for information one piece at a time.
</prompt>
<assign name="Initial_2" expr="true" />
<reprompt />
</noinput>
</initial>
<field name="F_1">
<prompt>
Try pressing DTMF 1.
</prompt>
</field>
<filled>
<prompt>
Congratulations, the initial test was successful.
</prompt>
</filled>
</form>
</vxml>
<initial> Element
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
<item> Element
<item> Element
The <item> element defines a valid utterance match within an XML grammar. This element also allows repeats and probability
weighting to be added to the utterance in question.
Syntax
The following code example shows the syntax for the <item> element.
<item repeat="myItemNMTOKEN" repeat-prob="myRepeatProbNMTOKEN" weight="myWeightNMTOKEN"
xml:lang="myXmlLangCDATA">
<item> Element
Attribute Details
The following table describes the attributes for the <item> element.
<item> Element
Required: false
Type: NMTOKEN
Default: none
Specifies the number of times, if any, that the utterance is permitted to be repeated by the caller. The
following formats are permitted for this attribute value:
repeat
Required: false
repeat-prob
Type: NMTOKEN
Default: none
Specifies a probability that an utterance will be repeated by the caller. The value should be a number
ranging from 0.0, indicating the least likely to be repeated, to 1.0, indicating the most likely to be
repeated.
Constraints: The repeat-prob attribute must be specified in conjunction with the repeat attribute.
Otherwise, it is ignored.
Required: false
weight
Type: NMTOKEN
Default: none
Specifies the increased or decreased likelihood for a particular grammar match, as a multiplying factor.
For example, a weight of 1.0 is equivalent to providing no weight attribute value, a weight greater
than 1.0 positively biases the alternative, and a weight of less than 1.0 negatively biases the
alternative.
Constraints: The <item> element must be enclosed by the <one-of> element, otherwise the weight
attribute value is ignored.
Required: false
Type: CDATA
Default: en-us
xml:lang
Specifies the language and locale information of the element. If omitted, this value is inherited from the
document hierarchy, or ultimately from the platform default. The Prophecy platform default is en-us.
<item> Element
Shadow Variables
None.
Parents
<item> <one-of> <rule>
Children
<item> <one-of> <ruleref> <tag> <token>
Code Samples
The following code samples show use of the <item> element.
<!-- ItemWeightCode.vxml -->
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
<form id="F_1">
<field name="MySlot">
<prompt>
What is the best soda in the world?
</prompt>
<noinput>
<prompt>
I did not hear you. Please try again.
</prompt>
<reprompt />
</noinput>
<nomatch>
<item> Element
<prompt>
I did not understand. Please try again.
</prompt>
<reprompt />
</nomatch>
<filled>
<prompt>
<value expr="MySlot" />
</prompt>
</filled>
</field>
</form>
</vxml>
<item weight="0.2">
Stripe
<tag> out.MySlot ="This is not even a soda.";</tag>
</item>
<item weight="1.9">
Sprite
<tag> out.MySlot ="Sprite is the best soda in the world.";</tag>
</item>
<item weight="0.8">
Sight
<item> Element
<tag> out.MySlot ="Yes, the sight of the best soda in the world is beautiful.";</tag>
</item>
<item weight="1.7">
Coke
<tag> out.MySlot="Close. Coke is really good but Sprite is still better.";</tag>
</item>
<item weight="0.7">
Joke
<tag> out.MySlot="Jokes are funny but they are not sodas.";</tag>
</item>
</one-of>
</rule>
</grammar>
<form id="F1">
<field name="F_1">
<prompt>
What was Marlon Brandos famous last line in the movie Apocalypse Now?
</prompt>
<filled>
<prompt>
Yes, thats right. The horror.
</prompt>
<item> Element
</filled>
</field>
</form>
</vxml>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
<link> Element
<link> Element
The <link> element lets the developer implement a document or application scoped grammar and transition or event handler for caller
input. Upon a successful link grammar recognition, the element can either throw an event, transition the caller to another form or
document, or transition the caller to a specific form within another document. Grammars contained within the link element are always
scoped to the parent element, thus specifying a scope for a link grammar is not permitted.
Note: At least one voice recognition field or menu must be present for the link to execute on a given page.
Syntax
The following code example shows the syntax for the <link> element.
<link dtmf="myDtmfCDATA" event="myEventNMTOKEN" eventexpr="myEventExprCDATA" expr="myExprCDATA"
fetchaudio="myFetchAudioURI" fetchhint="safe" fetchtimeout="myFetchTimeoutCDATA"
maxage="myMaxAgeCDATA" maxstale="myMaxStaleCDATA" message="myMessageCDATA"
messageexpr="myMessageExprCDATA" next="myNextURI">
<link> Element
Attribute Details
The following table describes the attributes for the <link> element.
Required: false
Type: CDATA
Default: none
dtmf
Specifies the DTMF sequence for this link.
Required: false
event
Type: NMTOKEN
Default: none
eventexpr
Type: CDATA
Default: none
Specifies an ECMAScript expression that evaluates to the event that is thrown to the
application upon a link grammar match.
Constraints: Exactly one of the event, eventexpr, expr, or next attributes must
be specified.
Required: false
expr
Type: CDATA
Default: none
Type: URI
Default: none
fetchaudio
Specifies the URI of the audio file to play to the caller in the event of an extended
document fetch. This attribute allows audio to be played to the caller while the fetch is
being made, instead of silence.
Required: false
fetchhint
Default: safe
Specifies when the resource should be fetched during application execution. The
following values are permitted:
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<link> Element
Required: false
fetchtimeout
Type: CDATA
Default: 5s
Specifies how long, in seconds or milliseconds, that the interpreter should wait for the
content to be returned before reverting to backup TTS if defined, or before the
application skips the contents of the <audio> element, if no backup TTS is defined.
Valid Values: A character string in CSS2 format, for example, 3s, 850ms, 0.7s, .5s,
and +1.5s.
Required: false
Type: CDATA
Default: none
We do not recommend that you rely on this attribute for cache control; caching is
always best controlled by the response headers of the hosting server. If no headers
are specified, then no cache control is present, regardless of the value set for the
maxage attribute.
Valid Values: An ECMAScript Expression that returns a valid time value for the
request.
Required: false
Type: CDATA
Default: none
We do not recommend that you rely on this attribute for cache control; caching is
always best controlled by the response headers of the hosting server. If no headers
are specified, then no cache control is present, regardless of the value set for the
maxstale attribute.
Valid Values: An ECMAScript Expression that returns a valid time value for the
request.
Required: false
message
Type: CDATA
Default: none
Specifies a descriptive message about the event that is thrown. The message is
accessible in the <catch> element _message shadow variable.
Constraints: Exactly one of the message, or messageexpr attributes may be
specified.
<link> Element
Required: false
messageexpr
Type: CDATA
Default: none
Type: URI
Default: none
Specifies the dialog or document URI that the application transitions to upon a link
grammar match.
Examples
Full URI
next
<link next="http://MyServer.com/MyFile.vxml" />
Relative URI
<link next="MyFile.vxml" />
Constraints: Exactly one of the event, eventexpr, expr, or next attributes must
be specified.
Shadow Variables
None.
Parents
<field> <form> <initial> <vxml>
<link> Element
Children
<grammar>
Code Samples
The following code samples show use of the <link> element.
<!-- Link event-message sample -->
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
<catch event="hell">
<prompt>
<value expr="_message" />
</prompt>
</catch>
<link event="hell" message="'wow. you sure caught hell for that answer'">
<grammar xml:lang="en-us" root="TOPLEVEL">
<rule id="TOPLEVEL">
<one-of>
<item>
Democrats
</item>
<item>
Republicans
</item>
</one-of>
</rule>
</grammar>
</link>
<form id="F1">
<field name="F_1">
<link> Element
<prompt>
Who should win the next election, democrats or republicans?
</prompt>
<filled>
<prompt>
Now why would someone say dummy?
</prompt>
</filled>
</form>
</vxml>
<link> Element
</rule>
</grammar>
</link>
<form id="F1">
<field name="F_1">
<prompt>
Say Estrada to kick off the link.
</prompt>
<grammar xml:lang="en-us" root="myrule">
<rule id="myrule">
<item>
Dummy
<tag>out.F_1 = "dummy"</tag>
</item>
</rule>
</grammar>
</field>
<filled>
<prompt>
Now why would someone say dummy?
</prompt>
</filled>
</form>
</vxml>
<link> Element
<form id="F1">
<field name="F_1">
<prompt>
Say Estrada to kick off the link.
</prompt>
<filled>
<prompt>
Now why would someone say dummy?
</prompt>
</filled>
</form>
</vxml>
<link> Element
<form id="F1">
<field name="F_1">
<link> Element
<prompt>
Who should win the next election?
You can press 1 or say democrats, or
You can press 2 or say republicans.
</prompt>
<filled>
<prompt>
Now why would someone say dummy?
</prompt>
</filled>
</form>
</vxml>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
<log> Element
<log> Element
The <log> element allows the application to generate a logging or debug message to the Voxeo Logger. Use of log statements placed
within applications can assist when tracking variable values and errors in applications.
Syntax
The following code example shows the syntax for the <log> element.
<log expr="myExprCDATA" label="myExprCDATA" />
Attribute Details
The following table describes the attributes for the <log> element.
Required: false
Type: CDATA
Default: none
expr
Specifies a character string to be logged. The value of the expr attribute is output in the Voxeo
Realtime Logger when the <log> element is encountered.
Required: false
Type: CDATA
Default: none
label
Specifies a character string that indicates the reason for the <log> element.
Shadow Variables
None.
Parents
<block> <catch> <error> <filled> <help> <if> <noinput> <nomatch>
Children
<value>
<log> Element
Code Samples
The following code sample shows use of the <log> element.
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
<form id="F1">
<block>
<var name="SomeVar" expr="'NSMA'" />
<prompt>
If you look in the Voxeo Logger, you will
see the value of the log statements.
</prompt>
</block>
</form>
</vxml>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
<mark> Element
<mark> Element
The <mark> element is used to insert markers into output streams for asynchronous notification. SSML elements are ignored by some
TTS engines. For more information, see Text-To-Speech Guide.
Syntax
The following code examples show the syntax for the <mark> element.
<mark name="myNameID">
- or <mark nameexpr="myNameCDATA">
Attribute Details
The following table describes the attributes for the <mark> element.
Required: false
Type: ID
Default: none
name
Specifies the name of the marker.
Constraints: Exactly one of the name and nameexpr attributes must be specified.
Required: false
Type: CDATA
Default: none
nameexpr
Specifies an ECMAScript expression that evaluates to the name of the mark when the prompt is
queued. If this attribute cannot be evaluated, an error.semantic event is thrown.
Constraints: Exactly one of the name and nameexpr attributes must be specified.
Shadow Variables
None.
<mark> Element
Parents
<audio> <choice> <emphasis> <enumerate> <option> <paragraph> <prompt> <prosody> <sentence>
Children
None.
Code Samples
None.
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
<media> Element
<media> Element
The <media> element extends the VoiceXML <audio> element to provide additional attributes. The Voxeo implementation of this
element adds attributes to control the sound level and speed of playback, based on the W3C VoiceXML 3.0 draft.
Syntax
The following code example shows the syntax for the <media> element.
<media soundLevel="+1.0dB" speed="90%">
Attribute Details
The following table describes the attributes for the <media> element.
Required: false
Default: +0.0dB
soundLevel
Specifies the audio gain defined in terms of decibels, or dB, levels. Setting this attribute to a large
negative number will mute the media. To reduce the media amplitude by 50% of its current level, you
can specify the attribute value -6.0dB. Similarly, to double the current media amplitude, specify the
attribute value +6.0dB. The maximum attribute value is +12.0dB.
Required: false
speed
Type: CDATA
Default: 100%
Specifies the speed at which to play the media, relative to the original speed. The pitch is affected when
this attribute is specified.
Valid Values: A positive real value, followed by a percent % symbol, within the range of 25% to 400%.
Shadow Variables
None.
<media> Element
Parents
<prompt>
Children
None.
Code Samples
The following code sample shows use of the <media> element.
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
<form id="F1">
<block>
<prompt bargein="true" xml:lang="en-US">
<media>
is
</media>
</media>
</prompt>
</block>
</form>
</vxml>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
<menu> Element
<menu> Element
The <menu> element is a shorthand element that emulates the <field>, <grammar>, and <goto> elements. The <menu> element
defines a set of choices for a caller, and allows for both implied DTMF and voice grammars. The voice browser permits a maximum of
20 choices per menu; exceeding this amount will throw a fatal error.badfetch event.
Syntax
The following code example shows the syntax for the <menu> element.
<menu dtmf="false" id="myID" scope="document" accept="exact">
<menu> Element
Attribute Details
The following table describes the attributes for the <menu> element.
Required: false
Default: false
Specifies whether to automatically assign DTMF values to the contained <choice> elements.
The following values are permitted:
dtmf
false - Does not automatically assign DTMF values to the contained <choice>
elements.
true - The first nine <choice> elements that have not explicitly specified the dtmf
attribute are given the implicit DTMF values " 1 ", " 2 ", and so forth. If there are
<choice> elements which have specified their own DTMF sequences to be
something other than " * ", " # ", or " 0 ", an error.badfetch event is thrown.
Required: false
Type: ID
Default: none
id
Specifies the navigational identifier of the menu. Once specified, the menu can be referenced
within the document.
Required: false
scope
Default: dialog
Specifies the scope of any grammars contained within the menu. The following values are
permitted:
dialog - All grammars contained are active only within the current menu.
document - All grammars contained are active throughout the current document.
Required: false
accept
Default: exact
approximate - The text of the <choice> elements in the <menu> element defines
an approximate recognition phrase.
exact - The text of the <choice> elements in the <menu> element defines the exact
phrase to be recognized.
<menu> Element
Shadow Variables
None.
Parents
<vxml>
Children
<audio> <catch> <choice> <enumerate> <error> <help> <noinput> <nomatch> <prompt> <property>
<script> <value>
Code Samples
The following code sample shows use of the <menu> element.
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
<menu> Element
<prompt>
lie za minell e is not nearly the most popular tabloid celebrity.
</prompt>
<prompt>
<enumerate>
For <value expr="_prompt" />, press <value expr="_dtmf" />
</enumerate>
</prompt>
<choice event="liza_event">
lie za manelly
</choice>
</menu>
<menu> Element
<choice event="elvis_event">
Elvis clone
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
<meta> Element
<meta> Element
The <meta> element is used to denote meta information about the document, or to specify HTTP response headers.
Syntax
The following code examples show the syntax for the <meta> element.
<meta name="myNameNMTOKEN" content="myContentCDATA" />
- or <meta http-equiv="myHttpEquivNMTOKEN" content="myContentCDATA" />
<meta> Element
Attribute Details
The following table describes the attributes for the <meta> element.
Required: false
Type: NMTOKEN
Default: none
Specifies the name of the metadata property. The Prophecy platform allows specialized error
handling through the following Voxeo-specific values:
name
maintainer - Upon application error, sends an error log to the email address
specified in the content attribute.
debug_flags - Sets the debugging flags to a custom level. For more information,
see the Property Guide.
Constraints: Exactly one of the name and http-equiv attributes must be specified.
Required: false
http-equiv
Type: NMTOKEN
Default: none
Specifies The http-equiv attribute specifies the name of the HTTP response header that should
be honored for a specified VoiceXML document.
Constraints: Exactly one of the name and http-equiv attributes must be specified.
Required: true
Type: CDATA
Default: none
content
Specifies the value of the metadata property.
Shadow Variables
None.
Parents
<vxml>
<meta> Element
Children
None.
Code Samples
The following code sample shows use of the <meta> element.
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
<meta name="maintainer" content="YOUR_EMAIL@HERE.COM" />
<meta name="author" content="Your Name" />
<meta name="copyright" content="2005 Voxeo Corporation" />
<meta name="generator" content="Notepad" />
<form>
<block>
<prompt>
This is a sample that contains the meta element.
</prompt>
</block>
</form>
</vxml>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
<noinput> Element
<noinput> Element
The <noinput> element is shorthand for the <catch event="noinput"> element. This element lets the developer assign event
handlers for when the application expects voice or DTMF input, but has received none from the caller.
Syntax
The following code example shows the syntax for the <noinput> element.
<noinput cond="myCondCDATA" count="myCountCDATA">
Attribute Details
The following table describes the attributes for the <noinput> element.
<noinput> Element
Type: CDATA
Default: true
Specifies an expression which can be evaluated to true or false. The value of the
cond attribute must evaluate to true for any enclosed operations to be performed.
Valid Values: An ECMAScript Expression that evaluates to true or false.
Required: false
Type: CDATA
Default: none
Specifies the number of errors of this type that should have occurred for the enclosed
operations to be performed.
count
When an event is thrown for the first time, the <noinput> element with the count
attribute set to " 1 " is executed. On the second instance of the same event, the FIA
looks for an <noinput> element with the count attribute set to " 2 ". If none exists, the
<noinput> element with the count attribute set to " 1 " is executed again.
Shadow Variables
The following table describes the shadow variables for the <noinput> element.
_event
Contains the event name that caused the exception. This variable lets the developer log or submit the
resultant exception or error to a database, or save it to another local variable.
_message
Contains the value of any user-defined message that is explicitly thrown. Currently, Voxeo plus size has no
platform-defined messages for any standard events, such as error.badfetch or error.semantic, so
any caught messages must be user-defined.
Parents
<field> <form> <initial> <menu> <record> <subdialog> <transfer> <vxml>
Children
<assign> <audio> <clear> <exit> <goto> <if> <reprompt> <return> <script>
<noinput> Element
Code Samples
The following code samples show use of the <noinput> element.
<!-- Noinput count-cond sample -->
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
<form id="F1">
<field name="F_1">
<noinput cond="false" count="1">
<prompt>
This handler will never get executed,
because the condition is set to false.
</prompt>
</noinput>
<noinput> Element
<prompt>
Dont say anything.
</prompt>
<filled>
<prompt>
Sheesh, keep quiet!
</prompt>
</filled>
</field>
</form>
</vxml>
<form id="F1">
<field name="F_1">
<noinput>
<prompt>
<!-- These are undefined, as no value is inherently applied -->
The message is <value expr="_message"/>.
<!-- ********************************************************** -->
The event is <value expr="_event"/>.
</prompt>
</noinput>
<noinput> Element
</rule>
</grammar>
<prompt>
Don't say anything.
</prompt>
<filled>
<prompt>
Sheesh, keep quiet!
</prompt>
</filled>
</field>
</form>
</vxml>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
<nomatch> Element
<nomatch> Element
The <nomatch> element is shorthand for the <catch event="nomatch"> element. This element lets the developer assign handlers
for when the caller inputs a value that is not recognized by any of the active grammars.
Syntax
The following code example shows the syntax for the <nomatch> element.
<nomatch cond="myCondCDATA" count="myCountCDATA">
Attribute Details
The following table describes the attributes for the <nomatch> element.
<nomatch> Element
Type: CDATA
Default: true
Specifies an expression which can be evaluated to true or false. The value of the
cond attribute must evaluate to true for any enclosed operations to be performed.
Valid Values: An ECMAScript Expression that evaluates to true or false.
Required: false
Type: CDATA
Default: none
Specifies the number of errors of this type that should have occurred for the enclosed
operations to be performed.
count
When an event is thrown for the first time, the <nomatch> element with the count
attribute set to " 1 " is executed. On the second instance of the same event, the FIA
looks for an <nomatch> element with the count attribute set to " 2 ". If none exists, the
<nomatch> element with the count attribute set to " 1 " is executed again.
Shadow Variables
The following table describes the shadow variables for the <nomatch> element.
_event
Contains the event name that caused the exception. This variable lets the developer log or submit the
resultant exception or error to a database, or save it to another local variable.
_message
Contains the value of any user-defined message that is explicitly thrown. Currently, Voxeo has no
platform-defined messages for any standard events, such as error.badfetch or error.semantic, so
any caught messages must be user-defined.
Parents
<field> <form> <initial> <menu> <record> <subdialog> <transfer> <vxml>
Children
<assign> <audio> <clear> <disconnect> <enumerate> <exit> <goto> <if> <log> <prompt> <reprompt>
<return> <script> <submit> <throw> <value> <var>
<nomatch> Element
Code Samples
The following code samples show use of the <nomatch> element.
<!-- Nomatch count-cond sample -->
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
<form id="F1">
<field name="F_1">
<nomatch cond="false" count="1">
<prompt>
This handler will never get executed because
the condition is set to false.
</prompt>
</nomatch>
<nomatch> Element
<prompt>
Say anything here.
</prompt>
<filled>
<prompt>
You must be from the planet Neptune to pronounce that.
</prompt>
</filled>
</field>
</form>
</vxml>
<form id="F1">
<field name="F_1">
<nomatch>
<prompt>
<!-- These will be undefined, as no value is inherently applied -->
The message is <value expr="_message" />.
<!-- ********************************************************** -->
The event is <value expr="_event" />.
</prompt>
</nomatch>
<nomatch> Element
</rule>
</grammar>
<prompt>
Say anything here.
</prompt>
<filled>
<prompt>
You must be from the planet Neptune to pronounce that.
</prompt>
</filled>
</field>
</form>
</vxml>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
<one-of> Element
<one-of> Element
The <one-of> element allows a grammar to be constructed with a series of alternate phrases or rule expansions, each of which is
contained within an <item> element.
Syntax
The following code example shows the syntax for the <one-of> element.
<one-of xml:lang="myXmlLangCDATA">
Attribute Details
The following table describes the attributes for the <one-of> element.
Required: false
Type: CDATA
Default: en-us
xml:lang
Specifies the language and locale information of the element. If omitted, this value
is inherited from the document hierarchy, or ultimately from the platform default.
The Prophecy platform default is en-us.
Shadow Variables
None.
Parents
<item> <rule>
Children
<item>
Code Samples
The following code samples show use of the <one-of> element.
<!-- OneOfCode.vxml -->
<?xml version="1.0" encoding="UTF-8"?>
Page 169 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<one-of> Element
<vxml version="2.1">
<form id="F1">
<field name="F_1">
<prompt>
What is the best solution to the Oxygen channel?
</prompt>
<filled>
<prompt>
Yep, you got that right.
</prompt>
</filled>
</field>
</form>
</vxml>
<one-of>
<item>
tolerance
<tag> out.F_1 = "tolerance" </tag>
</item>
<item>
avoidance
<tag> out.F_1 = "avoidance" </tag>
<one-of> Element
</item>
</one-of>
</rule>
</grammar>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
<option> Element
<option> Element
The <option> element lets the developer list simple choices to the caller rather than construct a complete grammar with return Slots.
Syntax
The following code example shows the syntax for the <option> element.
<option accept="approximate" dtmf="myDtmfCDATA" value="myValueCDATA">
Attribute Details
The following table describes the attributes for the <option> element.
Required: false
accept
Default: exact
exact - The text of the <option> element defines the exact phrase to be recognized.
Required: false
Type: CDATA
Default: none
dtmf
Specifies the DTMF sequence for this option. Whitespace is optional in DTMF sequences, for
example 123 is equivalent to 1 2 3.
Required: false
Type: CDATA
Default: undefined
value
Specifies the string to assign to the field item when the caller selects this option. If not
specified, then the CDATA content of the <option> element is used. If there is no content, then
the dtmf attribute value is used. If neither is specified, the default assignment is undefined.
<option> Element
Shadow Variables
None.
Parents
<field>
Children
None.
Code Samples
The following code samples show use of the <option> element.
<!-- Option dtmf-value sample -->
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
<form id="F1">
<field name="F_1">
<prompt>
Your choices are
<break strength="medium" />
press one or say shatner, press two or
say Nimoy, press three or say terminal geek.
</prompt>
<option> Element
<filled>
<prompt>
You said <value expr="F_1"/>
</prompt>
</filled>
</field>
</form>
</vxml>
<form id="F1">
<field name="F_1">
<prompt>
Your choices are
<break strength="medium" />
Shatner, Nimoy, or terminal geek.
</prompt>
<option> Element
</option>
<filled>
<prompt>
You said <value expr="F_1" />
</prompt>
</filled>
</field>
</form>
</vxml>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
<paragraph> Element
<paragraph> Element
The <paragraph> element, also specified as the <p> element, is used to specify text that should be read out in a paragraph structure.
Syntax
The following code examples show the syntax for the <paragraph> element.
<paragraph xml:lang="myXmlLangNMTOKEN">
- or <p xml:lang="myXmlLangNMTOKEN">
Attribute Details
The following table describes the attributes for the <paragraph> element.
Required: false
Type: NMTOKEN
Default: en-us
xml:lang
Specifies the language and locale information of the element. If omitted, this value is inherited
from the document hierarchy, or ultimately from the platform default. The Prophecy platform
default is en-us.
Shadow Variables
None.
Parents
None.
Children
None.
<paragraph> Element
Code Samples
The following code sample shows use of the <paragraph> element.
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
<form id="F_1">
<block>
<prompt>
<paragraph xml:lang="en-US">
If you know how to catch a mouse, the world will beat a path right
to your door. But since the first one has found a house, I can
appreciate the saying more.
</paragraph>
</prompt>
</block>
</form>
</vxml>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
<param> Element
<param> Element
The <param> element is used to specify values that are passed to subdialogs or objects. Any values sent to an external subdialog file
must have form-level variables to hold received values. The following code examples shows this structure.
<!-- Main.vxml -->
...
<subdialog name="MySubD" src="SubDFile.vxml">
<param name="Var1" expr="'porkchops'" />
...
Syntax
The following code examples show the syntax for the <param> element.
<param expr="myExprCDATA" index="myIndexCDATA" name="myNameNMTOKEN" type="myTypeCDATA"
valuetype="data">
- or <param index="myIndexCDATA" name="myNameNMTOKEN" type="myTypeCDATA" value="myValueCDATA"
valuetype="data">
<param> Element
Attribute Details
The following table describes the attributes for the <param> element.
Required: false
Type: CDATA
Default: none
expr
Specifies an ECMAScript expression that evaluates to the value for the parameter.
Constraints: Exactly one of the expr and value attributes must be specified.
Required: false
Type: CDATA
Default: none
index
Specifies a particular index reference in an array of parameters.
Required: true
Type: NMTOKEN
Default: none
name
Specifies the name of the parameter to be passed to the destination URI.
Required: false
Type: CDATA
Default: none
type
Specifies the MIME type of the result provided by a URI, when the valuetype attribute is ref.
This attribute is only used for a use of the <param> element in an <object> element.
Required: false
Type: CDATA
Default: none
value
Specifies the literal string value of the parameter.
Constraints: Exactly one of the expr and value attributes must be specified.
Required: false
Default: data
valuetype
Specifies if the value attribute is data or a URI. This attribute is not used for a use of the
<param> element in a <subdialog> element, because for that element the value attribute is
always data.
Shadow Variables
None.
<param> Element
Parents
<param> <subdialog>
Children
<param>
Code Samples
The following code samples show use of the <param> element.
<!-- Param name - expr sample -->
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
<form id="F1">
<subdialog name="SubD_1" src="MySubDialog.vxml">
<param name="confirm_prompt" expr="'should vin diesel think about another profession?'"
/>
<filled>
<prompt>
Yeah, you are probably right.
</prompt>
</filled>
</subdialog>
</form>
</vxml>
<form id="F1">
<var name="confirm_prompt" />
<param> Element
<filled>
<if cond="field_confirm == true">
<assign name="response" expr="'yes'" />
<else/>
<assign name="response" expr="'no'" />
</if>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
<phoneme> Element
<phoneme> Element
The <phoneme> element lets the developer specify a phonetic pronunciation for any contained text. SSML elements are ignored by
some TTS engines. For more information, see Text-To-Speech Guide.
Syntax
The following code example shows the syntax for the <phoneme> element.
<phoneme alphabet="myAlphabetCDATA" ph="myPhCDATA">
Attribute Details
The following table describes the attributes for the <phoneme> element.
Required: false
Type: CDATA
Default: none
Specifies the phonetic alphabet to be used. The following values are permitted:
alphabet
ipa - International Phonetic Alphabet. Currently, users may encounter issues using
the ipa alphabet and Prophecy TTS. We recommend the use of an alternate
alphabet.
Required: true
Type: CDATA
Default: none
ph
Specifies the phoneme string.
Shadow Variables
None.
<phoneme> Element
Parents
None.
Children
None.
Code Samples
None.
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
<prompt> Element
<prompt> Element
The <prompt> element lets the developer output synthesized text-to-speech content to the caller.
Syntax
The following code example shows the syntax for the <prompt> element.
<prompt bargein="true" bargeintype="speech" cond="myCondCDATA" count="myCountCDATA"
timeout="myTimeoutCDATA" xml:lang="myXmlLangNMTOKEN" xml:base="myXmlBaseURI">
<prompt> Element
Attribute Details
The following table describes the attributes for the <prompt> element.
Required: false
bargein
false - Indicates that the user must listen to the entire prompt before
giving input to the application
Default: speech
Specifies what kind of input is considered a valid barge-in. The following values
are permitted:
Required: false
cond
Default: true
Specifies if the caller can interrupt the audio output with a DTMF key press or
voice utterance. The following values are permitted:
Required: false
bargeintype
Type: CDATA
Default: true
count
Default: 1
Specifies the number of times that a certain action should have occurred for the
enclosed operations to be performed. For instance, a <prompt> element with the
count attribute value set to 2 could play more detailed instructions to the caller
should their first utterance prove to be invalid.
Required: false
timeout
Type: CDATA
Type: CDATA
Default: 5s
Specifies the amount of the time, in seconds or milliseconds, that the interpreter
should wait for a user response before the interpreter throws a noinput event.
<prompt> Element
Valid Values: A character string in CSS2 format.
Required: false
Type: NMTOKEN
Default: en-us
xml:lang
Specifies the language and locale information of the element. If omitted, this
value is inherited from the document hierarchy, or ultimately from the platform
default. The Prophecy platform default is en-us.
Required: false
Type: URI
Default: none
xml:base
Specifies the base URI from which relative URIs in the prompt are resolved. If
omitted, this value is inherited from the document hierarchy.
Shadow Variables
None.
Parents
<block> <catch> <error> <field> <filled> <help> <if> <initial> <menu> <nomatch> <record>
<transfer>
Children
<audio> <break> <emphasis> <enumerate> <foreach> <mark> <paragraph> <phoneme> <prosody> <say-as>
<sentence> <value>
Code Samples
The following code samples show use of the <prompt> element.
<!-- Prompt bargein sample -->
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
<form id="F1">
<field name="F_1">
<grammar xml:lang="en-us" root="TOPLEVEL">
Page 186 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<prompt> Element
<rule id="TOPLEVEL">
<one-of>
<item> eye </item>
<item> zac </item>
</one-of>
</rule>
</grammar>
<prompt bargein="false">
Who was the absolute coolest bartender on the love boat?
</prompt>
<prompt bargein="false">
I bet right about now you are wondering why you
cannot interrupt the prompt.
</prompt>
<prompt bargein="true">
But now you can. Who was the absolute coolest
bartender on the love boat?
</prompt>
<filled>
<prompt>
Correct you are!
</prompt>
</filled>
</field>
</form>
</vxml>
<prompt> Element
<form id="F1">
<field name="F_1">
<grammar xml:lang="en-us" root="TOPLEVEL">
<rule id="TOPLEVEL">
<item> gavin mac lee odd </item>
</rule>
</grammar>
<prompt cond="false">
You guessed it. This prompt will not be executed,
because the prompt is set to false.
</prompt>
<filled>
<prompt>
Correct you are!
</prompt>
</filled>
</field>
</form>
</vxml>
<prompt> Element
<form id="F1">
<field name="F_1">
<prompt timeout="20s">
This prompt allows 20 seconds of silence to elapse
before a no match is thrown.
</prompt>
<filled>
<prompt>
You said <value expr="F_1"/> !
</prompt>
</filled>
</field>
</form>
</vxml>
<prompt> Element
<vxml version="2.1">
<form id="F1">
<block>
<prompt xml:lang="en-US">
Here is a prompt set to use the English language.
</prompt>
</block>
</form>
</vxml>
<form id="F1">
<nomatch>
<goto next="#F1" />
</nomatch>
<noinput>
<goto next="#F1" />
</noinput>
<prompt> Element
</rule>
</grammar>
<field name="F_1">
<prompt bargeintype="hotword">
Viddy well, little droogies.
You can try to say drencrum to interrupt me.
You could also try saying non grammar matches,
such as shouting off Yarblockos, Eggy Weggs,
or even Devotchka.
But it will only be interrupted
when the hotword is matched.
</prompt>
</field>
<field name="F_2">
</field>
<filled namelist="F_2">
<prompt>
You said <value expr="F_2" />
</prompt>
</filled>
</form>
</vxml>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
<property> Element
<property> Element
The <property> element defines any platform-defined setting which impacts the behavior of the application. A property can be set to
encompass the entire application, or a specific form item. For a complete list of properties supported, see Property Guide.
Syntax
The following code example shows the syntax for the <property> element.
<property name="myNameNMTOKEN" value="myValueCDATA">
Attribute Details
The following table describes the attributes for the <property> element.
Required: true
Type: NMTOKEN
Default: none
name
Specifies the name of the property.
Required: true
Type: CDATA
Default: none
value
Specifies the value of the property.
Shadow Variables
None.
Parents
<field> <form> <initial> <menu> <record> <subdialog> <transfer> <vxml>
Children
None.
<property> Element
Code Samples
The following code sample shows use of the <property> element.
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
<catch event="help">
<goto next="#F2" />
</catch>
<form id="F1">
<field name="F_1">
<grammar xml:lang="en-us" root="TOPLEVEL">
<rule id="TOPLEVEL">
<item> polk salad annie </item>
</rule>
</grammar>
<form id="F2">
<field name="F_2">
<property> Element
<prompt>
You will note, that the universal grammars are now turned back off.
</prompt>
<prompt>
Dont believe me? Try saying help again.
</prompt>
<filled>
<prompt>
This shouldnt get filled.
</prompt>
</filled>
</field>
</form>
</vxml>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
<prosody> Element
<prosody> Element
The <prosody> element lets the developer change several aspects of the TTS output, including the pitch, speaking rate and volume.
SSML elements are ignored by some TTS engines. For more information, see Text-To-Speech Guide.
Syntax
The following code example shows the syntax for the <prosody> element.
<prosody contour="myContourCDATA" duration="myDurationCDATA" volume="myVolumeCDATA"
pitch="myPitchCDATA" range="myRangeCDATA" rate="myRateCDATA">
<prosody> Element
Attribute Details
The following table describes the attributes for the <prosody> element.
<prosody> Element
Required: false
Type: CDATA
Default: none
contour
Specifies the pitch contour for the contained text. This attribute is non-functional on all TTS
platforms, (Speechify and Rhetorical).
Required: false
Type: CDATA
Default: none
duration
Specifies the time in which to read the contained text, in seconds or milliseconds.
Valid Values: A character string in CSS2 format.
Required: false
Type: CDATA
Default: 100.0
volume
Specifies the volume of speech output.
Required: false
Type: CDATA
Default: none
Specifies the baseline pitch for the contained text. The following values are permitted:
A percentage, optionally preceded by " + " or " - " and followed by " % "
A relative number, preceded by " + " or " - "and followed by st, for semitones,
or Hz for Hertz
pitch
Examples
3.0Hz
.25Hz
30%
+25.5%
+0.5st
-5.5Hz
high
<prosody> Element
Required: false
Type: CDATA
Default: none
Specifies the pitch range for the contained text. The following values are permitted:
range
A percentage, optionally preceded by " + " or " - " and followed by " % "
A real number
Examples
3.0Hz
.25Hz
30%
+25.5%
0.5
high
Required: false
Type: CDATA
Default: none
Specifies the speaking rate for the contained text. The following values are permitted:
A percentage, optionally preceded by " + " or " - " and followed by " % "
A real number
rate
Examples
3.0Hz
.25Hz
30%
+25.5%
Page 198 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<prosody> Element
0.5
high
Shadow Variables
None.
Parents
<audio> <choice> <emphasis> <enumerate> <paragraph> <prompt> <sentence>
Children
None.
Code Samples
The following code sample shows use of the <prosody> element.
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
<form id="F_1">
<block>
<prompt>
<prosody duration="8000ms">
Purple Haze, was in my brain.
</prosody>
<prosody duration="50ms">
Lately things dont seem the same.
</prosody>
<prosody> Element
<prosody rate="slow">
Acting funny, and I dont know why.
</prosody>
<prosody rate="fast">
Excuse me, while I kiss the sky!
</prosody>
<prosody volume="soft">
Purple Haze, all around
</prosody>
<prosody volume="loud">
Dont know if I am coming up or down.
</prosody>
<prosody pitch="low">
Am I happy, or in misery?
</prosody>
<prosody pitch="high">
Whatever it is, that girl put a spell on me!
</prosody>
</prompt>
</block>
</form>
</vxml>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
<record> Element
<record> Element
The <record> element is an input item that records audio from the caller. The resultant audio file is stored in the input item variable.
Recorded audio files are stored on the Voxeo servers until the application ends, at which point the file is deleted. Therefore, to save a
recorded audio file permanently, or for longer than the application lifetime, you must submit the recorded audio to a server. Recorded
audio must be submitted with the POST method.
Note: The Voxeo VoiceCenter 5.5 VoiceXML platform limits recording length to 10 minutes, 600 seconds,
maximum due to an inherent limitation in the Nuance 8.5 ASR. While Voxeo has no control over this
limitation, it should be noted that the Prophecy/VoiceCenter 7.0 platform is not subject to this limitation.
Syntax
The following code example shows the syntax for the <record> element.
<record beep="false" cond="myCondCDATA" dtmfterm="true" expr="myExprCDATA"
finalsilence="myFinalSilenceCDATA" maxtime="myMaxTimeCDATA" modal="false" name="myNameNMTOKEN"
type="myTypeCDATA" voxeo:trimcondition="myTrimConditionCDATA" voxeo:trimms="myTrimMS">
<record> Element
Attribute Details
The following table describes the attributes for the <record> element.
Required: false
Default: false
beep
Specifies whether a beep tone is played to the caller to indicate that the recording has
started. A value of true indicates that a beep is played.
Required: false
cond
Type: CDATA
Default: true
Specifies an expression which can be evaluated to true or false. The value of the
cond attribute must evaluate to true for any enclosed operations to be performed.
Valid Values: An ECMAScript Expression that evaluates to true or false.
Required: false
Default: true
Specifies whether the caller is permitted to terminate the recording in progress with the
press of a DTMF key. The following values are permitted:
dtmfterm
true - Indicates that any DTMF key press can end the recording session. If a
DTMF key is not pressed, the recording continues until a maxtime or
finalsilence event is reached.
false - Indicates that a DTMF key press cannot end the recording session. The
recording always continues until a maxtime or finalsilence event is
reached.
Required: false
Type: CDATA
Default: ECMAScript
undefined
expr
Specifies the initial value of the element. If the attribute value is undefined, then the
element is visited by the FIA. Otherwise, the element is not visited until explicitly cleared.
Required: false
finalsilence
Type: CDATA
Default: 5s
Specifies the amount of caller silence that indicates the end of a recording, in seconds or
milliseconds. This attribute value must not exceed 10 seconds, otherwise an
error.semantic event is thrown.
Valid Values: A character string in CSS2 format.
<record> Element
Required: false
maxtime
Type: CDATA
Default: none
modal
Default: true
Type: NMTOKEN
Default: none
name
Specifies the input item variable that will hold the recording.
Required: false
Type: CDATA
Default: none
Specifies the MIME type of the recorded file. The following values are permitted:
type
For audio/MP3, you can also define the bit rate and recording quality as parameters using
a semi-colon " ; "as a separator.
<record> Element
bitrate - One of 16, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256 or
320.
For example, to create a good quality recording in a relatively small file, you could set this
to:
<record
name="R_1"
maxtime="20s"
type="audio/mp3;bitrate=16;quality=4">
Type: One or more of: maxtime,
maxsilence, dtmf, stop
Required: false
finalsilence="5s"
Default: none
Specifies when the end of a recording should be trimmed. The number of milliseconds to
trim is specified in the voxeo:trimms attribute. The value for this attribute should be a
comma-separated list of any of the following options:
voxeo:trimcondition
maxtime
maxsilence
dtmf
stop
For example, if this attribute value is dtmf, stop and a recording ends due to a
maxtime event, then a trim does not occur.
Required: false
voxeo:trimms
Default: none
Specifies the number of milliseconds to trim off of the end of a recording. This attribute is
used in conjunction with the voxeo:trimcondition attribute.
<record> Element
Shadow Variables
The following table describes the shadow variables for the <record> element.
Contains the duration of the recording, in milliseconds.
Example
<record name="R_1"...>
name$.duration
<filled>
<prompt>
The message was exactly
<value expr="R_1$.duration" />
milliseconds long.
</prompt>
...
Contains the size of the recording, in bytes. You can use this variable to help
decide if you need to store a recording, to conserve server resources.
Example
name$.size
<if cond="R_1$.size < 0">
<!-- Dont do anything-->
<else />
<submit next="Myserver.com" />
...
name$.termchar
name$.maxtime
This variable depends on the value of the dtmfterm attribute. If the value of the
dtmfterm attribute is true, and the user terminates the recording with a DTMF
key press, this variable holds the key pressed. Otherwise, this variable is
undefined.
Contains a boolean value that indicates if the recording was terminated because
the maximum recording duration was reached. A value of true indicates that the
maximum was reached.
<record> Element
Parents
<form>
Children
<audio> <catch> <enumerate> <error> <filled> <grammar> <help> <noinput> <nomatch> <prompt>
<property> <value>
Code Samples
The following code samples show use of the <record> element.
<!-- Record voxeo:trimms - voxeo:trimcondition sample -->
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1" xmlns:voxeo="http://community.voxeo.com/xmlns/vxml">
<form id="F1">
<record name="R_1" beep="true" dtmfterm="true" voxeo:trimms="300"
voxeo:trimcondition="maxtime,maxsilence">
<prompt>
Here you will hear a beep indicating
that you should start your recording.
</prompt>
<prompt>
After you are finished, you may press any DTMF key to indicate that you are
done recording.
</prompt>
<filled>
<log expr="R_1$.duration" />
<log expr="R_1$.termchar" />
<log expr="R_1$.size" />
<prompt>
Your recording was <value expr="R_1"/>
<record> Element
</prompt>
</filled>
</record>
</form>
</vxml>
<form id="F1">
<record name="R_1" beep="true" dtmfterm="true">
<prompt>
Here you will hear a beep indicating
that you should start your recording.
</prompt>
<prompt>
After you are finished, you may press any DTMF key to indicate that you are
done recording.
</prompt>
<filled>
<log expr="R_1$.duration" />
<log expr="R_1$.termchar" />
<log expr="R_1$.size" />
<prompt>
Your recording was <value expr="R_1" />
</prompt>
</filled>
</record>
<record> Element
</form>
</vxml>
<form id="F1">
<record name="R_1" cond="false" expr="'SomeValue'">
<prompt>
This record element will be skipped, as the condition
is set to false, and the expression is not set to undefined.
</prompt>
<filled>
<prompt>
Never happen, buddy.
</prompt>
</filled>
</record>
<filled>
<log expr="R_2$.duration" />
<log expr="R_2$.termchar" />
<log expr="R_2$.size" />
<record> Element
<prompt>
Your recording was <value expr="R_2" />
</prompt>
</filled>
</record>
</form>
</vxml>
<form id="F1">
<record name="R_1" maxtime="20s" finalsilence="5s">
<prompt>
The maximum length of his message is 20 seconds.
In addition, the longest a caller can remain silent is
no more than 5 seconds, else the recording is submitted.
</prompt>
<filled>
<log expr="R_1$.duration" />
<log expr="R_1$.termchar" />
<log expr="R_1$.size" />
<prompt>
Your recording was <value expr="R_1" />
</prompt>
</filled>
</record>
</form>
<record> Element
</vxml>
Next Steps
The <record> element provides detailed recording control, such as by dialog, or type of answer, such as a busy signal, voice mail, or
human. You may just want to record the entire application, both the application side, and the caller side using the
<Voxeo:recordcall> element. This Voxeo-specific element can only be used on the Prophecy platform. For more information, see
the <voxeo:recordcall> Element.
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
<reprompt> Element
<reprompt> Element
The <reprompt> element is used to replay to most recent prompt and listen again for caller input. This element will increase the FIA
prompt counter by one.
Syntax
The following code example shows the syntax for the <reprompt> element.
<reprompt />
Attribute Details
None.
Shadow Variables
None.
Parents
<block> <catch> <error> <filled> <help> <if> <noinput> <nomatch>
Children
None.
Code Samples
The following code sample shows use of the <reprompt> element.
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
<form id="F1">
<field name="F_1">
<grammar xml:lang="en-us" root="TOPLEVEL">
<rule id="TOPLEVEL">
Page 211 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<reprompt> Element
<one-of>
<item> frank sinatra </item>
<item> richard dawson </item>
</one-of>
</rule>
</grammar>
<prompt>
Which famous drunk uttered the following line
<break strength="medium" />
I feel sorry for people who dont drink.
When they wake up in the morning, thats as good
as they will feel all day.
</prompt>
<filled>
<prompt>
Yes you are right. But lets reprompt just for the heck of it.
</prompt>
<reprompt />
</filled>
</field>
</form>
</vxml>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
<return> Element
<return> Element
The <return> element is used to terminate a subdialog and return control to the main dialog. This element throws a fatal
error.semantic event if encountered outside the context of a subdialog call.
Syntax
The following code example shows the syntax for the <return> element.
<return event="myEventNMTOKEN" eventexpr="myEventExprCDATA" message="myMessageCDATA"
messageexpr="myMessageExprCDATA" namelist="myNamelistNMTOKEN">
<return> Element
Attribute Details
The following table describes the attributes for the <return> element.
Required: false
Type: NMTOKEN
Default: none
event
Specifies the event that is thrown to the invoking application.
Constraints: Exactly one of the event, eventexpr or namelist attributes may be specified.
Required: false
eventexpr
Type: CDATA
Default: none
Specifies an ECMAScript expression that evaluates to the event that is thrown to the invoking
application.
Constraints: Exactly one of the event, eventexpr or namelist attributes may be specified.
Required: false
message
Type: CDATA
Default: none
Specifies a descriptive message about the event that is thrown. The message is accessible in
the <catch> element _message shadow variable.
Constraints: Exactly one of the message or messageexpr attributes may be specified.
Required: false
messageexpr
Type: CDATA
Default: none
Specifies an ECMAScript expression that evaluates to a descriptive message about the event
that is thrown. The message is accessible in the <catch> element _message shadow variable.
Constraints: Exactly one of the message or messageexpr attributes may be specified.
Required: false
namelist
Type: NMTOKEN
Default: none
<return> Element
Shadow Variables
None.
Parents
<block> <catch> <error> <filled> <help> <if> <noinput> <nomatch>
Children
None.
Code Samples
The following code samples show use of the <return> element.
<!-- Return namelist sample -->
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
<form id="F1">
<subdialog name="SubD_1" src="MySubDialog.vxml">
<param name="confirm_prompt" expr="'is there a chance in hell that nick cage will ever be taken seriously as a
dramatic actor? '" />
<filled>
<prompt>
Yeah, you are probably right.
</prompt>
</filled>
</subdialog>
</form>
</vxml>
<return> Element
<vxml version="2.1">
<form id="F1">
<var name="confirm_prompt" />
<var name="response" />
<filled>
<if cond="field_confirm == true">
<assign name="response" expr="'yes'" />
<else />
<assign name="response" expr="'no'" />
</if>
<return namelist="response" />
</filled>
</field>
</form>
</vxml>
<catch event="MyEvent">
<prompt>
Of course. Just look at Vanilla Ice, little buddy.
</prompt>
</catch>
<return> Element
<form id="F1">
<subdialog name="SubD_1" src="MySubDialog_2.vxml">
<param name="confirm_prompt" expr="'Admit it. Suburban white kids trying to be gangster
rappers have no credibility whatsoever, yes?'"/>
<filled>
<prompt>
I thought so.
</prompt>
</filled>
</subdialog>
</form>
</vxml>
<form id="F1">
<var name="confirm_prompt" />
<var name="response" />
<filled>
<if cond="field_confirm == true">
<assign name="response" expr="'yes'" />
<else />
<assign name="response" expr="'no'" />
Page 217 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<return> Element
</if>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
<rule> Element
<rule> Element
The <rule> element defines the named rule expansion of an XML grammar.
Syntax
The following code example shows the syntax for the <rule> element.
<rule id="myID" scope="private">
Attribute Details
The following table describes the attributes for the <rule> element.
Required: true
Type: ID
Default: none
id
Specifies the name of the rule. Rule names must be unique within the grammar, and
may not contain hyphens, colons, or periods.
Required: false
scope
Default: private
Specifies the scope of the rule. The following values are permitted:
private - Indicates that the rule may only be explicitly referenced within the
current grammar
Shadow Variables
None.
Parents
<grammar>
<rule> Element
Children
<example> <item> <one-of> <ruleref> <tag> <token>
Code Samples
The following code samples show use of the <rule> element.
<!-- Rule_ID_ScopeCode.vxml -->
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
<form id="F1">
<field name="F_1">
<prompt>
Which is it better to be, a Call XML snob, or a Voice XML snob?
</prompt>
<filled>
<prompt>
Thats right. Voice XML rocks the hizzau!
</prompt>
</filled>
</field>
</form>
</vxml>
<rule> Element
</one-of>
</rule>
</grammar>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
<ruleref> Element
<ruleref> Element
The <ruleref> element lets the developer specify an existing rule for inclusion within the current grammar.
Syntax
The following code examples show the syntax for the <ruleref> element.
<ruleref special="NULL">
- or <ruleref uri="myUriURI" type="myTypeCDATA">
<ruleref> Element
Attribute Details
The following table describes the attributes for the <ruleref> element.
Required: false
Type: URI
Default: none
Specifies the URI of the referenced grammar. The following reference types are permitted:
uri
Same-document Reference - A reference to an existing rule within the same file, for
example, <ruleref uri="#MYRULE" />.
Constraints: Exactly one of the uri and special attributes may be defined.
Required: false
Default: none
Specifies rulenames which are not permitted to be redefined within a grammar. The following
values are permitted:
GARBAGE - A rule that may match any speech up until the next rule match
special
Note: These special rulenames are not accessible when using the Prophecy
ASR, but can be used when using Prophecy with the Nuance ASR.
Constraints: Exactly one of the uri and special attributes may be defined.
Required: false
type
Type: CDATA
Default: none
Specifies the media type of the referenced grammar. The following values are permitted:
application/srgs
application/srgs+xml
<ruleref> Element
Shadow Variables
None.
Parents
<item> <rule>
Children
None.
Code Samples
The following code samples show use of the <ruleref> element.
<!-- RuleRef URI sample -->
<?xml version="1.0" encoding="UTF-8" ?>
<vxml version="2.1">
<form id="F1">
<field name="F_1">
<prompt>
What kind of bear is a koala bear?
</prompt>
<grammar
src="MyGram.xml" type="application/grammar-xml" />
<filled>
<prompt>
Koala bears are not bears at all! They are marsupials.
</prompt>
</filled>
</field>
</form>
<ruleref> Element
</vxml>
<item>
grey
<tag> out.F_1 = "grey"</tag>
</item>
</one-of>
</rule>
</grammar>
<item>
<ruleref> Element
brown
<tag> out.F_1 = "brown" </tag>
</item>
<item>
none
<tag> out.F_1 = "none" </tag>
</item>
</one-of>
</rule>
</grammar>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
<say-as> Element
<say-as> Element
The <say-as> element is used to indicate information on the type of the contained text, and to help specify the level of detail for
rendering the contained text. SSML elements are ignored by some TTS engines. For more information, see Text-To-Speech Guide.
Syntax
The following code example shows the syntax for the <say-as> element.
<say-as format="myFormatNMTOKEN" interpret-as="myInterpretAsNMTOKEN" detail="myDetailNMTOKEN">
Attribute Details
The following table describes the attributes for the <say-as> element.
Required: false
Type: NMTOKEN
Default: none
format
Specifies how certain types of text are interpreted, such as date and time. Currently, the
Prophecy, Rhetorical and Speechify TTS engines do not make use this attribute.
Required: true
interpret-as
Type: NMTOKEN
Default: none
Specifies the content type of the contained text. For example, if the contained text is 1234 and
the interpret-as attribute value is number, then the TTS engine will render the value as
one-thousand, two-hundred, thirty-four. If the interpret-as attribute value is digits, the
TTS engine will render the value as one, two, three, four.
Consult the TTS guide relevant to your deployment for a complete list of available
interpret-as attribute values. For more information, see Text-To-Speech Guide.
Required: false
Type: NMTOKEN
Default: none
detail
Specifies the level of detail to be read aloud or rendered. For example, a high level of detail may
cause punctuation to explicitly spoken, which is often necessary when speaking software code.
<say-as> Element
Shadow Variables
None.
Parents
<audio> <choice> <emphasis> <enumerate> <option> <paragraph> <prompt> <prosody> <sentence>
Children
<value>
Code Samples
The following code sample shows use of the <say-as> element.
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1" xmlns:voxeo="http://community.voxeo.com/xmlns/vxml">
<form id="F1">
<block>
<prompt xml:lang="en-us">
<!-- DATE -->
<say-as interpret-as="vxml:date">20011215</say-as>
<say-as interpret-as="vxml:digits">238.2</say-as>
<say-as interpret-as="vxml:currency">USD20.54</say-as>
<say-as interpret-as="vxml:number">123</say-as>
<say-as interpret-as="vxml:phone">8001112222x987</say-as>
Page 228 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<say-as> Element
<say-as interpret-as="vxml:time">1157h</say-as><break/>
<say-as interpret-as="vxml:boolean">true</say-as>
</prompt>
</block>
</form>
</vxml>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
<script> Element
<script> Element
The <script> element is used to specify a block of client-side ECMAScript code.
Syntax
The following code examples show the syntax for the <script> element.
<script charset="myCharSetCDATA" fetchhint="safe" fetchtimeout="myFetchTimeoutCDATA"
maxage="myMaxAgeCDATA" maxstale="myMaxStaleCDATA" src="mySrcURI">
- or <script charset="myCharSetCDATA" fetchhint="safe" fetchtimeout="myFetchTimeoutCDATA"
maxage="myMaxAgeCDATA" maxstale="myMaxStaleCDATA" srcexpr="mySrcExprCDATA">
<script> Element
Attribute Details
The following table describes the attributes for the <script> element.
Required: false
Type: CDATA
Default: UTF-8
charset
Specifies the character encoding of the script contained within the element.
Required: false
fetchhint
Default: safe
Specifies when the resource should be fetched during application execution. The following
values are permitted:
safe - Only fetch the resource when it is specifically called in the application
Required: false
fetchtimeout
Type: CDATA
Default: 5s
Specifies how long, in seconds or milliseconds, that the interpreter should wait for the content to
be returned before reverting to backup TTS if defined, or before the application skips the
contents of the <audio> element, if no backup TTS is defined.
Valid Values: A character string in CSS2 format, for example, 3s, 850ms, 0.7s, .5s, and +1.5s.
Required: false
Type: CDATA
Default: none
Type: CDATA
Default: none
<script> Element
Valid Values: An ECMAScript Expression that returns a valid time value for the request.
Required: false
src
Type: URI
Default: none
srcexpr
Type: CDATA
Default: none
Specifies an ECMAScript expression that evaluates to the URI for the external script content.
Constraints: Exactly one of the src and srcexpr attributes may be specified. The srcexpr
attribute may not be specified in conjunction with inline script content.
Shadow Variables
None.
Parents
<block> <catch> <error> <filled> <form> <help> <if> <noinput> <nomatch> <vxml>
Children
None.
Code Samples
The following code samples show use of the <script> element.
// MyScript.js
function ruleFunction() {
return ("here is a nifty little sample script");
}
<script> Element
<form id="F1">
<block>
<script src="MyScript.js" maxage="5000" maxstale="5000" />
<prompt>
<value expr="ruleFunction()" />
</prompt>
</block>
</form>
</vxml>
<form id="F1">
<block>
<script src="MyScript.js" fetchhint="prefetch" fetchtimeout="10s" />
<prompt>
<value expr="ruleFunction()" />
</prompt>
</block>
</form>
</vxml>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
Page 233 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<sentence> Element
<sentence> Element
The <sentence> element, also specified as the <s> element, is used to specify text that should be read out in sentence structure, rather
than paragraph structure. SSML elements are ignored by some TTS engines. For more information, see Text-To-Speech Guide.
Syntax
The following code examples show the syntax for the <sentence> element.
<sentence xml:lang="myXmlLangNMTOKEN">
- or <s xml:lang="myXmlLangNMTOKEN">
Attribute Details
The following table describes the attributes for the <sentence> element.
Required: false
Type: NMTOKEN
Default: en-us
xml:lang
Specifies the language and locale information of the element. If omitted, this value is inherited
from the document hierarchy, or ultimately from the platform default. The Prophecy platform
default is en-us.
Shadow Variables
None.
Parents
None.
Children
None.
<sentence> Element
Code Samples
The following code sample shows use of the <sentence> element.
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
<form id="F_1">
<block>
<prompt>
<sentence xml:lang="en-US">
Brother John saw visions of God.
</sentence>
<sentence xml:lang="en-US">
So they put him in chains, for acting too odd.
</sentence>
<sentence xml:lang="en-US">
As the crowd shouted off with his head.
</sentence>
<sentence xml:lang="en-US">
The priest said have mercy, lets burn him instead.
</sentence>
</prompt>
</block>
</form>
</vxml>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
<sub> Element
<sub> Element
The <sub> element is used replace text for pronunciation, which allows documents to contain both the spoken and written form of a
word or phrase. The contained text is replaced with the text in the alias attribute when spoken. SSML elements are ignored by some
TTS engines. For more information, see Text-To-Speech Guide.
Syntax
The following code example shows the syntax for the <sub> element.
<sub alias="myAliasCDATA">
Attribute Details
The following table describes the attributes for the <sub> element.
Required: true
Type: CDATA
Default: none
alias
Specifies the substitute text to be spoken in place of the contained text.
Shadow Variables
None.
Parents
None.
Children
None.
Code Samples
None.
<sub> Element
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
<subdialog> Element
<subdialog> Element
The <subdialog> element is used to invoke a called dialog, known as a subdialog. Subdialogs provide a method for reusing common
dialogs within an independent application context. The VoiceXML content indicated by the src or srcexpr attribute operates in a new
execution context, which includes all state information and declarations from the invoking application. The subdialog content will
continue execution until it encounters a <return> element, at which point the subdialog terminates and control is passed back to the
invoking application.
Syntax
The following code examples show the syntax for the <subdialog> element.
<subdialog cond="myCondCDATA" enctype="myEncTypeCDATA" expr="myExprCDATA"
fetchaudio="myFetchAudioURI" fetchhint="safe" fetchtimeout="myFetchTimeoutCDATA"
maxage="myMaxAgeCDATA" maxstale="myMaxStaleCDATA" method="GET" name="myNameNMTOKEN"
namelist="myNamelistNMTOKEN" src="mySrcURI">
- or <subdialog cond="myCondCDATA" enctype="myEncTypeCDATA" expr="myExprCDATA"
fetchaudio="myFetchAudioURI" fetchhint="safe" fetchtimeout="myFetchTimeoutCDATA"
maxage="myMaxAgeCDATA" maxstale="myMaxStaleCDATA" method="GET" name="myNameNMTOKEN"
namelist="myNamelistNMTOKEN" srcexpr="mySrcExpression">
<subdialog> Element
Attribute Details
The following table describes the attributes for the <subdialog> element.
Required: false
Type: CDATA
Default: true
cond
Specifies a boolean expression, which must equate to true for the content to be visited and
executed.
Required: false
enctype
Type: CDATA
Default:
application/x-www-form-ur
lencoded
Specifies the media encoding type for any data submitted in the namelist attribute. The
following values are allowed:
application/x-www-form-urlencoded
multipart/form-data
When submitting recorded data, this attribute must be explicitly set to have the value
multipart/form-data, and the method attribute must be set to POST.
Required: false
Type: CDATA
expr
Specifies the initial value of the element. If the attribute value is undefined, then the element
is visited by the FIA. Otherwise, the element is not visited until explicitly cleared.
Required: false
Type: URI
Default: none
fetchaudio
Specifies the URI of the audio file to play to the caller in the event of an extended document
fetch. This attribute allows audio to be played to the caller while the fetch is being made,
instead of silence.
Required: false
fetchhint
Default: safe
Specifies when the resource should be fetched during application execution. The following
values are permitted:
safe - Only fetch the resource when it is specifically called in the application
<subdialog> Element
Required: false
fetchtimeout
Type: CDATA
Default: 5s
Specifies how long, in seconds or milliseconds, that the interpreter should wait for the content
to be returned before reverting to backup TTS if defined, or before the application skips the
contents of the <audio> element, if no backup TTS is defined.
Valid Values: A character string in CSS2 format, for example, 3s, 850ms, 0.7s, .5s, and +1.5s.
Required: false
Type: CDATA
Default: none
Type: CDATA
Default: none
Default: GET
Specifies the HTTP method to use. The allowable values for this attribute are:
method
If unspecified, then the GET value is assumed, unless the submission of multi-part or form data
is encountered, in which case the POST value is assumed.
Required: false
Type: NMTOKEN
Default: none
name
Specifies an ECMAScript variable name to hold the result returned from the subdialog.
<subdialog> Element
Type: NMTOKEN
Default: none
namelist
Specifies a space-separated list of variables to send from the invoking application to the
subdialog. If unspecified, no variables are submitted.
Required: false
Type: URI
Default: none
src
Specifies the URI location of the external subdialog file.
Constraints: Exactly one of the src and srcexpr attributes must be specified.
Required: false
Type: CDATA
Default: none
srcexpr
Specifies an ECMAScript expression that returns the URI location of the external subdialog file.
Constraints: Exactly one of the src and srcexpr attributes must be specified.
Shadow Variables
None.
Parents
<form>
Children
<audio> <catch> <error> <filled> <help> <noinput> <nomatch> <param> <property>
Code Samples
The following code samples show use of the <subdialog> element.
<!-- MySubD.vxml -->
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
<form id="F1">
<subdialog> Element
<filled>
<if cond="field_confirm == true">
<assign name="response" expr="'yes'" />
<else />
<assign name="response" expr="'no'" />
</if>
<form id="F1">
<subdialog name="SubD_1" src="MySubD.vxml" cond="false">
<param name="confirm_prompt" expr="'Since the condition is set to false, this will not
be executed'" />
</subdialog>
<subdialog> Element
<filled>
<prompt>
Poppa oo mow mow!
</prompt>
</filled>
</subdialog>
</form>
</vxml>
<form id="F1">
<subdialog name="SubD_1" src="MySubD.vxml" fetchhint="prefetch" fetchtimeout="25s">
<param name="confirm_prompt" expr="'truthfully. were you happy to see Lance Bass get
kicked off the Russian orbiter mission?'" />
<filled>
<prompt>
You didnt fool me for a second.
</prompt>
</filled>
</subdialog>
<subdialog> Element
</form>
</vxml>
<form id="F1">
<block>
<prompt>
Preparing to hit the sub dialog.
</prompt>
</block>
<filled>
<prompt>
Yeah, okay. whatever you say.
</prompt>
</filled>
</subdialog>
</form>
</vxml>
<form id="F1">
<field name="F_1">
Page 244 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<subdialog> Element
<prompt>
What is the best lawn care tool ever devised?
</prompt>
</field>
<form id="F1">
<var name="MyTarget" expr="'MySubDialog_2.vxml'" />
<field name="F_1">
<grammar type="text/gsl">[hozee cow]</grammar>
<prompt>
What is the best lawn care tool ever devised?
</prompt>
</field>
<subdialog> Element
<filled>
<prompt>
If you say so.
</prompt>
</filled>
</subdialog>
</form>
</vxml>
<form id="F1">
<var name="response" />
<var name="F_1" expr="'hozee cow'" />
<filled>
<if cond="field_confirm == true">
<assign name="response" expr="'yes'" />
<else />
<assign name="response" expr="'no'" />
</if>
<subdialog> Element
</form>
</vxml>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
<submit> Element
<submit> Element
The <submit> element is used to submit information and then transition to the document sent back in the response. The <submit>
element lets the developer submit a space-delimited list of variables to the destination document, unlike the <goto> element. The target
of a submit can be an entirely new document, or a specific form item.
Syntax
The following code examples show the syntax for the <submit> element.
<submit enctype="myEncTypeCDATA" expr="myExprCDATA" fetchaudio="myFetchAudioURI" fetchhint="safe"
fetchtimeout="myFetchTimeoutCDATA" maxage="myMaxAgeCDATA" maxstale="myMaxStaleCDATA" method="GET"
namelist="myNamelistNMTOKEN">
- or <submit enctype="myEncTypeCDATA" fetchaudio="myFetchAudioURI" fetchhint="safe"
fetchtimeout="myFetchTimeoutCDATA" maxage="myMaxAgeCDATA" maxstale="myMaxStaleCDATA" method="GET"
namelist="myNamelistNMTOKEN" next="myNextCDATA">
<submit> Element
Attribute Details
The following table describes the attributes for the <submit> element.
Required: false
enctype
Type: CDATA
Default:
application/x-www-form-urlenc
oded
Specifies the media encoding type for any data submitted in the namelist attribute. The
following values are allowed:
application/x-www-form-urlencoded
multipart/form-data
When submitting recorded data, this attribute must be explicitly set to have the value
multipart/form-data, and the method attribute must be set to POST.
Required: false
Type: CDATA
Default: none
expr
Specifies an ECMAScript expression that evaluates to the target URI.
Constraints: Exactly one of the expr and next attributes must be specified.
Required: false
Type: URI
Default: none
fetchaudio
Specifies the URI of the audio file to play to the caller in the event of an extended document
fetch. This attribute allows audio to be played to the caller while the fetch is being made, instead
of silence.
Required: false
fetchhint
Default: safe
Specifies when the resource should be fetched during application execution. The following
values are permitted:
safe - Only fetch the resource when it is specifically called in the application
Required: false
Type: CDATA
Default: 5s
fetchtimeout
<submit> Element
Specifies how long, in seconds or milliseconds, that the interpreter should wait for the content to
be returned before reverting to backup TTS if defined, or before the application skips the
contents of the <audio> element, if no backup TTS is defined.
Valid Values: A character string in CSS2 format, for example, 3s, 850ms, 0.7s, .5s, and +1.5s.
Required: false
Type: CDATA
Default: none
Type: CDATA
Default: none
Default: GET
Specifies the HTTP method to use. The allowable values for this attribute are:
method
If unspecified, then the GET value is assumed, unless the submission of multi-part or form data is
encountered, in which case the POST value is assumed.
Required: false
Type: NMTOKEN
Default: none
namelist
Specifies a space-separated list of variables to send to the URI indicated by the next or expr
attribute. If this attribute is unspecified, then all input item variables are submitted to the
destination URI.
Required: false
Type: CDATA
Default: none
<submit> Element
Examples
next
Full URI
<submit next="http://MyServer.com/MyFile.vxml" />
Relative URI
<submit next="MyFile.vxml" />
Constraints: Exactly one of the expr and next attributes must be specified.
Shadow Variables
None.
Parents
<block> <catch> <error> <filled> <help> <if>
Children
None.
Code Samples
The following code samples show use of the <submit> element.
<!-- Submit method-namelist sample -->
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
<form id="F1">
<submit> Element
<block>
<var name="SomeCoolVar" expr="'SomeCoolMoeDeeValue'" />
<form id="F1">
<block>
<var name="Destination" expr="'MyDestinationPage.jsp'" />
<var name="AnotherCoolVar" expr="'SomeCoolValue'" />
<form id="F1">
<block>
<var name="SomeCoolVar" expr="'SomeCoolValue'" />
<prompt>
Preparing to submit.
</prompt>
Page 252 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<submit> Element
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
<tag> Element
<tag> Element
The <tag> element lets the developer specify an arbitrary string that is used for semantic interpretation. The <tag> element defines the
returned value from a valid user utterance.
Syntax
The following code example shows the syntax for the <tag> element.
<tag />
Attribute Details
None.
Shadow Variables
None.
Parents
<item> <rule>
Children
None.
Code Samples
The following code samples show use of the <tag> element.
<!-- TagCode.vxml -->
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
<form id="F1">
<field name="F_1">
<prompt>
Page 254 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<tag> Element
What are the chances that Saddam Hussein will land a Saturday morning television gig?
</prompt>
<filled>
<prompt>
Well, you said <value expr="F_1"/>.
</prompt>
</filled>
</field>
</form>
</vxml>
<item>
No way
<tag> Element
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
<throw> Element
<throw> Element
The <throw> element throws an event that can be caught and handled with the <catch> element. Either platform-defined events, such
as nomatch, or user-defined events, such as MyCoolEvent, may be thrown using this element. For further information on events and
event handling, see Exceptions and Errors.
Syntax
The following code example shows the syntax for the <throw> element.
<throw event="myEventNMTOKEN" eventexpr="myEventExprCDATA" message="myMessageCDATA"
messageexpr="myMessageExprCDATA">
<throw> Element
Attribute Details
The following table describes the attributes for the <throw> element.
Required: false
event
Type: NMTOKEN
Default: none
Specifies the name of the event to throw to the application. This value is accessible in the
_event shadow variable of the <catch> element that catches this event.
Constraints: Exactly one of the event and eventexpr attributes must be specified.
Required: false
eventexpr
Type: CDATA
Default: none
message
Type: CDATA
Default: none
Specifies a descriptive message to throw along with the event that is thrown. This value is
accessible in the _message shadow variable of the <catch> element that catches this
event.
Constraints: Exactly one of the message and messageexpr attributes may be specified.
Required: false
messageexpr
Type: CDATA
Default: none
Specifies an ECMAScript expression that evaluates to the message to throw along with
the event that is thrown. The return value of this expression is accessible in the _message
shadow variable of the <catch> element that catches this event.
Constraints: Exactly one of the message and messageexpr attributes may be specified.
Shadow Variables
None.
<throw> Element
Parents
<block> <catch> <error> <filled> <help> <if> <nomatch>
Children
None.
Code Samples
The following code samples show use of the <throw> element.
<!-- Throw event-eventexpr sample -->
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
<catch event="AnotherUserDefinedEvent">
<prompt>
We caught the thrown event expression.
</prompt>
</catch>
<form id="F_1">
<block>
<prompt>
Getting ready to throw an event to be caught.
</prompt>
</block>
Page 259 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<throw> Element
<block>
<throw event="MyUserDefinedEvent" />
</block>
</form>
<form id="F2">
<block>
<prompt>
Now throwing an event expression.
</prompt>
<catch event="MyUserDefinedEvent">
<prompt>
<value expr="_message" />.
</prompt>
</catch>
<form id="F_1">
<block>
<prompt>
Getting ready to throw an event to be caught.
</prompt>
<throw> Element
<form id="F_1">
<block>
<prompt>
Getting ready to throw an event to be caught.
</prompt>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
<token> Element
<token> Element
The <token> element defines a word or phrases that may be spoken by the caller in an XML grammar. A token may contain
whitespace, and may contain uppercase characters. Any token containing whitespace is further broken into individual words by the
voice browser.
GrXML also allows for capital letters in a token. However, for dictionary lookups and auto-pronunciation, capital letters are converted to
lowercase as part of the compilation process. Separate pronunciations for the same word written with different cases is disallowed.
Syntax
The following code example shows the syntax for the <token> element.
<token xml:lang="myXmlLangCDATA">
Attribute Details
The following table describes the attributes for the <token> element.
Required: false
Type: CDATA
Default: en-us
xml:lang
Specifies the language and locale information of the element. If omitted, this value
is inherited from the document hierarchy, or ultimately from the platform default.
The Prophecy platform default is en-us.
Shadow Variables
None.
Parents
<item> <rule>
Children
None.
<token> Element
Code Samples
None.
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
<transfer> Element
<transfer> Element
The <transfer> element is used to transition the caller to another destination. The destination can be another document, form, or a
phone number.
Note: Use of this element requires outbound dialing privileges, which must be provisioned by Voxeo
Support.
Syntax
The following code example shows the syntax for the <transfer> element.
<transfer aai="myAaiCDATA" aaiexpr="myAaiExprCDATA" bridge="false" cond="myCondCDATA"
connecttimeout="myConnectTimeoutCDATA" dest="myDestCDATA" destexpr="myDestExprCDATA"
expr="myExprCDATA" maxtime="myMaxtimeCDATA" name="myNameNMTOKEN"
transferaudio="myTransferAudioURI" type="bridge" voxeo:callerid="myCallerIdCDATA">
<transfer> Element
Attribute Details
The following table describes the attributes for the <transfer> element.
Required: false
Type: CDATA
Default: none
aai
Specifies application-to-application information to be sent to the receiving application.
Constraints: Exactly one of the aai and aaiexpr attributes may be specified.
Required: false
aaiexpr
Type: CDATA
Default: none
Default: false
Specifies whether the outbound call is a blind transfer or a bridged transfer. The following
values are permitted:
true - Indicates that a bridged transfer is intended. A bridged transfer adds the
callee to the connection, and suspends document interpretation until the
transferred call terminates. Listening during a transfer is controlled by any
included <grammar> elements.
false - Indicates that a blind transfer is intended. A blind transfer redirects the
caller to the callee, and does not monitor the outcome.
bridge
The use of blind transfers, or SIP REFER, is only available on the hosted network in
specific circumstances, and this service requires dedicated telephone resources to be
deployed by the customer beforehand. Blind transfers can be used in a local Prophecy
deployment when the telco provider supports it. For more information, see Blind Transfers.
Constraints: Exactly one of the bridge and type attributes may be specified.
Required: false
Type: CDATA
Default: true
cond
Specifies a Boolean expression, which must equate to true for the content to be visited
and executed.
<transfer> Element
Required: false
connecttimeout
Type: CDATA
Default: none
Specifies the amount of time, in seconds or milliseconds, that the platform will attempt to
connect the call, before a noanswer event is returned.
Valid Values: A character string in CSS2 format.
Required: false
Type: CDATA
Default: none
dest
In addition, the developer can include post-dial DTMF input to trigger after the call is
connected with the following syntax: <transfer
dest="tel:+18002223333;postd=ppp4444">. The " p " character indicates a pause
between the connection and the post-dial input from the application. Navigation of voicemail
systems using the post-dial method should be timed carefully using this syntax.
Constraints: Exactly one of the dest and destexpr attributes may be specified.
Required: false
destexpr
Type: CDATA
Default: none
Required: false
Type: CDATA
Default: ECMAScript
undefined
expr
<transfer> Element
Specifies the initial value of the element. If the attribute value is undefined, then the
element is visited by the FIA. Otherwise, the element is not visited until explicitly cleared.
Required: false
Type: CDATA
Default: 0s
maxtime
Specifies the maximum time, in seconds, that the call is permitted to last. If no limit should
be imposed, specify 0s as the attribute value.
Required: false
Type: NMTOKEN
Default: none
name
Specifies an ECMAScript variable name to hold the outcome of a bridge transfer attempt.
For a blind transfer, this attribute value is undefined.
Required: false
Type: URI
Default: none
transferaudio
Specifies the audio that is played to the caller while the transfer attempt is in progress.
Required: false
Default: bridge
Specifies the type of call transfer performed. The following values are permitted:
bridge
blind
consultation
refer
type
The consultation value is not supported on the Voxeo Prophecy hosted platform, and is
converted to a bridged transfer.
The refer value is a Voxeo extension attribute value that allows a SIP REFER to be
performed using telco-dependent support.
Constraints: Exactly one of the bridge and type attributes may be specified.
Required: false
Type: CDATA
Default: none
<transfer> Element
Required: false
Type: CDATA
Default: none
Shadow Variables
The following table describes the shadow variables for the <transfer> element.
name$.duration
Contains the duration of a call transfer in seconds. If a call attempt is terminated by the
caller before the outgoing call begins, this variable holds the value " 0 ".
name$.inputmode
Contains the input mode of the terminating command, if the transfer is terminated by a
grammar match. Possible input modes include dtmf and voice. If the transfer is not
terminated by a grammar match, this variable holds the value undefined.
name$.utterance
Contains the utterance text or DTMF input used to terminate the transfer, if the transfer is
terminated by a grammar match. If the transfer is not terminated by a grammar match, this
variable holds the value undefined.
<transfer> Element
Parents
<form>
Children
<audio> <catch> <error> <filled> <grammar> <help> <noinput> <nomatch> <prompt> <property> <value>
Code Samples
The following code samples show use of the <transfer> element.
<!-- Transfer dest-bridge sample -->
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
<form id="F1">
<transfer name="T_1" bridge="true" dest="tel:+12223334444">
<!-- ************************************************* -->
<!-- Transfer code remix, courtesy of D.J. Johnnie Cochran -->
<!-- ************************************************* -->
<prompt>
Placing the call, y'all
</prompt>
<filled>
<if cond="T_1 == 'busy'">
<prompt>
The line is busy, Lizzie.
</prompt>
<exit />
<elseif cond="T_1 == 'noanswer'" />
<prompt>
No one's home, metronome.
</prompt>
</if>
Page 269 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.
<transfer> Element
</filled>
</transfer>
<block>
<goto next="#F2" />
</block>
</form>
<form id="F2">
<block>
<prompt>
If the bridge is true, then the call goes on for you.
</prompt>
</block>
</form>
</vxml>
<form id="F1">
<!-- This will not get executed, as the condition attribute is false -->
<transfer name="T_1" bridge="true" cond="false" dest="tel:+12223334444">
<!-- ************************************************* -->
<!-- Transfer code as performed by the esteemed Pikey, Mickey O'Neil -->
<!-- http://imdb.com/title/tt0208092 -->
<!-- ************************************************* -->
<prompt>
Bwarshe blarn. Eriddie me beer! Fragunt!
</prompt>
</transfer>
<transfer> Element
<!-- This will not get executed, as the expr attribute is not undefined -->
<transfer name="T_2" bridge="true" expr="'shampoohorn'" dest="tel:+12223334444">
<prompt>
Harrgun blime shnoggin enell O' Rillbey!
</prompt>
</transfer>
<transfer> Element
<form id="F1">
<transfer name="T_1" bridge="false" destexpr="DestVar">
<!-- ************************************************* -->
<!-- Transfer code -->
<!-- ************************************************* -->
<prompt>
Huh. Dude.
</prompt>
<filled>
<if cond="T_1 == 'busy'">
<prompt>
Whoah.
</prompt>
<exit />
<elseif cond="T_1 == 'noanswer'" />
<prompt>
Whoah.
</prompt>
</if>
<prompt>
Dude. Whoah. Your call. It was like.
<value expr="T_1$.duration" /> seconds.
Whoah.
<transfer> Element
</prompt>
</filled>
</transfer>
</form>
</vxml>
In the following example, you can capture the inbound caller ID that is available from the session.callerid session variable, assign
it to a variable, and then specify that variable in the voxeo:calleridexpr attribute of the <transfer> element.
<?xml version="1.0" encoding="UTF-8"?>
<!-- declaring the 'xmlns:voxeo' attribute is required for voxeo:calleridexpr to work -->
<vxml version="2.1"
xmlns:voxeo="http://community.voxeo.com/xmlns/vxml">
<form id="F1">
<block>
<!-- Grab the inbound callerID before we transfer -->
<assign name="MyCallerID" expr="session.callerid"/>
</block>
<!-- Transfer the call to whatever number you choose, with the callerID of the inbound
caller -->
<transfer name="Mycall" destexpr="'tel:+14075551234'" bridge="true" connecttimeout="30s"
maxtime="480s" voxeo:calleridexpr="MyCallerID"/>
</form>
</vxml>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
<value> Element
<value> Element
The <value> element is used to insert the value of a variable into a prompt.
Syntax
The following code example shows the syntax for the <value> element.
<value expr="myExprCDATA">
Attribute Details
The following table describes the attributes for the <value> element.
Required: true
Type: CDATA
Default: none
expr
Specifies the ECMAScript expression which evaluates to a string to be rendered by the
TTS engine.
Shadow Variables
None.
Parents
<audio> <block> <catch> <choice> <enumerate> <error> <field> <filled> <help> <if> <initial> <log>
<menu> <nomatch> <prompt> <record> <transfer>
Children
None.
Code Samples
The following code sample shows use of the <value> element.
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
<value> Element
<form id="F1">
<var name="MyVar" expr="'Dirk Diggler'" />
<block>
<prompt>
Our favorite movie star is
<value expr="MyVar" />.
</prompt>
</block>
</form>
</vxml>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
<var> Element
<var> Element
The <var> element is used to declare a VoiceXML variable within the scope specified by the parent element. Additionally, variables
declared with the <var> element are accessible from any JavaScript that resides within a <script> element in the same scope.
Syntax
The following code example shows the syntax for the <var> element.
<var expr="myExprCDATA" name="myNameNMTOKEN">
Attribute Details
The following table describes the attributes for the <var> element.
Required: false
Type: CDATA
Default: ECMAScript
undefined
expr
Specifies the initial ECMAScript expression to be evaluated and assigned to the variable. If
unspecified, the variable retains its current value, if any.
Required: true
Type: NMTOKEN
Default: none
name
Specifies an ECMAScript variable name. Valid characters for this value can be letters, numbers,
underscores, and dollar signs, but cannot contain any other characters. In addition, the variable
name must start with either a dollar sign or a letter, else an error.semantic is thrown.
Shadow Variables
None.
Parents
<block> <catch> <error> <filled> <form> <help> <if> <nomatch> <vxml>
<var> Element
Children
None.
Code Samples
The following code samples show use of the <var> element.
<!-- Var name-expr -->
<?xml version="1.0" encoding="UTF-8" ?>
<vxml version="2.1">
<prompt>
However, now that we have assigned a new value to this variable,
its value now equates to
<value expr="myVar" />.
</prompt>
</block>
</form>
</vxml>
<var> Element
<one-of>
<item> David Faustino </item>
<item> Jean Stapleton </item>
<item> Tina Yothers </item>
</one-of>
</rule>
</grammar>
<form id="MainMenu">
<field name="GMyFavoriteActor">
Please say your favorite Actors name
<filled namelist="GMyFavoriteActor">
<assign name="application.GMyFavoriteActors" expr="GMyFavoriteActor" />
<goto next="Main2.xml" />
</filled>
</field>
</form>
</vxml>
<var> Element
<form id="F1">
<block>
<prompt>
My favorite actor is
<value expr="application.GMyFavoriteActors" />
</prompt>
</block>
</form>
</vxml>
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
<voxeo:logcontrol> Element
<voxeo:logcontrol> Element
The <voxeo:logcontrol> element is a Voxeo-specific element used to control logging. This element lets you temporarily turn off logging
if sensitive information is used in an application. Disabling logging limits the ability of Voxeo Support to troubleshoot any application
issues. Therefore, we recommend that you disable logging only when absolutely necessary.
Note: To use Voxeo-specific elements or attributes, the xmlns:voxeo attribute must be declared and
mapped to the correct Voxeo namespace. For example: <vxml version="2.1"
xmlns:voxeo="http://community.voxeo.com/xmlns/vxml">.
Syntax
The following code example shows the syntax for the <voxeo:logcontrol> element.
<voxeo:logcontrol mode="myModeString">
Attribute Details
The following table describes the attributes for the <voxeo:logcontrol> element.
Required: false
Type: String
Default: enable
Specifies the mode of the element. The following values are permitted:
mode
disable - Disables VoiceXML logging on the MRCP server. In addition, the VSP
behavior.calllog.ConfidentialUtterance=true is sent for every set param
MRCP message before a recognize MRCP message is sent to Nuance.
sensitive - Limits VoiceXML logging and all sensitive data is masked. In addition, the
VSP behavior.calllog.ConfidentialUtterance=true is sent for every set
param MRCP message before a recognize MRCP message is sent to Nuance.
Shadow Variables
None.
<voxeo:logcontrol> Element
Parents
<block>
Children
None.
Code Samples
The following code sample shows use of the <voxeo:logcontrol> element.
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1" xmlns:voxeo="http://community.voxeo.com/xmlns/vxml">
<form>
<block>
<filled>
<prompt>
You said
<value expr="luckyNumber" />
</prompt>
</filled>
</form>
</vxml>
<voxeo:logcontrol> Element
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
<voxeo:recordcall> Element
<voxeo:recordcall> Element
The <voxeo:recordcall> element is a Voxeo-specific element that lets the developer record both sides of a call.
This element records both the human and the application interaction to a WAV file. For Prophecy Hosting, the file is stored in your
Evolution Developer Portal account for Prophecy Hosting in your .../recordings directory using a directory structure based on the date,
for example, root/recordings/year/month/day/. To retrieve recordings you could use a batch script with FTP authentication, for example,
ftp://voxeoUsername:voxeoPassword@ftp.voxeo.net. In an on-premise installation of Prophecy, recordings are saved to the
...\Voxeo\Prophecy\webapps\www\MRCP\Recordings directory.
The default recording format is a WAV file using Wave PCM-Signed 16-bit, stereo, 8000Hz, 256kbps: If you want a different format,
you can define the format attribute.
The value attribute of <voxeo:recordcall> allows you to turn recording on or off, or to determine a percentage of calls that are
recorded.
If you try to turn on call recording after call recording is already enabled, a fatal application error will occur.
Note: To use Voxeo-specific elements or attributes, the xmlns:voxeo attribute must be declared and
mapped to the correct Voxeo namespace. For example: <vxml version="2.1"
xmlns:voxeo="http://community.voxeo.com/xmlns/vxml">.
Syntax
The following code example shows the syntax for the <voxeo:recordcall> element.
<voxeo:recordcall info="myInfoCDATA" value="100" format="audio/au"/>
- or <voxeo:recordcall infoexpr="myInfoExpression" value="50" format="audio/wav"/>
<voxeo:recordcall> Element
Attribute Details
The following table describes the attributes for the <voxeo:recordcall> element.
Required: true
info
Type: CDATA
Default: none
Specifies information that is inserted into the filename for the resultant recorded WAV file to help to differentiate
between files. ECMA values are not supported for this attribute. Should not be used in conjunction with the infoexpr
attribute.
Resultant audio filenames take the following format:
AccountID-ApplicationID-SessionID-UserData(Info).wav.
The following filename is an sample in the preceding format on the Prophecy platform:
56788-466213-7b5f9a2d71da645a00c3ba0c91d0a173-0-9991494909_ID_4072917777_t_2262030.wav
Required: false
Default: none
Specifies an ECMAScript expression that evaluates to information that is inserted into the filename for the resultant
recorded WAV file to help to differentiate between files. Should not be used in conjunction with the info attribute.
infoexpr
Resultant audio filenames take the following format:
AccountID-ApplicationID-SessionID-UserData(Infoexpr).wav.
The following filename is an sample in the preceding format:
56788-466213-7b5f9a2d71da645a00c3ba0c91d0a173-0-9991494909_ID_4072917777_t_MyECMAValue.wav
Required: true
value
Type: Integer
Default: none
Specifies the percentage of calls to record. A value of 100 will record all calls that come in to the application, while a
value of 30 will record 3 out of every 10 calls that come in. Setting this value to " 0 " lets the developer
programmatically turn call recording off within the application flow.
Valid Values: An integer value between " 0 " and 100, inclusive.
Required: false
Type: CDATA
Default: audio/wav
<voxeo:recordcall> Element
audio/wav - Wave PCM Signed 16-bit, stereo, 8000Hz, 256kbps. This is the default setting.
format
Shadow Variables
None.
Parents
<block>
Children
None.
Code Samples
The following code sample shows use of the <voxeo:recordcall> element to record all calls for the four-digit PIN code.
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Declaring the 'xmlns:voxeo' attribute is required -->
<vxml version="2.1" xmlns:voxeo="http://community.voxeo.com/xmlns/vxml">
<form id="F1">
<block>
<!-- The value of 100 will start recording -->
<voxeo:recordcall value="100" info="Passcode" />
<prompt>
<voxeo:recordcall> Element
<filled>
<prompt>
Thank you. Your passcode is being verified.
</prompt>
<block name="B_1">
<!-- The value of '0' will turn off recording -->
<voxeo:recordcall value="0" info="Passcode" />
<prompt>
We will now grant access to the application.
</prompt>
<exit />
</block>
</form>
</vxml>
<voxeo:recordcall> Element
The value attribute of <voxeo:recordcall> allows you to turn recording on or off, or to determine a percentage of calls that are
recorded. Here is an example that records a 10 percent of employee calls, 100% of manager calls, and none of the calls when the
caller type is not known.
<?xml version="1.0" encoding="UTF-8" ?>
<!-- declaring the 'xmlns:voxeo' attribute is required -->
<vxml version="2.1"
xmlns:voxeo="http://community.voxeo.com/xmlns/vxml">
<form id="Main">
<field name="caller">
<prompt>
Employees please press 1.<break/>
Managers please press 2.<break/>
</prompt>
<filled>
<if cond="caller=='employee'">
<!-- Record 10% of employee calls. -->
<voxeo:recordcall value="10" info="employee" />
<voxeo:recordcall> Element
<else />
<!-- We don't know who this is so record no calls. -->
<voxeo:recordcall value="0" info="unknown" />
</if>
<block name="restOfCall">
<prompt>
Please hold while we transfer you.
<!-- and so forth... -->
</prompt>
<exit />
</block>
</form>
</vxml>
Next Steps
The <Voxeo:recordcall> element records both the application side and the caller side of the application. For more detailed
recording control, such as by dialog, or type of answer, such as a busy signal, voice mail, or human, you may want to use the
<record> element. For more information, see the <record> Element.
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support
<vxml> Element
<vxml> Element
The <vxml> element is the initial declaration that defines a document as a VoiceXML application.
Syntax
The following code example shows the syntax for the <vxml> element.
<vxml application="myApplicationURI" version="2.1" xml:base="myXmlBaseURI"
xml:lang="myXmlLangNMTOKEN" xmlns="http://www.w3.org/2001/vxml"
xmlns:voxeo="http://community.voxeo.com/xmlns/vxml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/2001/vxml
http://www.w3.org/TR/2007/REC-voicexml21-20070619/vxml.xsd">
<vxml> Element
Attribute Details
The following table describes the attributes for the <vxml> element.
Required: false
application
Type: URI
Default: none
Specifies the URI of the root document for the application. When specified, all event
handlers, variables, links, grammars, and scripts contained within the root document are
considered active when each document loads. All variables declared within the root
document are then considered to have application scope, and are available at any point in
the application.
Valid Values: A valid URI.
Required: true
Default: none
version
Specifies the VoiceXML version number. To use elements and attributes that were modified
in VoiceXML 2.1, you must specify 2.1 as the version attribute value.
Required: false
xml:base
Type: URI
Default: none
Specifies the base URI of the document. All relative URIs contained in the document are
derived from the base attribute value.
Valid Values: A valid URI.
Required: false
Type: NMTOKEN
Default: en-us
xml:lang
Specifies the language and locale information of the VoiceXML document. If omitted, this
value is inherited from the document hierarchy, or ultimately from the platform default. The
Prophecy platform default is en-us.
Required: false
Type: URI
Default:
http://www.w3.org/2001/vxml
xmlns
Specifies the VoiceXML namespace. All elements and attributes using Voxeo Prophecy
belong to this namespace. The namespace URI for VoiceXML is
http://www.w3.org/2001/vxml.
Required: false
Type: URI
Default: none
<vxml> Element
Defines the XML namespace for any Voxeo-specific extension elements. This attribute is only
required when you use a Voxeo-specific VoiceXML element, such as the <voxeo:recordcall>
element. The only allowable value for this attribute is
http://community.voxeo.com/xmlns/vxml.
Valid Values: A valid URI.
Required: false
Type: CDATA
Default: none
xmlns:xsi
Defines the XML namespace for the VoiceXML 2.1 Schema. The only allowable value is
http://www.w3.org/2001/XMLSchema-instance.
Required: false
xsi:schemaLocation
Type: CDATA
Default: none
Specifies the location of the schema for the VoiceXML namespace. This attribute is only valid
in conjunction with the xmlns:xsi attribute, and the only allowable value is
http://www.w3.org/2001/vxml
http://www.w3.org/TR/2007/REC-voicexml21-20070619/vxml.xsd.
Shadow Variables
None.
Parents
None.
Children
<catch> <error> <form> <help> <link> <menu> <meta> <noinput> <nomatch> <property> <script> <var>
Code Samples
The following code samples show use of the <vxml> element.
<!-- AppRoot.vxml -->
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
<vxml> Element
<catch event="GlobalEvent">
<prompt>
We caught a global event.
</prompt>
</catch>
<form id="F1">
<block>
<prompt>
Here is some text that will not be executed.
</prompt>
</block>
</form>
</vxml>
<form id="F1">
<block>
<prompt>
Preparing to throw a global event, which is
caught by the application root document.
</prompt>
<vxml> Element
See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support