We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics

using subdialogs for prompts only

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
kmanley
Posts: 6
Joined: Thu Mar 16, 2006 3:47 pm
Location: London, UK

using subdialogs for prompts only

Post 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>

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

sample of IVR saynumber form

Post 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>

Post Reply