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

Created by: null on 15-06-2005 12:52:38 PM
Hi,
I want to collect output from an VoiceXML insert element. I have used the following code in VXML insert element, but it returns a null value to the next decision element. I have decclared a variable called "result" and returned the value using a return tag. Can you help me to resolve this issue. Class file is also attached[code:1:f5d32ce8ca]
<?xml version="1.0"?>
<!DOCTYPE vxml PUBLIC "-//Nuance/DTD VoiceXML 2.0b//EN" "http&#58;//voicexml.nuance.com/dtd/nuancevoicexml-2-0.dtd">
<vxml version="2.0" application="/Audium/Server?audium_vxml_root=true&#38;amp;calling_into=VoiceXMLInsert&#38;amp;namelist=element_log_value">

<menu id="MainMenuCLI">
<property name="inputmodes" value="dtmf"/>
<property name="interdigittimeout" value="0s"/>

<audio>
If you would like to be connected to your nearest store, press 1
If you would like to be connected to any other store, press 2.
If you are an existing customer and require further customer service, press 3.
</audio>
<choice dtmf="1" next="#TransferToClosestStore"/>
<choice dtmf="2" next="#AnotherStore"/>
<choice dtmf="#" next="#Reception"/>
<noinput>
<audio>
Please make your selection.
</audio>
<reprompt/>
</noinput>
<nomatch>
<audio>
The selection is invalid.
</audio>
<reprompt/>
</nomatch>
<catch event="noinput nomatch" count="3">
<throw event="com.telstra.ess.transfertocallcentre"/>
</catch>
</menu>
<form id = "TransferToClosestStore">
<block>
Transferring you to Reception. Thank You.
<var name="result" expr="'1'"/>
<assign name="audium_exit_state" expr="'done'"/>
<<return namelist="audium_exit_state result" />

</block>
</form>

<form id = "AnotherStore">
<block>
Transferring to another store. Thank You.
<var name="result" expr="'2'"/>
<assign name="audium_exit_state" expr="'done'"/>
<return namelist="audium_exit_state result" />
</block>

</form>

<form id = "Reception">
<block>
Transferring you to Reception. Thank You.
<var name = "result"/>
<assign name="audium_exit_state" expr="'done'"/>
<assign name="result" expr="'#'"/>
<return namelist="audium_exit_state result" />
</block>

</form>
</vxml>
[/code:1:f5d32ce8ca]
Following is the code that getting the VoiceXML insert data.
[code:1:f5d32ce8ca]
import com.audium.server.AudiumException;
import com.audium.server.voiceElement.*;
import com.audium.server.session.DecisionElementData;

public class CheckHash extends DecisionElementBase implements ElementInterface
&#123;
public String doDecision&#40;String name, DecisionElementData decisionData&#41; throws AudiumException
&#123;
String input = decisionData.getElementData&#40;"insert_vxml", "result"&#41;;

System.out.println&#40;"Dtmf output from VXML Insert Element&#58;" +input&#41;;

if &#40;counter.equals&#40;"1"&#41;&#41;
return "one";
else if&#40;counter.equals&#40;"2"&#41;&#41;
return "two";
else
return "hash";
&#125;
&#125;[/code:1:f5d32ce8ca]

Subject: RE: Getting data from VoiceXML insert element
Replied by: Vance Vagell on 15-06-2005 02:55:51 PM
Hi Jaison,

The line of code:

[code:1:5738a8f82d]
<assign name="result" expr="'#'"/>
[/code:1:5738a8f82d]

does not follow the necessary naming conventions. The correct code is:

[code:1:5738a8f82d]
<assign name="element_log_result" expr="'#'"/>
[/code:1:5738a8f82d]

Audium needs this extra naming information so that it knows where to store the data, and whether or not the data should be logged. For more details about VoiceXML Insert elements and naming conventions, please refer to the "VoiceXML Insert Elements" section of the User Guide.

On a related note, you might considering using Audium's pre-built elements for the tasks you are currently using VoiceXML Insert elements for. That would help avoid many of these code-level errors, and is a good way to modularize your application.

Regards,
Vance

Subject: RE: Getting data from VoiceXML insert element
Replied by: Graham Whitelam on 12-10-2011 05:38:04 AM
Can anybody tell me where I can find the documentation about the conventions used by the VoiceXMl insert element please? The link on this old post does not work. I can't find anything in the Cisco documentation, only a two page overview of what the element is used for and no detail about how to actually use it. Any help would be greatly appreciated.

Subject: RE: New Message from Graham Whitelam in Customer Voice Portal (CVP) - Gener
Replied by: Hemal Mehta on 12-10-2011 08:37:30 AM
Hello Graham,

          VoiceXML insert is nothing but a way to add/use  voicexml code to your project. Essentially studio code gets converted to voicexml code to be interpreted by the voice browser.  As far the conventions, it is essentially needs to be compliant to Voicexml 2.0/2.1 specs depending on what you chose in Studio VoiceXML gateway./  when you created the project. Here is a link that shows some info about VoiceXML insert:

http://www.cisco.com/en/US/docs/voice_ip_comm/cust_contact/contact_center/customer_voice_portal/cvp8_0/user/guide/cvp_801_vxml.pdf



Look at page 16.



Also go to Studio help and look for VoiceXML insert. It will give you more details on how to use it.

It give you  a lot of power and you can write low level vxml code using this.



I am attaching the usage. Not sure, if it will show up correctly:





VoiceXML Insert Elements Definition There are certain situations in a voice application where a developer may wish to include pre-written VoiceXML into their voice application. The developer may desire fine-level control over a specific voice function at the

                 
VoiceXML Insert Elements
Definition
There are certain situations in a voice application where a developer may wish to include pre-written VoiceXML into their voice application. The developer may desire fine-level control over a specific voice function at the VoiceXML tag level without having to get involved with constructing a custom configurable element in Java. Additionally, the developer may wish to integrate VoiceXML content that has already been created and tested into a voice application. These situations are handled by a VoiceXML Insert element.
VoiceXML Insert Element

A custom element built in VoiceXML providing direct control of lower-level voice dialog at the price of decreased flexibility.

VoiceXML Insert elements contain VoiceXML code that the developer makes available as the content of a VoiceXML <subdialog>. The content can be in the form of static VoiceXML files, JSP templates, or even dynamically generated by a separate application server. A framework is provided to allow seamless integration of VoiceXML Insert elements with the rest of the call flow.
The use of VoiceXML Insert elements has its consequences such as the loss of being able to seamlessly switch between different voice browsers, some greater processing overhead involved with integration with the rest of the call flow, as well as the added complexity of dealing with VoiceXML itself rather than creating an application with easy to use configurable elements.
VoiceXML Insert elements can have as many exit states as the developer requires, with a minimum of one.
Defining a VoiceXML Insert Element
Defining a VoiceXML Insert element is very much like defining a generic Decision element in that the designer first provides the source of the VoiceXML Insert Element (which in this case is a URI to the VoiceXML content) as well as defining the exit states the element can return. Unlike a Decision element, a VoiceXML Insert Element can have a single exit state.
[http://127.0.0.1:55912/help/ntopic/com.audiumcorp.studio.doc.user/docs/studio/builder/images/insert1.jpg]
The designer can choose to pass only some runtime information to the VoiceXML Insert Element in order to avoid performance overhead involved in passing information that may not be used. The choices are:

  *   Passing all element and session data to the VoiceXML Insert Element. Note that in a large application, element and session data make up the bulk of runtime information and passing it all can slow down the performance of the system. It is recommended to turn this option off and use the Data tab to choose the element and session data variables that will be needed from within the VoiceXML Insert Element. For element data, the name of the VoiceXML variable that will contain the value is renamed to start with the element name followed by an underscore, then the name of the element data. Session data names are unchanged. Also note that any Java objects passed in session data will pass the result of calling the toString() method on it.
  *   Telephony information such as the ANI, DNIS, etc.
  *   Call data such as the start time, name of the application, session ID, etc.
  *   Element history indicating which elements have been visited in the call and the corresponding exit states of those elements.
  *   Information about the current user. This is only applicable if the User Management system is activated for the application.

[http://127.0.0.1:55912/help/ntopic/com.audiumcorp.studio.doc.user/docs/studio/builder/images/insert2.jpg]
[http://127.0.0.1:55912/help/ntopic/com.audiumcorp.studio.doc.user/docs/studio/builder/images/insertshape.gif]






________________________________
From: Cisco Developer Community Forums [cdicuser@developer.cisco.com]
Sent: Wednesday, October 12, 2011 4:38 AM
To: cdicuser@developer.cisco.com
Subject: New Message from Graham Whitelam in Customer Voice Portal (CVP) - General Discussion: RE: Getting data from VoiceXML insert element

Graham Whitelam has created a new message in the forum "General Discussion":

--------------------------------------------------------------
Can anybody tell me where I can find the documentation about the conventions used by the VoiceXMl insert element please? The link on this old post does not work. I can't find anything in the Cisco documentation, only a two page overview of what the element is used for and no detail about how to actually use it. Any help would be greatly appreciated.
--
To respond to this post, please click the following link:

<http://developer.cisco.com/web/cvp/forums/-/message_boards/view_message/4593201>

or simply reply to this email.
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