legacy:vxi_developer_guide:voicexml_references:elements:link

< link >

A < link > element may have one or more grammars. The grammars are in the scope of the element containing this <link> element. When the user input matches one of the linked grammars, it activates the < link > to either throw an event, or transition to another document or dialog.

<link
next="URI"
expr="ECMAScript_Expression"
event="event"
dtmf="DTMF Sequence"
fetchaudio="URI"
fetchhint="prefetch" | "safe"
fetchtimeout="time_interval"
maxage="time_interval"
maxstale="time_interval">
child_elements
</link>
nextThe next attribute is the URI to transition when a match is recognized. This attribute is required. One and only one of the next, expr, event or eventexpr attributes are required.
exprThe expr attribute is an expression that yields the URI to transition when a match is recognized. This attribute is required. One and only one of the next, expr, event or eventexpr attributes are required.
eventThe event attribute is the event to throw when the user input matches one of the linked grammars. This attribute is required. One and only one of the next, expr, event or eventexpr attributes are required.
eventexprAn ECMAScript expression evaluating to the name of the event to throw when the user matches one of the link grammars.One and only one of the next, expr, event or eventexpr attributes are required.
dtmfThe dtmf attribute indicates the DTMF sequence for this link. It is equivalent to a simple DTMF <grammar>. This attribute can be used concurrently with other grammars, as the link is activated when user input matches a linked grammar or the DTMF sequence. This attribute is optional.
fetchaudioThe fetchaudio attribute is the URI of audio to play while waiting for the next document to be fetched. This attribute is optional.
fetchtimeoutThe fetchtimeout attribute is the time interval to wait for an audio file to be fetched before playing the alternate content. This attribute is optional.
fetchhintThe fetchhint attribute defines when the audio file should be retrieved. This attribute is optional.
* prefetch – the audio file may be downloaded when the page is loaded.
* safe – the audio file loads only when needed.
maxageThe maxage attribute indicates the maximum time in seconds that this document will use this file before fetching another copy. This attribute is optional.
maxstaleThe maxstale attribute indicates the maximum time in seconds that this document will use the file that exceeded the maxage time. This attribute is optional.
<field>, <form>, <initial>, <vxml>
<grammar>
None.
None.
<?xml version="1.0"?>
<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml">
 <link event="goodbye" dtmf="1"/>
 <catch event="goodbye">
  <prompt>Thank you for trying this script, goodbye.</prompt>
  <exit/>
 </catch>
 <form>
  <field name="hello" type="digits">
   <prompt>Say hello</prompt>
   <noinput>Say something</noinput>
   <filled>
    <prompt>Hello, world!</prompt>
   </filled>
  </field>
 </form>
</vxml>
  • legacy/vxi_developer_guide/voicexml_references/elements/link.txt
  • Last modified: 2017/07/28 23:53
  • by javier