Audium Knowledge Base

Knowledgebase Home | Contact Knowledgebase Home | Contact
Search the Knowledgebase Jump to ID Browse by Category
How to test deployed Audium applications in a web browser
Categories: Audium Call Services 3.4.x and 3.5
Article ID: 14
Last updated: January 30, 2008
User Opinions
100% 0% (1 vote)

How would you rate this answer?
Helpful
Not helpful
SUMMARY

This article explains how to do some simple testing of deployed Audium applications using a web browser on a local machine.

SYMPTOMS

To test proper dialog design, one must call into an application using a web browser. Other tests, however, such as testing if a custom element produces the correct VoiceXML, testing if a start of call class is executed correctly, or other simple tests can also be done without involving a voice browser.

Any web browser can act as a voice browser, provided the user follows the same process a voice browser performs when interpreting the VoiceXML produced by Audium. This article describes everything you need to "simulate" a voice browser using a web browser.

RESOLUTION

The First VoiceXML Page

To obtain the first VoiceXML page of an application, simply enter the URL a voice browser would access in a web browser. If the web browser appears on the same machine as Audium Call Services, the IP address can be replaced with "localhost". For example, to call the HelloWorld application in a web browser assuming that the application server listens on port 8080, one would enter:

http://localhost:8080/Audium/Server?audium_application=HelloWorld

The web browser will then show the first VoiceXML page.

Subsequent Pages

Now, since Audium Call Services treats a phone call as a "session", a cookie is used to keep track of it. The web browser handled this cookie once the first VoiceXML page was returned. If you look at the cookies on the web browser, you will see one for "localhost". In order to view the subsequent VoiceXML pages, one must enter the next URL in the same browser window or a window that was "derived" from this window. For example, in Internet Explorer, choosing File->New->Window will create another window derived from the first. Clicking on the IE icon in the taskbar will not.

In order to view the subsequent VoiceXML pages, one must read the VoiceXML and find the <SUBMIT>that applies to the result you wish to follow. Every <SUBMIT>will include various arguments that must be included in the URL in order to properly simulate a phone call. Simply place these arguments in the URL in between '&' characters. For example, if the VoiceXML contains the following submit:

<SUBMIT enctype="application/x-www-form-urlencoded" namelist="foundation_fld audium_vxmlLog confidence" method="post" next="/Audium/Server" />

the arguments are "foundation_fld", "audium_vxmlLog", and "confidence". Let's say that in this example, the data captured and stored in "foundation_fld" was "apple" and the confidence was 83%. The URL you would call would look something like:

http://localhost:8080/Audium/Server?foundation_fld=apple&confidence=0.83&audium_vxmlLog=my_logging_content

All submits will have the "audium_vxmlLog" argument which is used for interaction logging. You can leave this out if you wish - you will simply get no interaction content stored in the activity log. The other data is required.

http://localhost:8080/Audium/Server?foundation_fld=apple&confidence=0.83

Hanging Up

As long as Audium Call Services believes that a phone call is connected to it, an Audium port will be used. Only when the phone call hangs up will the port become available again. When simulating the call in a web browser, failing to simulate a hangup will continue to occupy the port until the internal timeout mechanism takes over (a default of 30 minutes). This can quickly fill up all the ports on Audium Call Services, necessitating a restart to quickly reset the ports. Therefore, when one is simulating a phone call, one must simulate a hangup by calling the URL:

http://localhost:8080/Audium/Server?audium_action=hangup

Once this URL is called, the Audium port is closed and the window can be used to simulate another call.

Tips

- Don't use the Back and Forward buttons, they will yield inconsistent results and most likely cause an error.
- To simulate a brand new call, it is best to open up a brand new browser window (clicking on the browser icon in the taskbar or quitting and starting the browser again will work). One can use the same window, but there can be some inconsistent behavior. Another tactic is to delete the localhost cookie.
- Only the first URL need include the application name, the Server knows the application name via the cookie.
- If you want to see the application root document, you must first bring up the first VoiceXML page before the root document becomes available.
- To quickly go to a VoiceXML page deep in an application, open up a new browser window, then make many browser windows derive from it. Then start from the first window and enter the first URL, then enter the second URL in the second window, and so on. This process will allow you to go back through the same place for another phone call by simply selecting each window in turn and pressing the Reload button.

Visitor Comments
  1. Comment #1 (Posted by AudiumVance)
    It is sometimes useful to test the max nomatch and max noinput exit states of elements, and so this comment will explain how to accomplish this. Using a web browser you can simulate max nomatch (as configured in Audium Studio) by passing the "maxNoMatch" parameter in the URL, with a value of "yes". An example of a URL with this parameter is: http://myip:myport/Audium/Server?foundation_fld=grape&confidence=0.12&maxNoMatch=yes (Note that this is a response to a Form element, and foundation_fld will have a value that is specified in the element's grammars.) However, you cannot simulate each individual nomatch event, since these would normally be handled by the voice browser, without relying on Audium Call Services. After the final nomatch event or after a successful input, log entries are sent back to Audium Call Services to log any previous nomatch events.
     
  2. Comment #2 (Posted by AudiumVance)
    In Audium Call Services 3.5 there is a new required HTTP paramter for each request you simulate in your web browser. Each request should include a parameter called "the_main_field_name", with a value as specified in the VoiceXML (search for this string in the VoiceXML and you can easily find the expected value for this parameter). This parameter was added to allow for enhanced element functionality, which means that it should also now be specified when testing manually in a web browser.
     
Related Questions
Attachments
No attachments were found.

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