If an application consists of more than one vxml file, it is difficult to maintain session using the voice server. Is there a way to maintain a same session between two vxml when passing program control from one vxml to another?
Can any parameters be held as a session variables in the voice server?
eg.
Say welcome.xml has separate validation part in a web server. So it needs to reload another vxml (say validate.xml) after validation occurs. Therefore It is required to maintain the same session in between the welcome.xml and the validate.xml.
We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics
Maintaining a session
maintaining set of "global" variables in IVR appli
Hi,
You can maintain a set of "global" variables in an IVR application root document (look here for an overview on VXML applications).
You can specify a root document using the IVR application attribute of the <vxml> element in each of your IVR application pages. E.g.
<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" application="my_root_doc.vxml">
The "my_root_doc.vxml" file would contain the actual declarations of any global variables in you IVR application.
Hope this helps.
Regards,
Plum Support
You can maintain a set of "global" variables in an IVR application root document (look here for an overview on VXML applications).
You can specify a root document using the IVR application attribute of the <vxml> element in each of your IVR application pages. E.g.
<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" application="my_root_doc.vxml">
The "my_root_doc.vxml" file would contain the actual declarations of any global variables in you IVR application.
Hope this helps.
Regards,
Plum Support
Last edited by support on Thu Feb 25, 2010 1:33 pm, edited 2 times in total.
I had the same question actually...
however if you go to another location to run a script or post variables - such as with php or perl or asp - then the application scope is gone.
I read that if you use a submit or a data tag then the application scope gets re-initialized because the application root page has to be reloaded?
is this true or will the application scope persist through these calls?
however if you go to another location to run a script or post variables - such as with php or perl or asp - then the application scope is gone.
I read that if you use a submit or a data tag then the application scope gets re-initialized because the application root page has to be reloaded?
is this true or will the application scope persist through these calls?
IVR application scope
The IVR application scope should persist through the IVR session for all non-subdialog vxml pages as long as all of these pages reference the same root document.
There's a more in-depth discussion of IVR application scope here:
http://www.w3.org/TR/voicexml20/#dml1.3
There's a more in-depth discussion of IVR application scope here:
http://www.w3.org/TR/voicexml20/#dml1.3
Last edited by support on Thu Feb 25, 2010 1:33 pm, edited 2 times in total.
IVR tag tutorial
Hello,
There has been some confusion on the forum lately about what page transitions, the <data> tag and the <subdialog> tag. Here is a quick breakdown:
1. Root documents are used to retain information across multiple VoiceXML documents in ECMAScript variables. If you declare the same root document for every page you transition to the information stored in its ECMAScript scope will be retained between page transitions. If you transition to a page that does not include this root document all ECMAScript information is discarded. This IVR feature does not really have an equivalent in the HTML world. It is a global document that used to store ECMAScript data, <link> tags and error handlers.
2. Page transitions are caused by <goto>, <submit> and <link> tag execution. These tags trigger a GET or POST to your IVR application server. This is the prefered method for exchanging information between your VoiceXML application and your web server. It follows the traditional "document -> POST/GET -> new document" model and should be very familiar for web developers
3. The <data> tag is for retrieving information from a web server without performing a page transition. The data retrieved (via POST or GET) will be parsed as XML data and will be placed into a ECMAScript DOM structure. The data in that DOM Structure will be available after the <data> tag is executed. This is similar to using AJAX in a modern web application, the exception being that the <data> tag is not Asynchronous.
4. The <subdialog> tag is for executing small segments of reusable VoiceXML that will return to the calling document rather than performing a complete page transition. This allows you to create a VoiceXML script for a specific task and then reuse it in multiple locations in your application. For example if you write a VoiceXML page for collecting credit card information you could call it using <subdialog>. The result of the subdialog are returned to any document that uses it in the same consistent manner (avoiding custom page transitions and dynamic page creation). This is similar to using frames in HTML where a new inner document is displayed without losing the outer document's context.
Hope this IVR tag tutorial helps!
Regards,
Plum Support
There has been some confusion on the forum lately about what page transitions, the <data> tag and the <subdialog> tag. Here is a quick breakdown:
1. Root documents are used to retain information across multiple VoiceXML documents in ECMAScript variables. If you declare the same root document for every page you transition to the information stored in its ECMAScript scope will be retained between page transitions. If you transition to a page that does not include this root document all ECMAScript information is discarded. This IVR feature does not really have an equivalent in the HTML world. It is a global document that used to store ECMAScript data, <link> tags and error handlers.
2. Page transitions are caused by <goto>, <submit> and <link> tag execution. These tags trigger a GET or POST to your IVR application server. This is the prefered method for exchanging information between your VoiceXML application and your web server. It follows the traditional "document -> POST/GET -> new document" model and should be very familiar for web developers
3. The <data> tag is for retrieving information from a web server without performing a page transition. The data retrieved (via POST or GET) will be parsed as XML data and will be placed into a ECMAScript DOM structure. The data in that DOM Structure will be available after the <data> tag is executed. This is similar to using AJAX in a modern web application, the exception being that the <data> tag is not Asynchronous.
4. The <subdialog> tag is for executing small segments of reusable VoiceXML that will return to the calling document rather than performing a complete page transition. This allows you to create a VoiceXML script for a specific task and then reuse it in multiple locations in your application. For example if you write a VoiceXML page for collecting credit card information you could call it using <subdialog>. The result of the subdialog are returned to any document that uses it in the same consistent manner (avoiding custom page transitions and dynamic page creation). This is similar to using frames in HTML where a new inner document is displayed without losing the outer document's context.
Hope this IVR tag tutorial helps!
Regards,
Plum Support