cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
58
Views
0
Helpful
0
Comments
cdnadmin
Level 11
Level 11
This document was generated from CDN thread

Created by: null on 08-07-2003 08:59:32 PM
Hi,

I am trying to access session_audium_selectedName variable from VXMLInsert element to play it back.
I was able to play it back by the audio element.

But from within VXMLInsert I am getting "audium_session_nameSelected is not defined" if I assign it to local variable, or

com.audium.server.AudiumException: AUDIUM SERVER ERROR: A VoiceXML exception occurred: error.script
at com.audium.server.controller.Controller.do(Unknown Source)
at com.audium.server.controller.Controller.doPost(Unknown Source)
if I try to play it directly using value tag.

Could you help me to figure out what's wrong or missing?

Thank you.

Tatiana

Subject: RE: Error accessing session variable from VXMLInsert
Replied by: null on 08-07-2003 10:38:41 PM
Hi Tatiana,

The proper format is audium_session_nameSelected. You put session first. Does Chapter 3 in the User Guide in the section that describes VoiceXML Insert elements say to put session first? if so, let me know and I'll put a bug notice in our system.

Subject: RE: Error accessing session variable from VXMLInsert
Replied by: null on 09-07-2003 12:07:53 PM
Hi,

I'm sorry, I misspelled the variable name in the message, it is the 'audium_session_nameSelected' that I have problem with. And the error refers to the correct one.

Please help.
Thanks.

Tatiana

Subject: RE: Error accessing session variable from VXMLInsert
Replied by: null on 09-07-2003 02:35:40 PM
Hi,

I am trying to access session variables from within JSP page as well, and I've got a couple of questions about it:

1) Where in the documentation can I find the proper handling description and/or examples for JSP in the Audium? Do I put JSP as a source for some elements? Whish ones? Can I refer to JSP directly (through'submit'? or any other way?)
2) Should I always have some VXML code on the JSP page?
2) Can I put JSP page as a source for VXMLInsert element? If yes, what could be the reason of an error.badfetch that I am getting in this case ?

Thank you.

Tatiana

Subject: RE: Error accessing session variable from VXMLInsert
Replied by: null on 09-07-2003 03:50:26 PM
Hi Tatiana,

1) Are you sure the session data is named "selectedName" exactly? Session data names are case sensitive and all spaces in the name are replaced with underscores. So if the session data was named "selected Name", it would be referred to in the VoiceXML as "selected_Name".

2) Make sure there is a non-empty value in the session data. Maybe you are thinking about element data, not session data? If this is the result of a Form element, the result is stored in element data, not session data.

3) Make sure the session data is created [i:4174a1ad3d]before[/i:4174a1ad3d] the VoiceXML insert appears in the call flow. If, for example, you have a 2-option menu and the session data is created only when option 1 is chosen, they if you chose option 2, you would see exactly the errors you listed.

4) Make sure you are not resetting that VoiceXML variable somewhere in the VoiceXML page.

5) The way that Audium makes any session information (element and session data, ani, dnis, etc.) available to a VoiceXML insert is that VoiceXML variables are defined in the root document you refer to in the VoiceXML insert page. That is why you simply refer to audium_session_selectedName, that variable is defined in the root document. If you do not refer to the Audium-generated root document in your VoiceXML Insert element, none of these variables would be available and you'd get the errors you see.

If all of these are ok, then please attach the VoiceXML code you are using to this thread and I'll look at it. It would also be good if you zip up the application you are using and attach that too.

As for answering your other questions, I will make the assumption you are still asking with regards to a VoiceXML Insert element since these answers are not correct for anything else.

To recap, remember that all a VoiceXML Insert element is is a <subdialog>. The Audium Server produces a VoiceXML page that has a <subdialog> tag in it and the rest is up to you. Once the subdialog URL is visited, it is completely out of the hands of the Audium Server. Anything you can do with JSP and VoiceXML with your browser, you can do in a VoiceXML Insert element.

So when you enter a URL in the Builder for the source of the VoiceXML insert, it can be any valid URl, even a JSP. Remember, the URL you enter is accessed by [b:4174a1ad3d]the voice browser[/b:4174a1ad3d], not the Audium server, so the URL must be visible from the voice browser. Using "localhost", for example, will not work and will cause a bad fetch.

As for having VoiceXML on a page, if your browser supports returning a page that contains no VoiceXML, you can do it (though I know of no voice browser that allows that). Remember, in a VoiceXML insert element, you are going directly to the voice browser, so whatever it allows you can do.

You can do whatever you wish within a VoiceXML Insert, even refer to muplitpl JSP pages with submits. As long as you eventually use a <return> to go back to the Audium Server, everything will be fine.

Again, this is for VoiceXML inserts only. You cannot do this in a custom element since you will lose all session information if you do a submit in the middle of an element to an external JSP page.

Hope this helps.

Subject: RE: Error accessing session variable from VXMLInsert
Replied by: null on 09-07-2003 07:15:48 PM
It worked, thanks a lot!

Tatiana
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links