Subdialogs

VoiceXML subdialogs are roughly the equivalent of function or method calls. A subdialog is an entire form that is executed, the result of which is used to fill one input item in the calling form. You can use subdialogs to provide a disambiguation or confirmation dialog (as described in Error recovery), as well as to create reusable dialog components for data collection and other common tasks.

Executing a <subdialog> element temporarily suspends the execution context of the calling dialog and starts a new execution context, passing in the parameters specified by the <param> element. When the subdialog has completed, it uses a <return> element to resume the calling dialog's execution context. The calling dialog accesses the results of the subdialog through the variable defined by the <subdialog> element's name attribute.