Page 1 of 1

using subdialogs for prompts only

Posted: Wed Apr 05, 2006 6:22 am
by kmanley
Hi, I'm trying to use subdialogs to encapsulate and reuse prompt logic. In the example below however, only the first subdialog is executed, not the second. Am I abusing subdialogs or should this be expected to work?
Thanks,
Kevin

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">
    <form>

        <subdialog src="#saynumber">
            <param name="theValue" expr="53"/>
        </subdialog>

        <subdialog src="#saynumber">
            <param name="theValue" expr="99"/>
        </subdialog>

    </form>


    <form id="saynumber">
    	<var name="theValue"/>
	<block>
    	<prompt>
		The number is
    		<say-as type="number"><value expr="theValue"/></say-as>
	</prompt>
	</block>
    </form>


</vxml>

sample of IVR saynumber form

Posted: Wed Apr 05, 2006 12:08 pm
by support
You neglected to add a <return/> tag to your <subdialog> block. So the IVR saynumber form should look like this:

Code: Select all

<form id="saynumber">
        <var name="theValue"/>
        <block>
                <prompt>
                        The number is
                        <say-as type="number">
                                <value expr="theValue"/>
                        </say-as>
                </prompt>
                <return/>
        </block>
</form>