VoiceXML Development Frequently Asked Questions

This FAQ contains answers to questions about VoiceXML development.

  1. I'm not seeing output from the Studio Debug Log for my phone call.
  2. The VoiceXML Syntax Checker says my code is OK, but I get a run-time error when I run it.
  3. The Debug Log reports a Javascript error on a line of code that contains only VoiceXML and no Javascript.
  4. Numerical comparisions within the cond attribute of the if element seem to yield incorrect results.
  5. When I run my application, at some point I hear "bad format" instead of my recorded audio.
  6. Why would VoiceXML, Javascript, or grammar file retrievals time out if I'm reasonably sure that my Web server is OK?
  7. I'm getting an "ERROR STATE: *UNNAMED*" error in the Debug Log.
  8. The Debug Log reports an XML parse error at the very top my of my VoiceXML code.
  9. I have a boolean expression that is evaluating incorrectly. What's going on?
  10. I have problems retrieving VoiceXML pages from my Apache NT server.
  11. I have problems retrieving VoiceXML documents from my IIS server on a Windows NT Workstation.
Q: I'm not seeing output from the Studio Debug Log for my phone call.
A: First, make sure that you're using the same Developer ID sign in for both the Tellme Studio website and for your current phone call. Developers who've created multiple Developer IDs can't log in to the website with one Developer ID and call the phone application with a different Developer ID. Second, be sure to click the "Debug Log" button before, or shortly after, beginning your current call. If you wait too long, Tellme Studio will think that your call is old and not display the Debug Log contents for that call. In general, the Debug Log contents should be available within 15 minutes of a call; in most cases, the response will be in real-time.

Q: The VoiceXML Syntax Checker says my code is OK, but I get a run-time error when I run it.
A: Like a compiler, the syntax checker only guarantees that your VoiceXML document is well-formed XML and that it is valid according to the rules established by the VoiceXML Document Type Definition (DTD). Because VoiceXML is executed like a programming language, errors can occur at run-time that are not detectable during the validation process.

To track down and resolve run-time errors, use the Tellme Studio debug log to trace through your code. Add log elements to your code to analyze the state of your program as it executes.

Q: The Debug Log reports a Javascript error on a line of code that contains only VoiceXML and no Javascript.
A: Some attributes (expr, cond) in VoiceXML require JavaScript expressions. Errors in an attribute that requires a Javascript expression are reported as a Javascript error in the Debug Log. To learn more about JavaScript expressions in VoiceXML, see Using JavaScript

Q: Numerical comparisions within the cond attribute of the if element seem to yield incorrect results.
A: Keep in mind that the cond attribute is evaluated by the Javascript engine. When making a numerical comparison, make sure that the variables involved in the comparison are numbers. You can use the var element to declare a variable of any valid type. You can use the native Javascript functions parseInt and parseFloat to explicitly convert variables to an integer or float respectively. The Javascript language can implicity convert variable during a comparison, but it may perform a lexical comparison (e.g. '13' < '3') resulting in an unexpected result. Example of using parseInt(): <var name="i" expr="'3'"/> <!-- i is a string --> <if cond="parseInt(i, 10) == iMax"> <goto next="#abort"/> </if>

Q: When I run my application, at some point I hear "bad format" instead of my recorded audio.
A: Check the value of the src and expr attributes of the audio elements within your appliccation for incomplete URLs. For example, if your code references "http://myserver/mypath/" instead of "http://myserver/mypath/myfile.wav" your Web server may return a 'friendly 404' HTML page. The VoiceXML interpreter will fetch the requested URL, and since it won't recognize the HTML as a valid audio format, it will play an error. You should also consider including a TTS string within each of your audio elements.

Q: Why would VoiceXML, Javascript, or grammar file retrievals time out if I'm reasonably sure that my Web server is OK?
A: This symptom can result if the following two conditions are both in effect:
  1. Your Web server does not send an explict Connection: close when it's done serving up a file
  2. Your Web server also doesn't send the Content-Length: HTTP header.
In this case, there's no way to tell when a particular file retrieval is "complete," therefore, the file fetching mechanism keeps trying (and trying and trying) until it eventually times out.

Q: I'm getting an "ERROR STATE: *UNNAMED*" error in the Debug Log.
A: The following Debug Log output usually indicates that the VoiceXML code is missing a final transition out of the document.
DEV : 000043 MODHAND Get: [[session].[error].[code]] -> [6] 
DEV : 000043 MODHAND Get: [[session].[error].[text]] -> [Failure in speech system] 
DEV : 000043 MODHAND Get: [[session].[error].[state]] -> [*UNNAMED*] 
This error condition is typically the result of a VoiceXML document which contains one or more <field>s, but no exit transition.

Q: The Debug Log reports an XML parse error at the very top my of my VoiceXML code.
A: If you're specifying the XML processing instruction <?xml version="1.0"?>, make sure that this is the first line of your VoiceXML document. An XML parse error occurs if the VoiceXML interpreter finds any text, spaces, or blank lines before the processing instruction. A future version of the Tellme platform will ignore leading spaces at the top of a VoiceXML document.

Q: I have a boolean expression that is evaluating incorrectly. What's going on?
A: Make sure you are not setting your VoiceXML variables with a string expression, like "false". For example: <var name="bAllow" expr="'false'"/> <if cond="bAllow"> <!-- bAllow is true --> <else/> <!-- bAllow is false --> </if> The VoiceXML interpreter uses the JavaScript engine to evaluate the value associated with a cond attribute. JavaScript evaluates strings such as "true" and "false" used in a boolean context to true. Use the constants true and false instead. From http://developer.netscape.com/docs/manuals/js/client/jsref/boolean.htm : "The initial value of the Boolean object. The value is converted to a boolean value, if necessary. If value is omitted or is 0, -0, null, false, NaN, undefined, or the empty string (""), the object has an initial value of false. All other values, including any object or the string "false", create an object with an initial value of true."

Q: I have problems retrieving VoiceXML pages from my Apache NT server.
A: Apache for NT has not been optimized for performance and is still in the experimental stages (for more information go here ). Currently, there is a limitation of 4 simultaneous connections for the Apache server. This could be a problem, because upon loading a VoiceXML document, the Tellme Voice Application Network will also make requests for dependent documents, like external scripts and grammar files. This could conceivably max out the number of allowed connections on an Apache NT server. In cases where the VoiceXML interpreter cannot retrieve a document, it will revert to a cached copy.

Q: I have problems retrieving VoiceXML documents from my IIS server on a Windows NT Workstation.
A: IIS for Windows NT Workstation allows a maximum of ten simultaneous connections. This could be a problem, because upon loading a VoiceXML document, the Tellme Voice Application Network will also make requests for dependent documents, like external scripts and grammar files. This could conceivably max out the number of allowed connections on IIS. In cases where the VoiceXML interpreter cannot retrieve a document, it will revert to a cached copy.

[24]7 Inc.| Terms of Service| Privacy Policy| General Disclaimers