Audium Knowledge Base

Knowledgebase Home | Contact Knowledgebase Home | Contact
Search the Knowledgebase Jump to ID Browse by Category
How to retrieve the value of VoiceXML session variables using a custom element
Categories: Audium 3.2.x, Audium 3.3.x, Audium Call Services 3.4.x and 3.5
Article ID: 28
Last updated: February 18, 2007
User Opinions
No users have voted.

How would you rate this answer?
Helpful
Not helpful
SUMMARY

This article demonstrates how to submit voice browser session variables back to the Audium voice application; variables may then be accessed by other elements in the application.

SYMPTOMS

The voice application requires particular browser session variables (ANI, DNIS for example) that exist as voice browser session variables but are not sent as parameters on the initial HTTP request to the Audium application.  As a result, certain call data may have "NA" values and other session data may not be created.

RESOLUTION

Voice browser does not pass back necessary voice browser session data on the initial HTTP request at the start of the application.

If the voice browser passes the browser session variables as a parameters on the initial HTTP request for the voice application, the values will be read in by the Audium server and be available as either call data or session data (this is determined by the type of data). However, if the desired information is not passed by the browser as a parameter but exists as a VoiceXML session variable (browser side), a custom element must be created that produces VoiceXML which specifies which VoiceXML session variables to pass back to the server and store as session data.

Audium has created a custom element (VXML Session Variable Logger) that has this functionality. The element allows the developer to specify any number of browser side VoiceXML session variables to be stored as Audium session data using a repeatable element setting. New Audium session data will be created using the name of the variables specified in the settings. Wherever the element is placed in the call flow, a VoiceXML page will be generated that results in the defined browser session variables being passed back to the server, stored as session data and logged in the application activity log.

For example, two VoiceXML session variables are

session.telephone.ani
session.telephone.dnis

If these two variables are specified as "VXML session variables" in the custom elements settings (separate settings), new Audium session data will be created of the same name. The attached a sample application shows this behavior, and has the custom element copied into its SessionVarTestApp/java/application/classes directory so it is available in the builder as a "Local Element" only for this particular application.  In order to make the custom element accessible by all applications, the attached class file should be copied to AUDIUM_HOME/java/applications/classes.

Note that this element has been developed as a sample custom element.  It is currently not included in the Audium release and therefore not supported as part of the software.  Also, using this element results in an additional HTTP request/response that does not play any audio or capture input from the caller.  Therefore, it is possible that performance of the application could be impacted.  By putting this element as the first element in the application, the chance any noticeable impact will be decreased. 

Posted files:

Custom element source/class: VXMLSessionVariableLogger.zip
Sample application: SessionVarTestApp.zip

Note:  The sample application was created using Audium 3.2.2 with the voice browser set to SpeechGenie VXML 2.0.  Additionally, the voice browser session variables defined in the element may not necessarily be accessible on other supported browsers.  Depending on the voice browser being used and associated VoiceXML session data names, the elements in the sample application should be modified accordingly.

Update 5/17/06: We have attached a new version of this element, which was compiled under Audium Call Services 3.5.  Additionally, this new version of the element has revised source code for improved readability.  The class name and settings have remained the same as the earlier version, for backwards-compatibility.  If you are using Audium Call Services 3.5 or higher, please use VXMLSessionVarLogger-updated-CS3.5.zip, for earlier versions please refer to the older attachments.
Visitor Comments
No visitor comments posted. Post a comment
Related Questions
Attachments

Copyright (c) 2005 Audium Corporation. All rights reserved.
Audium Home | Audium Support Center Home | Audium Customer Care Home