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

Sumbit Return not working

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
zone24x7
Posts: 29
Joined: Fri May 19, 2006 7:50 am

Sumbit Return not working

Post by zone24x7 »

This is my sample code
<vxml version="2.0">
<form id="login">
<field name="userid" type="digits">
<prompt>Please enter your ID number</prompt>
</field>
<field name="pwd" type="digits">
<prompt>Please enter your password</prompt>
</field>
<filled>
<submit next="http://serverip/default.asp" namelist="userid" method="get"/>
</filled>
</form>
<form id="out">
<block>
<prompt> Good Bye.</prompt>
<disconnect/>
</block>
</form>
</vxml>

submit will call a ASP page which will depending on the successful validation will create the vxml as follows

<vxml version="2.0">
<form>
<block><prompt>Your user id number is valid.</prompt>
<goto next="#out"/>
</block>
</form>
</vxml>
i assumed that the 2nd vxml will be returned to the caller form but
this does not return to the initial vxml document when the user is validated it will give the msg that user is valid and without going to "goto next' it gives a error. how can i make this return to the form out?

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

IVR script for collecting input on one page

Post by support »

Hello,

You are confusing how VoiceXML works. VoiceXML like HTML is meant to perform page transitions. If you are on a given page, you perform a <submit> and the results of which represent the new page. So, for IVR example, if you are collecting input on one page:

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">
<form id="login">
	<field name="userid" type="digits">
		<prompt>Please enter your ID number</prompt>
	</field>
	<field name="pwd" type="digits">
		<prompt>Please enter your password</prompt>
	</field>
	<filled>
		<submit next="http://serverip/default.asp" namelist="userid" method="get"/>
	</filled>
</form>

<form id="out">
	<block>
		<prompt> Good Bye.</prompt>
		<disconnect/>
	</block>
</form>
</vxml>
When the browser hits the submit tag it performs a submit just like a web browser would. Once the page returned is validated the IVR system discards all information from the previous page. The page represents the entire context of the IVR system. Therefore any "local" transitions you perform must be to the current page. The following IVR script will fail because there is no local form with the id "out":

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">
<form>
	<block>
		<prompt>Your user id number is valid.</prompt>
		<goto next="#out"/>
	</block>
</form>
</vxml>
You should be placing the contents of the form id "out" from the first page in the second page so it can be accessed. If you wish to perform authentication without performing a page transition you should use either the <subdialog> or <data> tag. These IVR tags will make the page request and when that page completes control is returned back to the main page. These are similar to a frame or AJAX request in html. Hope this helps.

Regards,
Plum Support[quote][/quote]

Post Reply