Specifies a value to pass to a subdialog or object element.

expr = "ECMAScript_Expression"
name = "string"
value = "string"


A JavaScript expression assigned to the value of the parameter.


Required. The name of the variable to initialize within the subdialog or object element.


A literal string that is assigned to name (if expr is not specified).

The value and expr attributes are mutually exclusive.

The following example passes three parameters to a generic confirmation dialog. The first parameter is the path to the recorded prompt. The second parameter is the corresponding TTS prompt. The third parameter indicates whether the default prompt, "Say yes or no," should be played.

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

   <var name="confirm_wav" expr="'cancelorder.wav'"/>
   <var name="confirm_tts" expr="'Are you sure you want to cancel this order?'"/>

   <form id="main">
   <subdialog name="oResult" src="#generic_confirm">
      <param name="wav" expr="confirm_wav"/>
      <param name="tts" expr="confirm_tts"/>
      <param name="play_yesno" value="true"/>
      <if cond="oResult.confirmed">
         canceling order
         keeping order

   <!-- generic confirmation dialog -->
   <form id="generic_confirm">
      <var name="wav"/> <!-- custom recorded prompt -->
      <var name="tts"/>  <!-- custom tts prompt -->
      <var name="play_yesno"/> <!-- play the standard prompt -->
      <field type="boolean" name="yesno">
            <audio expr="wav"><value expr="tts"/></audio>
            <if cond="play_yesno">
               Say yes or no

         <catch event="noinput nomatch">
            Sorry. I didn't get that. Please say yes or no.

            <var name="confirmed"/>
            <if cond="yesno">
               <assign name="confirmed" expr="true"/>
                <assign name="confirmed" expr="false"/>          
            <return namelist="confirmed"/>


Community Additions