Está en la página 1de 298

Element Reference Guide

Element Reference Guide

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.

Element Reference Guide


19 <filled> Element ........................................................................................................................................... 85
20 <foreach> Element ....................................................................................................................................... 91
21 <form> Element ............................................................................................................................................ 94
22 <goto> Element ............................................................................................................................................ 99
23 <grammar> Element ................................................................................................................................... 106
24 <help> Element .......................................................................................................................................... 116
25 <if> Element ............................................................................................................................................... 120
26 <initial> Element ......................................................................................................................................... 123
27 <item> Element .......................................................................................................................................... 128
28 <link> Element ............................................................................................................................................ 135
29 <log> Element ............................................................................................................................................ 145
30 <mark> Element ......................................................................................................................................... 147
31 <media> Element ....................................................................................................................................... 149
32 <menu> Element ........................................................................................................................................ 151
33 <meta> Element ......................................................................................................................................... 156
34 <noinput> Element ..................................................................................................................................... 159
35 <nomatch> Element ................................................................................................................................... 164
36 <one-of> Element ....................................................................................................................................... 169
37 <option> Element ....................................................................................................................................... 172

3
2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited by law.

Element Reference Guide


38 <paragraph> Element ................................................................................................................................. 176
39 <param> Element ....................................................................................................................................... 178
40 <phoneme> Element .................................................................................................................................. 182
41 <prompt> Element ...................................................................................................................................... 184
42 <property> Element .................................................................................................................................... 192
43 <prosody> Element .................................................................................................................................... 195
44 <record> Element ....................................................................................................................................... 201
45 <reprompt> Element ................................................................................................................................... 211
46 <return> Element ........................................................................................................................................ 213
47 <rule> Element ........................................................................................................................................... 219
48 <ruleref> Element ....................................................................................................................................... 222
49 <say-as> Element ....................................................................................................................................... 227
50 <script> Element ......................................................................................................................................... 230
51 <sentence> Element .................................................................................................................................. 234
52 <sub> Element ........................................................................................................................................... 236
53 <subdialog> Element .................................................................................................................................. 238
54 <submit> Element ....................................................................................................................................... 248
55 <tag> Element ............................................................................................................................................ 254
56 <throw> Element ........................................................................................................................................ 257

4
2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited by law.

Element Reference Guide


57 <token> Element ........................................................................................................................................ 262
58 <transfer> Element ..................................................................................................................................... 264
59 <value> Element ......................................................................................................................................... 274
60 <var> Element ............................................................................................................................................ 276
61 <voxeo:logcontrol> Element ....................................................................................................................... 280
62 <voxeo:recordcall> Element ....................................................................................................................... 283
63 <vxml> Element ......................................................................................................................................... 289

5
2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited by law.

Element Reference Guide

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

<block>, <catch>, <error>,


<filled> <help>, <if>,
<noinput>, <nomatch>

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>

expr, fetchhint, fetchtimeout,


maxage, maxstale, src

cond, expr, name

strength, time

cond, count, event

<form>

<audio>, <choice>,
<emphasis>,
<enumerate>,
<paragraph>, <prompt>,
<prosody>, <sentence>

<field>, <form>, <initial>,


<menu>, <record>,
<subdialog>, <transfer>,
<vxml>

<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 Reference Guide

Element Summary
<submit>, <throw>,
<value>, <var>

<choice>

accept, dtmf, event,


eventexpr, expr, fetchaudio,
fetchhint, fetchtimeout,
maxage, maxstale, message,
messageexpr, next

<menu>

<audio>, <break>,
<emphasis>,
<enumerate>,
<grammar>, <mark>,
<paragraph>,
<phoneme>, <prosody>,
<say-as>, <sentence>,
<value>

namelist

<block>, <catch>, <error>,


<filled>, <help>, <if>,
<noinput>, <nomatch>

None

ecmaxmltype, enctype,
fetchaudio, fetchhint,
fetchtimeout, maxage,
maxstale, method, name,
namelist, src

<block>, <catch>, <error>,


<filled>, <form>, <help>,
<if>, <noinput>,
<nomatch>, <vxml>

None

<disconnect>

namelist

<block>, <catch>, <error>,


<filled>, <help>, <if>,
<noinput>, <nomatch>

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 Reference Guide

Element Summary
<say-as>, <sentence>,
<value>

<field>, <form>, <initial>,


<menu>, <record>,
<subdialog>, <transfer>,
<vxml>

<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

<block>, <catch>, <error>,


<filled>, <help>, <if>,
<noinput>, <nomatch>

None

<field>

<filled>

<foreach>

cond, expr, modal, name, slot,


type

mode, namelist

array, item

<form>

<field>, <form>, <record>,


<subdialog>, <transfer>

<block>, <catch>, <error>,


<filled>, <foreach>,
<help>, <if>, <noinput>,
<nomatch>, <prompt>

<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 Reference Guide

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>

expr, expritem, fetchaudio,


fetchhint, fetchtimeout,
maxage, maxstale, next,
nextitem

<block>, <catch>, <error>,


<filled>, <help>, <if>,
<noinput>, <nomatch>

None

<choice>, <field>, <form>,


<link>, <record>,
<transfer>

<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

<field>, <form>, <initial>,


<menu>, <record>,
<subdialog>, <transfer>,
<vxml>

<block>, <catch>, <error>,


<filled>, <help>, <if>,
<noinput>, <nomatch>

<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 Reference Guide

Element Summary
<audio>, <catch>,
<enumerate>, <error>,
<help>, <link>,
<noinput>, <nomatch>,
<prompt>, <property>,
<value>

<initial>

cond, expr, name

<form>

<item>

repeat, repeat-prob, weight,


xml:lang

<item>, <one-of>, <rule>

<item>, <one-of>,
<ruleref>, <tag>, <token>

<field>, <form>, <initial>,


<vxml>

<grammar>

<block>, <catch>, <error>,


<filled>, <help>, <if>,
<noinput>, <nomatch>

<value>

<link>

<log>

dtmf, event, eventexpr, expr,


fetchaudio, fetchhint,
fetchtimeout, maxage,
maxstale, message,
messageexpr, next

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>

dtmf, id, scope, accept

<vxml>

<meta>

name, content, http-equiv

<vxml>

None

<field>, <form>, <initial>,


<menu>, <record>,
<subdialog>, <transfer>,
<vxml>

<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 Reference Guide

Element Summary

<field>, <form>, <initial>,


<menu>, <record>,
<subdialog>, <transfer>,
<vxml>

<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>

accept, dtmf, value

<field>

None

<paragraph>

xml:lang

None

None

<param>

expr, index, name, type,


value, valuetype

<param>, <subdialog>

<param>

<phoneme>

alphabet, ph

None

None

<prompt>

bargein, bargeintype, cond,


count, timeout, xml:lang,
xml:base

<block>, <catch>, <error>,


<field>, <filled>, <help>,
<if>, <initial>, <menu>,
<nomatch>, <record>,
<transfer>

<audio>, <break>,
<emphasis>,
<enumerate>, <foreach>,
<mark>, <paragraph>,
<phoneme>, <prosody>,
<say-as>, <sentence>,
<value>

<property>

name, value

<prosody>

contour, duration, volume,


pitch, range, rate

<field>, <form>, <initial>,


<menu>, <record>,
<subdialog>, <transfer>,
<vxml>

<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.

Element Reference Guide

<record>

Element Summary

beep, cond, dtmfterm, expr,


finalsilence, maxtime, modal,
name, type,
voxeo:trimcondition,
voxeo:trimms

<form>

<audio>, <catch>,
<enumerate>, <error>,
<filled>, <grammar>,
<help>, <noinput>,
<nomatch>, <prompt>,
<property>, <value>

<reprompt>

None

<block>, <catch>, <error>,


<filled>, <help>, <if>,
<noinput>, <nomatch>

None

<return>

event, eventexpr, message,


messageexpr, namelist

<block>, <catch>, <error>,


<filled>, <help>, <if>,
<noinput>, <nomatch>

None

<rule>

id, scope

<grammar>

<example>, <item>,
<one-of>, <ruleref>,
<tag>, <token>

<ruleref>

uri, special, type

<item>, <rule>

None

<audio>, <choice>,
<emphasis>,
<enumerate>, <option>,
<paragraph>, <prompt>,
<prosody>, <sentence>

<say-as>

format, interpret-as, detail

<script>

charset, fetchhint,
fetchtimeout, maxage,
maxstale, src, srcexpr

<block>, <catch>, <error>,


<filled>, <form>, <help>,
<if>, <noinput>,
<nomatch>, <vxml>

<sentence>

xml:lang

None

None

<sub>

alias

None

None

<form>

<audio>, <catch>,
<error>, <filled>, <help>,
<noinput>, <nomatch>,
<param>, <property>

<subdialog>

cond, enctype, expr,


fetchaudio, fetchhint,
fetchtimeout, maxage,

<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 Reference Guide

Element Summary
maxstale, method, name,
namelist, src, srcexpr

enctype, expr, fetchaudio,


fetchhint, fetchtimeout,
maxage, maxstale, method,
namelist, next

<block>, <catch>, <error>,


<filled>, <help>, <if>

None

<tag>

None

<item>, <rule>

None

<throw>

event, eventexpr, message,


messageexpr

<block>, <catch>, <error>,


<filled>, <help>, <if>,
<nomatch>

None

<token>

xml:lang

<item>, <rule>

None

<submit>

<transfer>

aaiexpr, aai, bridge, cond,


connect timeout, dest,
destexpr, expr, maxtime,
name, transfer audio, type,
voxeo:callerid

<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

<block>, <catch>, <error>,


<filled>, <form>, <help>,
<if>, <nomatch>, <vxml>

None

<voxeo:logcontrol>

mode

<block>

None

<voxeo:recordcall>

info, infoexpr, value

<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.

Element Reference Guide

<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.

Element Reference Guide

<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.

Element Reference Guide

<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">

<var name="Var1" expr="'sasquatch'" />

<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.

Element Reference Guide

<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.

Element Reference Guide

<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:

16 bit, 8 KHz, PCM Wave files (Riff Format)

8 bit, 8 KHz, law Sphere files

16 bit, 8 KHz, PCM Sphere files

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.

Element Reference Guide

<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.

Element Reference Guide

<audio> Element
Required: false

expr

Type: CDATA

Default: none

Specifies the source of the audio to be played.


Valid Values: An ECMAScript expression that returns a reference to audio previously
recorded with the <record> element, or the URI of an audio resource.
Constraints: Exactly one of the expr and src attributes must be specified.
Required: false

fetchhint

Default: safe

Specifies when the resource should be fetched during application execution. The
following values are permitted:

prefetch - Begin the resource fetch upon initial document execution

safe - Only fetch the resource when it is specifically called in the application

Required: false

fetchtimeout

Type: prefetch | safe

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

Specifies the maximum acceptable age, in seconds, of the resource in question.


maxage

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.

Element Reference Guide

<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.

Element Reference Guide

<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>

<!-- fetchtimeout 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 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.

Element Reference Guide

<audio> Element

</vxml>

<!-- maxage and maxstale Attributes Code Sample -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

<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>

<!-- expr Attribute Code Sample -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

<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.

Element Reference Guide

<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.

Element Reference Guide

<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

Default: Internal variable

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.

Element Reference Guide

<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>

<block name="B_2" cond="false">


<prompt>
Since the condition attribute is not set to true,
this block is skipped as well.
</prompt>
</block>

<block name="B_3" cond="true" expr="">


<prompt>
Since the condition attribute is set to true,
and the expression is set to undefined this
block is visited.

Page 21 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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.

Element Reference Guide

<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.

Element Reference Guide


Required: false

<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

none - 0 seconds of silence

x-weak - .35 seconds of silence

weak - .35 seconds of silence

medium - .7 seconds of silence

strong - 1.0 seconds of silence

x-strong - 1.0 seconds of silence

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.

Element Reference Guide

<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.

Element Reference Guide

<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.

Element Reference Guide


Required: false
cond

<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.

Element Reference Guide

<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>

<!-- Catch Shadow Variables sample -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

Page 28 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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>

<!-- Catch cond Attribute Sample -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

Page 29 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<catch> Element

<catch cond="false" event="MyUserDefinedEvent">


<prompt>
Since the condition attribute is not true,
this handler will not get executed.
</prompt>
</catch>

<catch cond="true" count="1" event="MyUserDefinedEvent">


<prompt>
Since the condition attribute is true, this
handler will get executed.
</prompt>
<goto nextitem="B_2" />
</catch>

<catch cond="true" count="2" event="MyUserDefinedEvent">


<prompt>
This must be the second time this error
was caught. The thrown message is
<value expr="_message" />
</prompt>
</catch>

<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.

Element Reference Guide

<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.

Element Reference Guide

<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.

Element Reference Guide

<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.

Element Reference Guide

<choice> Element

Required: false

Type: approximate | exact

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

approximate - The text of the <choice> element defines an approximate recognition


phrase.

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

Specifies the event that is thrown upon a choice match.


Constraints: Exactly one of the event, eventexpr, expr, or next attributes must be
specified.
Required: false

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.

Element Reference Guide

<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:

prefetch - Begin the resource fetch upon initial document execution

safe - Only fetch the resource when it is specifically called in the application

Required: false
fetchtimeout

Type: prefetch | safe

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

Specifies the maximum acceptable age, in seconds, of the resource in question.


maxage
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

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: 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.

Element Reference Guide


message

<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.

Element Reference Guide

<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>

<!-- Choice next-fetchtimeout-maxstale sample -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

<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.

Element Reference Guide

<choice> Element

Test successful.
</prompt>
</block>
</form>
</vxml>

<!-- Choice fetchaudio sample -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

<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>

<!-- Choice expr sample -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

<var name="MyVarExpr" expr="'#F1'"/>


<menu id="M_1">
<prompt>
Say one to test the choice element.
</prompt>
<choice expr="MyVarExpr">
One
</choice>

Page 38 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<choice> Element

</menu>

<form id="F1">
<block>
<prompt>
Test successful.
</prompt>
</block>
</form>
</vxml>

<!-- Choice accept-dtmf-message sample -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

<catch event="Event_1 Event_2">


<prompt>
<value expr="_message" />
</prompt>
</catch>

<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.

Element Reference Guide

<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.

Element Reference Guide

<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

Default: All form items

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.

Element Reference Guide

<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.

Element Reference Guide

<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.

Element Reference Guide

<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.

Element Reference Guide

<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

dom - Indicates that the data is fetched as a DOM object.

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:

application/x-www-form-urlencoded - Indicates that the variables in the


namelist attribute must be URL-encoded.

multipart/form-data - Used for binary data submissions, such as recorded audio.

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

Type: prefetch | safe

Default: safe

Specifies when the resource should be fetched during application execution. The following
values are permitted:

prefetch - Begin the resource fetch upon initial document execution

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.

Element Reference Guide


fetchtimeout

<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

Specifies the maximum acceptable age, in seconds, of the resource in question.


maxage
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

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: GET | POST

Default: GET

Specifies the HTTP method to use. The allowable values for this attribute are:
method

GET - The GET method is used for the request

POST - The POST method is used for the request

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.

Element Reference Guide

<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">

<var name="MyData" />


<form id="F1">
<block>
<data name="MyData" src="MyData.xml" />
Page 47 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<data> Element

<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>
<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>

<!-- MyData.xml -->


<?xml version="1.0" ?>
<xml>
<parent>
<child1>value number one</child1>
<child2>value number two</child2>
<child3>value number three</child3>

Page 48 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<data> Element

<child4>value number four</child4>


<child5>value number five</child5>
</parent>
</xml>

<!-- Data-srcexpr-namelist-method sample -->


<?xml version="1.0" ?>
<vxml version="2.1">

<var name="MyData" />


<var name="Var1" expr="'Corey Feldman'" />
<var name="Var2" expr="'Corey Haim'" />
<var name="MyXMLDest" expr="'MyData.cfm'" />

<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.

Element Reference Guide

<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>

<!-- MyData.cfm -->


<?xml version="1.0" ?>
<vxml version="2.1">

<var name="MyData" />


<var name="Var1" expr="'Corey Feldman'" />
<var name="Var2" expr="'Corey Haim'" />
<var name="MyXMLDest" expr="'MyData.cfm'" />

<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.

Element Reference Guide

<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>

<1-- MyData.cfm -->


<?xml version="1.0" ?>
<cfheader name="Cache-Control" value= "no-cache">
<cfheader name="Expires" value="#Now()#">
<CFOUTPUT>
<xml>
<parent>
<child1>#url.Var1#</child1>
<child2>#url.Var2#</child2>

Page 51 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<data> Element

</parent>
</xml>
</CFOUTPUT>

<!-- src-ecmaxmltype sample -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
<!-- This is an example of how to use the data element to call en external source.
This also shows how to use the ecmaxmltype attribute.-->
<var name="City" />
<var name="Condition" />
<var name="Temp_F" />
<var name="Temp_C" />

<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.

Element Reference Guide

<data> Element

<value expr="City" />


are
<value expr="Condition" />.
The temperature in degrees Fahrenheit is
<value expr="Temp_F" /> degrees.
The temperature in degrees Celsius is
<value expr="Temp_C" /> degrees.
</prompt>
</block>
</form>
</vxml>

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.

Element Reference Guide

<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.

Element Reference Guide

<disconnect> Element

<var name="Var1" expr="'SomeBigImportantValue'" />

<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.

Element Reference Guide

<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.

Element Reference Guide

<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.

Element Reference Guide

<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.

Element Reference Guide

<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.

Element Reference Guide

<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>

<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>
Page 60 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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.

Element Reference Guide

<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

Type: strong | moderate | reduced | none

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.

Element Reference Guide

<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.

Element Reference Guide

<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.

Element Reference Guide

<enumerate> Element

What would you like for lunch? To choose


<enumerate>
<value expr="_prompt" />,
press <value expr="_dtmf" />
</enumerate>
</prompt>
<choice next="#F1" dtmf="1">
ham and cheese
</choice>
<choice next="#F1" dtmf="2">
grits
</choice>
<choice next="#F1" dtmf="3">
turkey
</choice>
</menu>

<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.

Element Reference Guide

<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.

Element Reference Guide


Required: false
cond

<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.

Element Reference Guide

<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 count="1" cond="false">


<prompt>
This handler will not get filled, as the condition is set to false.
</prompt>

</error>

<error count="1" cond="true">


<prompt>
We have caught the first error.
</prompt>
<throw event="error.AnotherError" />
</error>

<error count="2" cond="true">


<prompt>
We have now caught the second error.
</prompt>
</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.

Element Reference Guide

<error> Element

</form>
</vxml>

<!-- Error-shadowvariables sample -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

<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.

Element Reference Guide

<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.

Element Reference Guide

<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>

<!-- Example.vxml -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

<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.

Element Reference Guide

<example> Element

I couldnt agree with you more.


</prompt>
</filled>
</field>
</form>
</vxml>

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.

Element Reference Guide

<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

Specifies an ECMAScript expression to be returned to the interpreter when this condition


executes.
Constraints: Exactly one of the expr or namelist attributes may be specified.
Required: false

namelist

Type: NMTOKEN

Default: none

Specifies a space-separated list of variable names to be returned to the interpreter. If


unspecified, no variables are returned.
Constraints: Exactly one of the expr or namelist attributes may be specified.

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.

Element Reference Guide

<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">

<var name="SomeVar" expr="'SomeValue'" />


<form id="F1">
<block>
<prompt>
Preparing to exit, and send a value back to our originating c c x m l dialog.
</prompt>
<exit namelist="SomeVar" />
</block>
</form>
</vxml>

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.

Element Reference Guide

<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.

Element Reference Guide

<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.

Element Reference Guide

<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

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

modal

Type: true | false

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:

false - Enable all active grammars

true - Enable only field grammars

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

Default: Field variable name

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.

Element Reference Guide

<field> Element

Shadow Variables
The following table describes the shadow variables for the <field> element.

name$.utterance

Contains the raw string of words that were recognized.

name$.inputmode

Contains the mode in which user input was provided, either dtmf or voice.

name$.interpretation

Contains the semantic interpretation of the input.

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.

Element Reference Guide

<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>

<field name="F_2" expr="" cond="false">


<grammar xml:lang="en-us" root="myrule">
<rule id="myrule">
<item> Garbage </item>
</rule>
</grammar>
<prompt>
Since the condition is set to false, this field will never be visited.
</prompt>
</field>

<field name="F_3" expr="" cond="true">


<grammar xml:lang="en-us" root="myrule">
<rule id="myrule">
<item> Garbage </item>
</rule>
</grammar>

<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.

Element Reference Guide

<field> Element

</field>

<filled namelist="F_3">
<prompt>
You said garbage.
</prompt>
</filled>
</form>
</vxml>

<!-- Field modal sample -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

<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>

<field name="F_1" modal="false">


<grammar xml:lang="en-us" root="myrule">
<rule id="myrule">
<item> Garbage </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.

Element Reference Guide

<field> Element

Try saying estrada here.


</prompt>
<filled>
<prompt>
Very good.
</prompt>
</filled>
</field>

<field name="F_2" modal="true">


<grammar xml:lang="en-us" root="myrule">
<rule id="myrule">
<item> Garbage </item>
</rule>
</grammar>
<prompt>
Try saying estrada here. When that doesnt work, try saying garbage.
</prompt>
<filled>
<prompt> Bravo!</prompt>
</filled>
</field>
</form>
</vxml>

<!-- Field type sample -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

<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.

Element Reference Guide

<field> Element

<!-- no grammar construct is needed -->


<!-- ***************************************************************** -->
<field name="F_1" type="boolean">
<prompt>
Say yes or no here to test the built in boolean grammar.
</prompt>

<filled>
<prompt>
You said <value expr="F_1"/>.
</prompt>
</filled>
</field>
</form>
</vxml>

<!-- Grammar.xml GSL sample -->


<?xml version="1.0"?>
<grammar xml:lang="en_us" root="TOPLEVEL">
<rule id="TOPLEVEL" scope="public">
<one-of>
<item> Moe </item>
<item> Larry </item>
<item> Curly </item>
</one-of>
</rule>
</grammar>

<!-- Field slot sample -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

Page 82 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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>

<field name="F_2" slot="MySlot">


<grammar src="Grammar.xml" type="application/grammar-xml" />
<prompt>
Who is the lamest of the three stooges?
</prompt>

<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.

Element Reference Guide

<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.

Element Reference Guide

<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.

Element Reference Guide

<filled> Element

Required: false

mode

Type: any | all

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

Default: <field> element


names

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.

Element Reference Guide

<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.

Element Reference Guide

<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>

<!-- Filled namelist 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="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.

Element Reference Guide

<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>

<filled namelist="F_1 F_2">


<prompt>
You must have filled both fields.
</prompt>
</filled>
</form>
</vxml>

Page 89 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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.

Element Reference Guide

<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.

Element Reference Guide

<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>

<foreach item="flavor" array="arrayFlavors">


<prompt>
<value expr="flavor" />
<break />
</prompt>
</foreach>

<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.

Element Reference Guide

<foreach> Element

Thank you for calling ABC Frozen Yogurt. We hope you stop by soon.
</prompt>
</block>
</form>
</vxml>

Downloadable Sample Code

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.

Element Reference Guide

<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.

Element Reference Guide

<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

Type: dialog | document

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

document - All form grammars are active throughout the document

The scope attribute of a <form> element takes precedence over the default scope.
Required: false
voxeo:cleardtmf

Type: true | false

Default: true

Clears the DTMF buffer when the form is entered. The following values are permitted:

true - Defines that the DTMF buffer is cleared.

false - Defines that the DTMF buffer is not cleared.

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.

Element Reference Guide

<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">

<form id="F1" scope="document">


<grammar xml:lang="en-us" root="myrule" scope="document">
<rule id="myrule">
<item>
David Hasselhoff
<tag> out.MySlot="Dave" </tag>
</item>
</rule>
</grammar>

<!-- 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.

Element Reference Guide

<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>

<form id="F2" scope="dialog">


<field name="F_2">
<grammar xml:lang="en-us" root="myrule">
<rule id="myrule">
<item> George Jones </item>
</rule>
</grammar>

<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.

Element Reference Guide

<form> Element

<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

Page 98 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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.

Element Reference Guide

<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

Type: prefetch | safe

Default: safe

Specifies when the resource should be fetched during application execution. The following
values are permitted:

prefetch - Begin the resource fetch upon initial document execution

safe - Only fetch the resource when it is specifically called in the application

Required: false

Type: CDATA

Default: none

Specifies the maximum acceptable age, in seconds, of the resource in question.


maxage
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.

Page 100 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<goto> Element

Valid Values: An ECMAScript Expression that returns a valid time value for the request.
Required: false

Type: CDATA

Default: none

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: CDATA

Default: none

Specifies the dialog or document URI to transition to.

Examples

next

Full URI
<goto next="http://MyServer.com/MyFile.vxml" />

Relative URI
<goto next="MyFile.vxml" />

Form in current document


<goto next="#AnotherForm" />

Form in another document


<goto next="AnotherDocument.vxml#AnotherForm" />

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.

Page 101 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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">

<var name="MyGotoVar" expr="'MyNextPage.vxml'" />


<form id="F1">
<block>
<prompt>
Preparing to go to another document.
</prompt>

<goto expr="MyGotoVar" fetchaudio="MySoundFile.wav" />


</block>
</form>
</vxml>

<!-- Goto nextitem-expritem sample -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

Page 102 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<goto> Element

<var name="GotoVar" expr="'B_4'" />


<form id="F1">
<block name="B_1">
<prompt>
Preparing to go to the next form item.
</prompt>
s
<goto nextitem="B_2" />
</block>

<block name="B_2">
<prompt>
Preparing to go to the next form item variable.
</prompt>

<goto expritem="GotoVar" />


</block>

<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>

Page 103 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<goto> Element

<!-- Goto fetchhint-fetchtimeout sample -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

<form id="F1">
<block name="B_1">
<prompt>
Preparing to go to another page.
</prompt>

<goto next="AnotherPage.vxml" fetchhint="prefetch" fetchtimeout="10s" />


</block>
</form>
</vxml>

<!-- Goto maxage-maxstale sample -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

<form id="F1">
<block name="B_1">
<prompt>
Preparing to go to another page.
</prompt>

<goto next="AnotherPage.vxml" maxage="5000" maxstale="5000" fetchtimeout="10s" />


</block>
</form>
</vxml>

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.

Element Reference Guide

<goto> Element

Voxeo Support

Page 105 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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">

Page 106 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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:

prefetch - Begin the resource fetch upon initial document execution

safe - Only fetch the resource when it is specifically called in the application

Required: false
fetchtimeout

Type: prefetch | safe

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

Specifies the maximum acceptable age, in seconds, of the resource in question.


maxage
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

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: dtmf | voice

Default: voice

Page 107 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide


mode

<grammar> Element

Specifies the mode of the grammar. The following values are permitted:

dtmf

voice

Required: false
root

Type: IDREF

Default: none

XML Grammars Only


Specifies the rule which acts as the root rule of the grammar. This attribute is required for any
inline XML grammar construct.
Required: false

Type: dialog | document

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

dialog - The grammar is only active in the current form.

document - The grammar is active in all dialogs of the current document.

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.

For more information, see GSL Basics.


Required: false

Type: URI

Default: none

Specifies the target URI of the grammar file.


External grXML grammars referenced with the src attribute must be referenced with the
following format: <grammar src="MyGrammar.xml" type="application/grammar-xml"
/>.
To declare an inline grammar, the src attribute is not used. The following code example shows
an inline grammar.
<grammar xml:lang="en-us" root="TOPLEVEL">
<rule id="TOPLEVEL">
<item>
Testing
Page 108 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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

<rule id="TOPLEVEL" scope="public">


<!-- Initializes both first and middle name if one of them is
not uttered.-->
<tag>rules.FIRSTNAME="";</tag>
<tag>rules.MIDDLENAME="";</tag>
<item repeat="0-1"> <ruleref uri="#FIRSTNAME" /> </item>
<item repeat="0-1"> <ruleref uri="#MIDDLENAME" /> </item>
<ruleref uri="#LASTNAME" />
<tag> out = rules.FIRSTNAME + rules.MIDDLENAME +
rules.LASTNAME;</tag>
</rule>
<rule id="FIRSTNAME" scope="public">
<one-of>
<item> matt <tag>out="matthew ";</tag> </item>
<item> jon <tag>out="jon";</tag> </item>
</one-of>
</rule>
<rule id="MIDDLENAME" scope="public">
<one-of>
<item> bon <tag>out="bon ";</tag> </item>
<item> double ya <tag>out="w ";</tag> </item>
</one-of>
</rule>
<rule id="LASTNAME" scope="public">
<one-of>
<item> henry <tag>out="henry ";</tag> </item>
Page 109 of 293

This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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

Type: application/grammar-xml | text/gsl | ...

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

Type: true | false

Default: false

Page 110 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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

true - Indicates that the Prophecy grammar translator should be bypassed

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.

Note: To use Voxeo-specific elements or attributes, the xmlns:voxeo attribute


must be declared and mapped to the proper Voxeo namespace. For example:
<vxml version="2.1"
xmlns:voxeo="http://community.voxeo.com/xmlns/vxml">.

Required: false

weight

Type: CDATA

Default:

XML Grammars Only


Specifies the increased or decreased likelihood for a 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 an utterance toward being a match, and a weight of less than 1.0
negatively biases the utterance.
Required: false

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

Page 111 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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 xml:lang="en-us" version="1.0" root="myrule" mode="voice">


<rule id="myrule">
<item>
Not a chance.
</item>
Page 112 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<grammar> Element

</rule>
</grammar>
</field>

<filled>
<prompt>
I would have to agree with you, sir!
</prompt>
</filled>
</form>
</vxml>

<!-- Grammar scope sample -->


<?xml version="1.0" encoding="UTF-8" ?>
<vxml version="2.1">

<form id="F1" scope="document">


<grammar xml:lang="en-us" root="myrule" scope="document">
<rule id="myrule">
<item>
David Hasselhoff
<tag> out.MySlot="Dave"</tag>
</item>
</rule>
</grammar>

<!-- 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.

Element Reference Guide

<grammar> Element

<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>

<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>

<form id="F2" scope="dialog">


<field name="F_2">
<grammar xml:lang="en-us" root="myrule">
<rule id="myrule">
<item> George Jones </item>
</rule>
</grammar>

<prompt>

Page 114 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<grammar> Element

Who is the biggest celebrity in Germany?


</prompt>

<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

Page 115 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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.

Page 116 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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">

<property name="universals" value="help" />


<form id="F1">
<!-- We must enable the 'help' universal grammar first -->
<property name="universals" value="help"/>

<field name="F_1">
<grammar type="text/gsl">
[(slappy white)]
</grammar>

<prompt>
Say help here.
</prompt>

<help count="1" cond="false">


<prompt>
Since the condition is set to false, this handler is skipped.
</prompt>
</help>

Page 117 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<help> Element

<help count="1" cond="true">


<prompt>
This is the first occurrence of the help event. Now, say help again.
</prompt>
</help>

<help count="2" cond="true">


<prompt>
This is the second occurrence of the help event. Goodbye.
</prompt>
<disconnect />
</help>
</field>

<filled>
<prompt>why did you fill the field, you dummy?</prompt>
</filled>
</form>
</vxml>

<!-- Help shadow variables sample -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

<!-- We must enable the 'help' universal grammar first -->


<property name="universals" value="help" />
<help>
<prompt>
<!-- These are undefined, as no value is inherently applied -->
The message is <value expr="_message" />.
<!-- *********************************************************** -->

Page 118 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<help> Element

The event is <value expr="_event" />.


</prompt>
</help>

<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

Page 119 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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"?>

Page 120 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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>

<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>

Page 121 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<if> Element

</form>
</vxml>

See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support

Page 122 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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.

Page 123 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide


Required: false

<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

Default: Internal variable

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">

Page 124 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<initial> Element

<rule id="TOPLEVEL">
<item> dummy </item>
</rule>
</grammar>

<initial name="Initial_1" expr="'SomeValue'" cond="false">


<prompt>
This initial form item will be skipped, as the expression is not
equal to undefined and the condition is set to false.
</prompt>
</initial>

<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 name="Initial_2" cond="true" expr="">


<prompt>
This initial form item will get executed, as the expression is
set to undefined and the condition is set to true. Pressing
DTMF 1 will execute the enclosed field.

Page 125 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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>

Page 126 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<initial> Element

See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support

Page 127 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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">

Page 128 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<item> Element

Attribute Details
The following table describes the attributes for the <item> element.

Page 129 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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

repeat="3" - The utterance must be spoken 3 times

repeat="2-4" - The utterance must be spoken 2 to 4 times

repeat="2-" - The utterance must be spoken 2 or more times

repeat="0-3" - The utterance is not required to be repeated, but can be spoken up to 3


times

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.

Page 130 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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>

<grammar src="MyItemWeightGrammar.xml" type="application/grammar-xml" />

<noinput>
<prompt>
I did not hear you. Please try again.
</prompt>
<reprompt />
</noinput>

<nomatch>

Page 131 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<item> Element

<prompt>
I did not understand. Please try again.
</prompt>
<reprompt />
</nomatch>

<filled>
<prompt>
<value expr="MySlot" />
</prompt>
</filled>
</field>
</form>
</vxml>

<!-- MyItemWeightGrammar.xml -->


<?xml version = "1.0"?>
<grammar xml:lang="en-us" root = "TOPLEVEL">
<rule id="TOPLEVEL" scope="public">
<one-of>

<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

Page 132 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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>

<!-- ItemRepeatProbCode.vxml -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

<form id="F1">
<field name="F_1">
<prompt>
What was Marlon Brandos famous last line in the movie Apocalypse Now?
</prompt>

<grammar src="MyRepeatGram.xml" type="application/grammar-xml" />

<filled>
<prompt>
Yes, thats right. The horror.
</prompt>

Page 133 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<item> Element

</filled>
</field>
</form>
</vxml>

<!-- MyRepeatGram.xml -->


<?xml version= "1.0"?>
<grammar xml:lang="en-US" root="MYRULE">
<rule id="MYRULE" scope="public">
<one-of>

<item repeat="0-2" repeat-prob="0.6">


The horror
</item>
<item repeat="2-">
Nanoo
</item>
<item repeat-prob="0.0" repeat="0-1">
Machines are gonna fail, lewis
</item>
</one-of>
</rule>
</grammar>

See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support

Page 134 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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">

Page 135 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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

Specifies the event to be thrown upon a link grammar match.


Constraints: Exactly one of the event, eventexpr, expr, or next attributes must
be specified.
Required: false

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

Specifies a variable expression to determine the resultant dialog or document URI


that the application transitions to upon a link grammar match.
Constraints: Exactly one of the event, eventexpr, expr, or 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

Type: prefetch | safe

Default: safe

Specifies when the resource should be fetched during application execution. The
following values are permitted:

prefetch - Begin the resource fetch upon initial document execution


Page 136 of 293

This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<link> Element

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

Specifies the maximum acceptable age, in seconds, of the resource in question.


maxage

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

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

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.

Page 137 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<link> Element
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

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" />

Form in current document


<link next="#AnotherForm" />

Form in another document


<link next="AnotherDocument.vxml#AnotherForm" />

Constraints: Exactly one of the event, eventexpr, expr, or next attributes must
be specified.

Shadow Variables
None.

Parents
<field> <form> <initial> <vxml>

Page 138 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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">

Page 139 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<link> Element

<prompt>
Who should win the next election, democrats or republicans?
</prompt>

<grammar xml:lang="en-us" root="TOPLEVEL">


<rule id="TOPLEVEL">
<item>
Dummy
</item>
</rule>
</grammar>
</field>

<filled>
<prompt>
Now why would someone say dummy?
</prompt>
</filled>
</form>
</vxml>

<!-- Link expr-maxage-maxstale sample -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

<var name="LinkExprVar" expr="'MyNextPage.vxml'" />


<link expr="LinkExprVar" maxage="5000" maxstale="5000">
<grammar xml:lang="en-us" root="TOPLEVEL">
<rule id="TOPLEVEL">
<item>
Estrada
</item>

Page 140 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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 next-fetchhint-fetchaudio-fetchtimeout sample -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

<var name="LinkExprVar" expr="'MyNextPage.vxml'" />

Page 141 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<link> Element

<link next="MyNextPage.vxml" fetchhint="safe" fetchaudio="MyAudioFile.wav" fetchtimeout="10s">


<grammar xml:lang="en-us" root="TOPLEVEL">
<rule id="TOPLEVEL">
<item> estrada<tag> out.LinkExprVar = "estrada"</tag></item>
</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="TOPLEVEL">


<rule id="TOPLEVEL">
<item>
Dummy
</item>
</rule>
</grammar>
</field>

<filled>
<prompt>
Now why would someone say dummy?
</prompt>
</filled>
</form>
</vxml>

<!-- Link eventexpr-dtmf-message sample -->

Page 142 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<link> Element

<?xml version="1.0" encoding="UTF-8"?>


<vxml version="2.1">

<var name="MyEvent" expr="'hell'" />


<catch event="hell">
<prompt>
<value expr="_message" />
</prompt>
</catch>

<link eventexpr="MyEvent" dtmf="1" message="'I like Ike'">


<grammar xml:lang="en-us" root="TOPLEVEL">
<rule id="TOPLEVEL">
<item>
Democrats
</item>
</rule>
</grammar>
</link>

<link eventexpr="MyEvent" dtmf="2" message="'good answer, Johnee Jingo'">


<grammar xml:lang="en-us" root="TOPLEVEL">
<rule id="TOPLEVEL">
<item>
Republicans
</item>
</rule>
</grammar>
</link>

<form id="F1">
<field name="F_1">

Page 143 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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>

<grammar xml:lang="en-us" root="TOPLEVEL">


<rule id="TOPLEVEL">
<item>
Dummy
</item>
</rule>
</grammar>
</field>

<filled>
<prompt>
Now why would someone say dummy?
</prompt>
</filled>
</form>
</vxml>

See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support

Page 144 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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>

Page 145 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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'" />

<log expr="'***********************'" />

<prompt>
If you look in the Voxeo Logger, you will
see the value of the log statements.
</prompt>

<log expr="'***********************'" />


<log expr="'Pretty cool, eh?'" label="coolness" />
<log expr="'***********************'" />

</block>
</form>
</vxml>

See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support

Page 146 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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.

Page 147 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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

Page 148 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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

Type: Signed, " + " or " - ", CSS2 numbers


immediately followed by dB

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.

Page 149 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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 soundLevel="+1.0dB" speed="200%">


This

<media>
is

<media soundLevel="-1.0dB"> a </media>


<media speed="50%"> media </media>
test.

</media>
</media>
</prompt>
</block>
</form>
</vxml>

See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support

Page 150 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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">

Page 151 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<menu> Element

Attribute Details
The following table describes the attributes for the <menu> element.
Required: false

Type: true | 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

Type: dialog | document

Type: exact | approximate

Default: exact

Specifies whether an exact or an approximate utterance is considered a valid grammar match


for the phrases contained within the <choice> elements in the <menu> element. The following
values are permitted:

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.

Each <choice> element can override this attribute value.

Page 152 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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">

<!-- document scoped match -->


<catch event="batboy_event">
<prompt>
Bat boy is always the life of the party.
</prompt>
</catch>

<!-- Document-scoped match -->


<catch event="elvis_event">
<prompt>
The two headed elvis clone is indeed popular.
</prompt>
</catch>

<!-- Dialog scoped match -->


<catch event="liza_event">

Page 153 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<menu> Element

<prompt>
lie za minell e is not nearly the most popular tabloid celebrity.
</prompt>

<!-- fans of liza minelli should always be disconnected immediately -->


<disconnect />
</catch>

<menu id="M1" scope="dialog" dtmf="true">


<prompt>
Who is the most infamous celebrity in the weekly world news tabloid?
</prompt>

<prompt>
<enumerate>
For <value expr="_prompt" />, press <value expr="_dtmf" />
</enumerate>
</prompt>

<choice event="liza_event">
lie za manelly
</choice>
</menu>

<menu id="M2" scope="document" dtmf="false">


<prompt>.</prompt>

<!-- An empty prompt within this menu


is necessary to avoid a badfetch-->
<choice event="batboy_event">
Bat boy
</choice>

Page 154 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<menu> Element

<choice event="elvis_event">
Elvis clone

<grammar xml:lang="en-us" root="TOPLEVEL">


<rule id="TOPLEVEL">
<item>
<item repeat="0-1"> the </item>
two headed elvis clone
</item>
</rule>
</grammar>
</choice>
</menu>
</vxml>

See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support

Page 155 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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" />

Page 156 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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.

speak_exceptions - Upon application error, the platform converts the error


message to a TTS string that is read to the caller.

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>

Page 157 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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

Page 158 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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.

Page 159 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide


Required: false
cond

<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>

Page 160 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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 cond="true" count="1">


<prompt>
No input count one is successful.
</prompt>
</noinput>

<noinput cond="true" count="2">


<prompt>
No input count two is successful.
</prompt>
</noinput>

<grammar xml:lang="en-us" root="TOPLEVEL">


<rule id="TOPLEVEL">
<item> another dummy grammar </item>
</rule>
</grammar>

Page 161 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<noinput> Element

<prompt>
Dont say anything.
</prompt>

<filled>
<prompt>
Sheesh, keep quiet!
</prompt>
</filled>
</field>
</form>
</vxml>

<!-- Noinput shadow variables sample -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

<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>

<grammar xml:lang="en-us" root="TOPLEVEL">


<rule id="TOPLEVEL">
<item> another dummy grammar </item>

Page 162 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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

Page 163 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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.

Page 164 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide


Required: false
cond

<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>

Page 165 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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 cond="true" count="1">


<prompt>
No match count one is successful.
</prompt>
</nomatch>

<nomatch cond="true" count="2">


<prompt>
No match count two is successful.
</prompt>
</nomatch>

<grammar xml:lang="en-us" root="TOPLEVEL">


<rule id="TOPLEVEL">
<item>ladskfjhbalskjd </item>
</rule>
</grammar>

Page 166 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<nomatch> Element

<prompt>
Say anything here.
</prompt>

<filled>
<prompt>
You must be from the planet Neptune to pronounce that.
</prompt>
</filled>
</field>
</form>
</vxml>

<!-- Nomatch- shadow variables sample -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

<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>

<grammar xml:lang="en-us" root="TOPLEVEL">


<rule id="TOPLEVEL">
<item>ladskfjhbalskjd </item>

Page 167 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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

Page 168 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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.

Element Reference Guide

<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>

<grammar src="MyOneOfGrammar.xml" type="application/grammar-xml" />

<filled>
<prompt>
Yep, you got that right.
</prompt>
</filled>
</field>
</form>
</vxml>

<!-- MyOneOfGrammar.xml -->


<?xml version= "1.0"?>
<grammar xml:lang="en-US" root="MYRULE">
<rule id="MYRULE" scope="public">

<one-of>
<item>
tolerance
<tag> out.F_1 = "tolerance" </tag>
</item>

<item>
avoidance
<tag> out.F_1 = "avoidance" </tag>

Page 170 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<one-of> Element

</item>

</one-of>
</rule>
</grammar>

See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support

Page 171 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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

Type: approximate | exact

Default: exact

Specifies whether an exact or an approximate utterance is considered a valid grammar match


for the <option> element. The following values are permitted:

approximate - The text of the <option> element defines an approximate recognition


phrase.

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.

Page 172 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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 value="william shatner" dtmf="1">


Shatner
</option>

<option value="leonard nimoy" dtmf="2">


Nimoy
</option>

Page 173 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<option> Element

<option value="I still live in my moms basement" dtmf="3">


terminal geek
</option>

<filled>
<prompt>
You said <value expr="F_1"/>
</prompt>
</filled>
</field>
</form>
</vxml>

<!-- Option accept 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" />
Shatner, Nimoy, or terminal geek.
</prompt>

<option value="william shatner" accept="approximate">


bill shatner or captian kirk
</option>

<option value="leonard nimoy" accept="approximate">


lennie nimoy or spock

Page 174 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<option> Element

</option>

<option value="living in my moms basement" accept="exact">


terminal geek
</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

Page 175 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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.

Page 176 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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

Page 177 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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'" />
...

<!-- SubDFile.vxml -->


...
<form>
<var name="Var1" expr="" />
...

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">

Page 178 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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

Type: data | ref

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.

Page 179 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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>

<!-- MySubDialog.vxml -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

<form id="F1">
<var name="confirm_prompt" />

Page 180 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<param> Element

<var name="response" />

<field name="field_confirm" type="boolean">


<prompt>
<value expr="confirm_prompt" />
</prompt>

<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>

See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support

Page 181 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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.

worldbet - WorldBet Phonetic Alphabet

xsampa - X-SAMPA Phonetic Alphabet

cmu - Carnegie Mellon University Pronouncing Dictionary

Required: true

Type: CDATA

Default: none

ph
Specifies the phoneme string.

Shadow Variables
None.

Page 182 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<phoneme> Element

Parents
None.

Children
None.

Code Samples
None.

See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support

Page 183 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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">

Page 184 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<prompt> Element

Attribute Details
The following table describes the attributes for the <prompt> element.
Required: false

bargein

true - Indicates that the user is permitted to interrupt

false - Indicates that the user must listen to the entire prompt before
giving input to the application

Type: speech | hotword

Default: speech

Specifies what kind of input is considered a valid barge-in. The following values
are permitted:

speech - Any user utterance or DTMF input interrupts the prompt

hotword - Only a specific grammar match interrupts the prompt

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: true | false

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

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.

Page 185 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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.

Element Reference Guide

<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 count-cond sample -->

Page 187 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<prompt> 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">
<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>

<prompt cond="true" count="1">


Here is the very first prompt. Try not to say anything.
</prompt>

<prompt cond="true" count="2">


Who was the actor who played captain stoobing?
</prompt>

<filled>
<prompt>
Correct you are!
</prompt>
</filled>
</field>
</form>
</vxml>

Page 188 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<prompt> Element

<!-- Prompt timeout sample -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

<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>

<grammar xml:lang="en-us" root="TOPLEVEL">


<rule id="TOPLEVEL">
<item>
<item repeat="0-1"> great </item>
goog lee moog lee
</item>
</rule>
</grammar>

<filled>
<prompt>
You said <value expr="F_1"/> !
</prompt>
</filled>
</field>
</form>
</vxml>

<!-- Prompt xml:lang sample -->


<?xml version="1.0" encoding="UTF-8"?>

Page 189 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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>

<!-- Prompt bargeintype sample -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

<form id="F1">
<nomatch>
<goto next="#F1" />
</nomatch>

<noinput>
<goto next="#F1" />
</noinput>

<!-- Notice the form level 'hotword' grammar -->


<!-- Also notice that a slot *must* be defined -->
<grammar xml:lang="en-us" root="TOPLEVEL">
<rule id="TOPLEVEL">
<item>
drencrum
<tag> out.F_2 = "drencrum" </tag>
</item>

Page 190 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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

Page 191 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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.

Page 192 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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>

<!--HERE WE ENABLE ALL UNIVERSAL GRAMMARS -->


<property name="universals" value="all" />
<prompt>
Say help here.
</prompt>
<filled>
<prompt>
This shouldnt get filled.
</prompt>
</filled>
</field>
</form>

<form id="F2">
<field name="F_2">

Page 193 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<property> Element

<grammar xml:lang="en-us" root="TOPLEVEL">


<rule id="TOPLEVEL">
<item> hammertoe </item>
</rule>
</grammar>

<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

Page 194 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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">

Page 195 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<prosody> Element

Attribute Details
The following table describes the attributes for the <prosody> element.

Page 196 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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 real number followed by Hz

A relative value, such as:

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

A label, such as x-low, low, medium, high, x-high, or default

Examples

3.0Hz

.25Hz

30%

+25.5%

+0.5st

-5.5Hz

high

Page 197 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<prosody> Element

Required: false

Type: CDATA

Default: none

Specifies the pitch range for the contained text. The following values are permitted:

A real number followed by Hz

A relative value, such as:

range

A percentage, optionally preceded by " + " or " - " and followed by " % "

A real number

A label, such as x-low, low, medium, high, x-high, or default

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 relative value, such as:

A percentage, optionally preceded by " + " or " - " and followed by " % "

A real number

rate

A label, such as x-slow, slow, medium, fast, x-fast, or default

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.

Element Reference Guide

<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">

<property name="nuance.core.tts.ResourceName" value="en-US.F019" />

<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>

Page 199 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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

Page 200 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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">

Page 201 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<record> Element

Attribute Details
The following table describes the attributes for the <record> element.
Required: false

Type: true | 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

Type: true | 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.

Page 202 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<record> Element
Required: false

maxtime

Type: CDATA

Default: none

Specifies the maximum length of a recording, in seconds or milliseconds. If a message


exceeds the maxtime attribute value, the recording is terminated and the
name$.maxtime shadow variable is set to true.
The maximum length of a recording on the Voxeo Staging network is limited to 120
seconds.
Required: false

modal

Type: true | false

Default: true

This attribute is currently ignored in the voice browser.


Specifies which grammars are active during the recording. A value of true indicates that
all non-local speech grammars are disabled while executing the <record> element. A
value of false indicates that only local grammars are enabled while executing the
<record> element.
Required: false

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

audio/basic - File format = .WAV, meta-format = RAW with no header,


compression = ulaw, 8-bit, 8 kHz, 64 kps, mono. This is the default setting for
Prophecy.

audio/x-alaw-basic - File format = .WAV, meta-format = RAW with no


header, compression = alaw, 8-bit, 8 kHz, 64 kps, mono. This is the default
setting for Prophecy.

audio/x-wav - File format = .WAV, meta-format = RIFF, compression =


ulaw, 8-bit, 8 kHz, 64 kps, mono. This is the default setting for Prophecy.

audio/wav - File format = .WAV, meta-format = RIFF, compression = ulaw,


8-bit, 8 kHz, 64 kps, mono. This is the default setting for Prophecy.

audio/mp3 - File format = .MP3.

For audio/MP3, you can also define the bit rate and recording quality as parameters using
a semi-colon " ; "as a separator.

Page 203 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<record> Element

bitrate - One of 16, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256 or
320.

quality - Set from 0 to 9, where 9 is the lowest quality.

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.

Note: To use Voxeo-specific elements or attributes, the xmlns:voxeo attribute


must be declared and mapped to the proper Voxeo namespace. For example:
<vxml version="2.1"
xmlns:voxeo="http://community.voxeo.com/xmlns/vxml">.

Required: false

voxeo:trimms

Type: Integer, in milliseconds

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.

Note: To use Voxeo-specific elements or attributes, the xmlns:voxeo attribute


must be declared and mapped to the proper Voxeo namespace. For example:
<vxml version="2.1"
xmlns:voxeo="http://community.voxeo.com/xmlns/vxml">.

Page 204 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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.

Page 205 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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"/>

Page 206 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<record> Element

</prompt>
</filled>
</record>
</form>
</vxml>

<!-- Record beep-dtmftem sample -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

<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>

Page 207 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<record> Element

</form>
</vxml>

<!-- Record cond-expr sample -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

<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>

<record name="R_2" cond="true" expr="">


<prompt>
This record element will get executed, as
the condition is set to true and the
expression is set to undefined.
</prompt>

<filled>
<log expr="R_2$.duration" />
<log expr="R_2$.termchar" />
<log expr="R_2$.size" />

Page 208 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<record> Element

<prompt>
Your recording was <value expr="R_2" />
</prompt>
</filled>
</record>
</form>
</vxml>

<!-- Record maxtime-finalsilence sample -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

<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>

Page 209 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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

Page 210 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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.

Element Reference Guide

<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>

<clear namelist="F_1" />

<reprompt />
</filled>
</field>
</form>
</vxml>

See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support

Page 212 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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">

Page 213 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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

Specifies a space-separated list of variables to return to the calling dialog. If unspecified, no


variables are returned.
Constraints: Exactly one of the event, eventexpr or namelist attributes may be specified.

Page 214 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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>

<!-- MySubDialog.vxml -->


<?xml version="1.0" encoding="UTF-8"?>

Page 215 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<return> Element

<vxml version="2.1">

<form id="F1">
<var name="confirm_prompt" />
<var name="response" />

<field name="field_confirm" type="boolean">


<prompt>
<value expr="confirm_prompt" />
</prompt>

<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>

<!-- Return event sample -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

<catch event="MyEvent">
<prompt>
Of course. Just look at Vanilla Ice, little buddy.
</prompt>
</catch>

Page 216 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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>

<!-- MySubDialog_2.vxml -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

<form id="F1">
<var name="confirm_prompt" />
<var name="response" />

<field name="field_confirm" type="boolean">


<prompt>
<value expr="confirm_prompt" />
</prompt>

<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.

Element Reference Guide

<return> Element

</if>

<return event="MyEvent" />


</filled>
</field>
</form>
</vxml>

See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support

Page 218 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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

Type: public | private

Default: private

Specifies the scope of the rule. The following values are permitted:

public - Indicates that the rule may be explicitly referenced in other


grammars

private - Indicates that the rule may only be explicitly referenced within the
current grammar

Shadow Variables
None.

Parents
<grammar>

Page 219 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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>

<grammar src="MyRuleGrammar.xml" type="application/grammar-xml" />

<filled>
<prompt>
Thats right. Voice XML rocks the hizzau!
</prompt>
</filled>
</field>
</form>
</vxml>

<!-- MyRuleGrammar.xml -->


<?xml version= "1.0"?>
<grammar xml:lang="en-US" root="MYRULE">
<rule id="MYRULE" scope="public">
<one-of>
<item> voice x m l snob </item>

Page 220 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<rule> Element

</one-of>
</rule>
</grammar>

See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support

Page 221 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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">

Page 222 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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" />.

External-document Reference - A reference to an existing rule from an external


file, for example, <ruleref uri="MyGrammar.xml#MYRULE" />.

Constraints: Exactly one of the uri and special attributes may be defined.
Required: false

Type: NULL | VOID | GARBAGE

Default: none

Specifies rulenames which are not permitted to be redefined within a grammar. The following
values are permitted:

NULL - A rule that is automatically matched

VOID - A rule that can never be spoken

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

Page 223 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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>

Page 224 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<ruleref> Element

</vxml>

<!-- MyGram.xml -->


<?xml version= "1.0"?>
<grammar xml:lang="en-US" root="MYRULE">
<rule id="MYRULE">
<one-of>
<item>
<!-- A fully-qualified URL is required -->
<ruleref uri="http://MyServer.com/MyDirectory/MyAlias.xml#MYRULE3" />
</item>

<item>
grey
<tag> out.F_1 = "grey"</tag>
</item>
</one-of>
</rule>
</grammar>

<!-- MyAlias.xml -->


<?xml version= "1.0"?>
<grammar xml:lang="en-US" root="MYRULE3">
<!-- We MUST declare the rule scope as 'public' -->
<rule id="MYRULE3" scope="public">
<one-of>
<item>
black
<tag> out.F_1= "black" </tag>
</item>

<item>

Page 225 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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

Page 226 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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.

Page 227 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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>

<!-- DIGIT -->

<say-as interpret-as="vxml:digits">238.2</say-as>

<!-- CURRENCY -->

<say-as interpret-as="vxml:currency">USD20.54</say-as>

<!-- NUMBER -->

<say-as interpret-as="vxml:number">123</say-as>

<!-- PHONE -- The use a plus "+" is not permitted. -->

<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.

Element Reference Guide

<say-as> Element

<!-- TIME -->

<say-as interpret-as="vxml:time">1157h</say-as><break/>

<!-- BOOLEAN -->

<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

Page 229 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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">

Page 230 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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:

prefetch - Begin the resource fetch upon initial document execution

safe - Only fetch the resource when it is specifically called in the application

Required: false
fetchtimeout

Type: prefetch | safe

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

Specifies the maximum acceptable age, in seconds, of the resource in question.


maxage
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

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.

Page 231 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<script> Element

Valid Values: An ECMAScript Expression that returns a valid time value for the request.
Required: false
src

Type: URI

Default: none

Specifies the URI for the external script content.


Constraints: Exactly one of the src and srcexpr attributes may be specified. The src
attribute may not be specified in conjunction with inline script content.
Required: false

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 maxage-maxstale sample -->

Page 232 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<script> Element

<?xml version="1.0" encoding="UTF-8"?>


<vxml version="2.1">

<form id="F1">
<block>
<script src="MyScript.js" maxage="5000" maxstale="5000" />

<prompt>
<value expr="ruleFunction()" />
</prompt>
</block>
</form>
</vxml>

<!-- Script fetchhint-fetchtimeout sample -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

<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.

Element Reference Guide

<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.

Page 234 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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

Page 235 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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.

Page 236 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<sub> Element

See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support

Page 237 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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">

Page 238 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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

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: 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

Type: prefetch | safe

Default: safe

Specifies when the resource should be fetched during application execution. The following
values are permitted:

prefetch - Begin the resource fetch upon initial document execution

safe - Only fetch the resource when it is specifically called in the application

Page 239 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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

Specifies the maximum acceptable age, in seconds, of the resource in question.


maxage
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

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: GET | POST

Default: GET

Specifies the HTTP method to use. The allowable values for this attribute are:
method

GET - The GET method is used to fetch the URI

POST - The POST method is used to submit the URI

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.

Page 240 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide


Required: false

<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">

Page 241 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<subdialog> Element

<var name="confirm_prompt" />


<var name="response" />

<field name="field_confirm" type="boolean">


<prompt>
<value expr="confirm_prompt" />
</prompt>

<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>

<!-- Subdialog cond-expr sample -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

<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 name="SubD_2" src="MySubD.vxml" expr="crusty">

Page 242 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<subdialog> Element

<param name="confirm_prompt" expr="'Since the expression is not set to undefined, this


will not be executed'" />
</subdialog>

<subdialog name="SubD_3" src="MySubD.vxml" cond="true" expr="">


<param name="confirm_prompt" expr="'this subdialog will be executed,
since the condition is true, and the expression is undefined.
Say yes or no to execute the subdialog file.'" />

<filled>
<prompt>
Poppa oo mow mow!
</prompt>
</filled>
</subdialog>
</form>
</vxml>

<!-- Subdialog fetchhint-fetchtimeout sample -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

<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>

Page 243 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<subdialog> Element

</form>
</vxml>

<!-- Subdialog fetchaudio sample -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

<form id="F1">
<block>
<prompt>
Preparing to hit the sub dialog.
</prompt>
</block>

<subdialog name="SubD_1" src="MySubD.vxml" fetchaudio="MySoundFile.wav">


<param name="confirm_prompt" expr="'is beatrice arthur getting better looking with
age?'" />

<filled>
<prompt>
Yeah, okay. whatever you say.
</prompt>
</filled>
</subdialog>
</form>
</vxml>

<!-- Subdialog namelist sample -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

<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.

Element Reference Guide

<subdialog> Element

<grammar type="text/gsl">[hozee cow]</grammar>

<prompt>
What is the best lawn care tool ever devised?
</prompt>
</field>

<subdialog name="SubD_1" src="MySubDialog_2.cfm" namelist="F_1">


<filled>
<prompt>
If you say so.
</prompt>
</filled>
</subdialog>
</form>
</vxml>

<!-- Subdialog srcexpr-maxage-maxstale sample -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

<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 name="SubD_2" srcexpr="MyTarget" maxage="5000" maxstale="4000">

Page 245 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<subdialog> Element

<filled>
<prompt>
If you say so.
</prompt>
</filled>
</subdialog>
</form>
</vxml>

<!-- MySubDialog_2.vxml -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

<form id="F1">
<var name="response" />
<var name="F_1" expr="'hozee cow'" />

<field name="field_confirm" type="boolean">


<prompt>
Did you say <value expr="F_1" /> ?
</prompt>

<filled>
<if cond="field_confirm == true">
<assign name="response" expr="'yes'" />
<else />
<assign name="response" expr="'no'" />
</if>

<return namelist="response F_1" />


</filled>
</field>

Page 246 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<subdialog> Element

</form>
</vxml>

See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support

Page 247 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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">

Page 248 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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

Type: prefetch | safe

Default: safe

Specifies when the resource should be fetched during application execution. The following
values are permitted:

prefetch - Begin the resource fetch upon initial document execution

safe - Only fetch the resource when it is specifically called in the application

Required: false

Type: CDATA

Default: 5s

fetchtimeout

Page 249 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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

Specifies the maximum acceptable age, in seconds, of the resource in question.


maxage
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

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: GET | POST

Default: GET

Specifies the HTTP method to use. The allowable values for this attribute are:
method

GET - The GET method is used to fetch the URI

POST - The POST method is used to submit the URI

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

Page 250 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<submit> Element

Specifies the dialog or document URI to transition to.

Examples

next

Full URI
<submit next="http://MyServer.com/MyFile.vxml" />

Relative URI
<submit next="MyFile.vxml" />

Form in current document


<submit next="#AnotherForm" />

Form in another document


<submit next="AnotherDocument.vxml#AnotherForm" />

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">

Page 251 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<submit> Element

<block>
<var name="SomeCoolVar" expr="'SomeCoolMoeDeeValue'" />

<submit next="MyDestinationPage.jsp" namelist="SomeCoolVar" method="post" />


</block>
</form>
</vxml>

<!-- Submit expr-enctype-maxage-maxstale sample -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

<form id="F1">
<block>
<var name="Destination" expr="'MyDestinationPage.jsp'" />
<var name="AnotherCoolVar" expr="'SomeCoolValue'" />

<submit expr="Destination" namelist="AnotherCoolVar" maxage="5000" maxstale="5000"


enctype="application/x-www-form-urlencoded" />
</block>
</form>
</vxml>

<!-- Submit fetchhint-fetchaudio sample -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

<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.

Element Reference Guide

<submit> Element

<submit next="MyDestinationPage.jsp" method="get" fetchhint="safe"


fetchaudio="MySoundFile.wav" />
</block>
</form>
</vxml>

See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support

Page 253 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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.

Element Reference Guide

<tag> Element

What are the chances that Saddam Hussein will land a Saturday morning television gig?
</prompt>

<grammar src="MyTagGrammar.xml#MYRULE" type="application/grammar-xml" />

<filled>
<prompt>
Well, you said <value expr="F_1"/>.
</prompt>
</filled>
</field>
</form>
</vxml>

<!-- MyTagGrammar.xml -->


<?xml version= "1.0"?>
<grammar xml:lang="en-US" root="MYRULE">
<rule id="MYRULE" scope="public">
<one-of>
<item>
Pretty high

<tag>out.F_1= "pretty high"</tag>


</item>

<item>
No way

<tag>out.F_1= "no way"</tag>


</item>
</one-of>
</rule>
</grammar>

Page 255 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<tag> Element

See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support

Page 256 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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">

Page 257 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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

Specifies an ECMAScript expression that evaluates to the event to throw to the


application. The return value of this expression 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

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.

Page 258 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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">

<var name="EventVar" expr="'AnotherUserDefinedEvent'" />


<catch event="MyUserDefinedEvent">
<prompt>
We caught the thrown event.
</prompt>
<goto next="#F2" />
</catch>

<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.

Element Reference Guide

<throw> Element

<block>
<throw event="MyUserDefinedEvent" />
</block>
</form>

<form id="F2">
<block>
<prompt>
Now throwing an event expression.
</prompt>

<throw eventexpr="EventVar" />


</block>
</form>
</vxml>

<!-- Throw message sample -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

<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>

Page 260 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<throw> Element

<throw event="MyUserDefinedEvent" message="'here is the thrown message'" />


</block>
</form>
</vxml>

<!-- Throw messageexpr sample -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

<var name="MyMsg" expr="'here is the thrown message'" />


<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 event="MyUserDefinedEvent" messageexpr="MyMsg" />


</block>
</form>
</vxml>

See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support

Page 261 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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.

Page 262 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<token> Element

Code Samples
None.

See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support

Page 263 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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">

Page 264 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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

Currently disabled on the Voxeo network.


Specifies an expression that evaluates to the 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

Type: true | false

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.

Page 265 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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

Specifies the destination number or URI to transfer to.


The Voxeo platform follows the RFCs for both telephone and SIP values, RFC-2806 and
RFC-3261, respectively. For example:

dest

Absolute syntax - <transfer dest="tel:+18002223333" ...>

Exact syntax - <transfer dest="tel:18002223333" ...>

SIP address - <transfer dest="sip:xxx.xxx.xxx.xxx" ...>

Note: Developers who use non-U.S. datacenters are required to specify an


E.164-formatted string, for example: tel:+[country code][number].

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

Specifies an ECMAScript expression that evaluates to the destination number or URI to


transfer to.
Constraints: Exactly one of the dest and destexpr attributes may be specified.

Required: false

Type: CDATA

Default: ECMAScript
undefined

expr

Page 266 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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

Type: bridge | blind | consultation | refer

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

Specifies a spoofed caller ID for an outbound bridged transfer.


voxeo:callerid

Page 267 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<transfer> Element

Note: To use Voxeo-specific elements or attributes, the xmlns:voxeo attribute


must be declared and mapped to the proper Voxeo namespace. For example:
<vxml version="2.1"
xmlns:voxeo="http://community.voxeo.com/xmlns/vxml">.

Required: false

Type: CDATA

Default: none

Specifies an ECMAScript expression that evaluates to a spoofed caller ID for an outbound


bridged transfer.
voxeo:calleridexpr

Constraints: Exactly one of the voxeo:callerid and voxeo:calleridexpr attributes


may be specified.

Note: To use Voxeo-specific elements or attributes, the xmlns:voxeo attribute


must be declared and mapped to the proper Voxeo namespace. For example:
<vxml version="2.1"
xmlns:voxeo="http://community.voxeo.com/xmlns/vxml">.

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.

Page 268 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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.

Element Reference Guide

<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>

<!-- Transfer cond-expr sample -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

<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>

Page 270 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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 name="T_3" bridge="true" dest="tel:+12223334444" cond="true" expr="">


<prompt>
Bir nolley O'malley dor tuggatinya er street!
</prompt>
<!-- Preparing to place the call -->
<filled>
<if cond="T_3 == 'busy'">
<prompt>
Nad to sham er Blimey!
</prompt>
<!-- The call is busy -->
<exit />
<elseif cond="T_3 == 'noanswer'" />
<prompt>
Gurt dermit, esh murka nam.
</prompt>
<!-- There is no answer -->
</if>
</filled>
</transfer>
</form>
</vxml>

<!-- Transfer destexpr-shadowVariable sample -->

Page 271 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<transfer> Element

<?xml version="1.0" encoding="UTF-8"?>


<vxml version="2.1">

<property name="com.nuance.tts.ResourceName" value="en-US.English-Male2" />


<property name="Persona" value="KeanuReeves" />
<var name="DestVar" expr="'tel:+12223334444'" />

<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.

Page 272 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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

Page 273 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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">

Page 274 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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

Page 275 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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>

Page 276 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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">

<var name="myVar" expr="'foo'" />


<form id="F1">
<block>
<prompt>
Our variable name is currently
<value expr="myVar" />.
</prompt>

<assign name="myVar" expr="'bar'" />

<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>

<!-- Action.xml -->


<?xml version="1.0"?>
<grammar xml:lang="en_us" root="ACTOR">
<rule id="ACTOR" scope="public">

Page 277 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<var> Element

<one-of>
<item> David Faustino </item>
<item> Jean Stapleton </item>
<item> Tina Yothers </item>
</one-of>
</rule>
</grammar>

<!-- Var application scope sample -->


<?xml version="1.0" encoding="UTF-8"?>
<!-- Self-referencing application root -->
<vxml version="2.1" application="ThisFile.xml">

<form id="MainMenu">
<field name="GMyFavoriteActor">
Please say your favorite Actors name

<grammar src="Actor.xml" type="application/grammar-xml" />

<filled namelist="GMyFavoriteActor">
<assign name="application.GMyFavoriteActors" expr="GMyFavoriteActor" />
<goto next="Main2.xml" />
</filled>
</field>
</form>
</vxml>

<!-- Main2.vxml -->


<?xml version="1.0" encoding="UTF-8"?>
<!-- Application value reflects the filename of the first document -->
<vxml version="2.1" application="Main.xml">

Page 278 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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

Page 279 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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

enable - Does not limit VoiceXML logging.

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.

Page 280 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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>

<voxeo:logcontrol mode="disable" />


</block>

<field name="luckyNumber" type="digits">


<prompt>
Please say your lucky number.
</prompt>
</field>

<filled>
<prompt>
You said
<value expr="luckyNumber" />
</prompt>
</filled>
</form>
</vxml>

Page 281 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<voxeo:logcontrol> Element

See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support

Page 282 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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"/>

Page 283 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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

Type: ECMAScript Expression

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

Specifies the recording format supported on the Prophecy platform.


Valid Values: One of:
Page 284 of 293
This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<voxeo:recordcall> Element

audio/wav - Wave PCM Signed 16-bit, stereo, 8000Hz, 256kbps. This is the default setting.
format

audio/x-wav - Wave PCM Signed 16-bit, stereo, 8000Hz, 256kbps.


audio/vox - Dialogic u-law, mono, 8000Hz, 64kbps
audio/pcm - Raw PCM signed 16-bit, mono, 8000Hz, 128kbps
audio/wav/ulaw - Wave u-law, mono, 8000Hz, 64kbps
audio/wav/alaw - Wave a-law, mono, 8000Hz, 64kbps
audio/x-alaw-basic - Wave a-law, mono, 8000Hz, 64kbps
audio/mpeg - MPEG Audio Layer-3, "joint stereo", 8000Hz, 24kbps
audio/mp3 - MPEG Audio Layer-3, "joint stereo", 8000Hz, 24kbps
audio/au - Sun PCM signed 16-bit, mono, 8000Hz, 128kbps
audio/gsm - Sun PCM signed 16-bit, mono, 8000Hz

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>

Page 285 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<voxeo:recordcall> Element

Thank you for calling.


All calls into this system
are recorded for training purposes.
</prompt>
</block>

<field name="F_1" type="digits?length=4">


<prompt>
Please enter your passcode to access the system.
</prompt>

<filled>
<prompt>
Thank you. Your passcode is being verified.
</prompt>

<goto nextitem="B_1" />


</filled>
</field>

<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>

Page 286 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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>

<grammar xml:lang="en-US" root = "TOP" mode="dtmf">


<rule id="TOP" scope="public">
<one-of>
<item> 1 <tag> out.caller="employee"; </tag> </item>
<item> 2 <tag> out.caller="manager"; </tag> </item>
</one-of>
</rule>
</grammar>

<filled>

<if cond="caller=='employee'">
<!-- Record 10% of employee calls. -->
<voxeo:recordcall value="10" info="employee" />

<elseif cond="caller=='manager'" />


<!-- Record 100% of manager calls. -->

Page 287 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<voxeo:recordcall> Element

<voxeo:recordcall value="100" info="manager" />

<else />
<!-- We don't know who this is so record no calls. -->
<voxeo:recordcall value="0" info="unknown" />
</if>

<goto nextitem="restOfCall" />


</filled>
</field>

<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

Page 288 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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">

Page 289 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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

Type: 2.0 | 2.1

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

Page 290 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide


xmlns:voxeo

<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">

Page 291 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<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>

<!-- Vxml application-xml:base sample -->


<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1" application="AppRoot.vxml" xml:base="http://ThisServer/ThisDirectory/">

<form id="F1">
<block>
<prompt>
Preparing to throw a global event, which is
caught by the application root document.
</prompt>

<throw event="GlobalEvent" />


</block>
</form>
</vxml>

Page 292 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

Element Reference Guide

<vxml> Element

See Also
VoiceXML Development Guide v2.1 Overview
Element Summary
Voxeo Support

Page 293 of 293


This document was created on July 8, 2015 - 2015 Aspect Software, Inc. All rights reserved. Unauthorized reproduction prohibited
by law.

También podría gustarte