Flow control

When the VoiceXML browser starts, it uses the URI you specify to request an initial VoiceXML document. Based on the interaction between the application and the user, the VoiceXML browser may jump to another dialog in the same VoiceXML document, or fetch and process a new VoiceXML document.

VoiceXML provides a number of ways for managing flow control. For example, the <link> element specifies a control common to all dialogs in the link's scope.

<link event="help">
<link next="http://www.yourbank.example/locations.vxml/">

The <goto> element directs the flow to another dialog or item in the same or different document.

<goto nextitem="field1"/>

The <submit> element is like the <goto> element but provides for submitting variables to the server.

<submit next="/servlet/start" namelist="family_name date_of_birth"/>

The <choice> element lists a menu choice.

<choice next="#option1">Account balance </choice>

If no transition is specified to a new dialog, the VoiceXML browser will exit when no more fields remain unprocessed in the current dialog.