Archive for August, 2008

Prophecy 9 Early Access release now out on Mac OS X, Linux and WIndows

Wednesday, August 27th, 2008

When we announced last week that a “early access” release of Prophecy 9 was available, the software was actually only available that day on Mac OS X. Now, however, the Prophecy 9 early access release is out on all three platforms: Windows, Linux and Mac OS X. You can download it from www.voxeo.com/prophecy in the Prophecy 9 - Early Access column a little bit down the page. The software is still in very active development, so we’ll be posting updated versions over time and yes, some things may not work exactly right.

Please do check it out if you are interested in seeing the future of our application platform - and please do send along any comments and feedback that you have. We definitely do appreciate it all.

Technorati Tags:
, , , ,

VoiceXML Variable Scoping

Wednesday, August 13th, 2008

VoiceXML certified developer logo
Here in Support we get a fair amount of tickets asking about variables.  Namely, if a variable is created in a form can it be accessed in the field of that form or in a different form? What I am talking about is called variable scoping.  In VXML there are several different variable scopes.  You might have heard of global and local variables with other programming languages.  VXML, while not a programming language, is similar in how it approaches variables and how they can be accessed.

First lets get a proper definition for variable scope.  The scope of a variable defines when and where the variable exists and may be accessed. When the VXML browser exits the scope where the variable is defined, the variable is out-of-scope and cannot be accessed. When a variable is in scope, it can be accessed by both VoiceXML and ECMAScript.

Here is a table of the different scope levels of variables in VXML:












































Scopes Declared In Initialized In Where accessible Becomes Unavailable
Session By the VXML browser At the beginning of a session Anytime during the session At the end of the session
Application In the root document When VXML browser loads the root document Throughout the application When the VXML browser leaves the root document
document In the <vxml> document When the VXML browser loads the document Within the <vxml> element When VXML browser leaves the document
dialog In the <field> element of a <form> or <menu> element When the VXML browser loads the element Within the element When the VXML browser leaves the element
anonymous In a <block>, <filled> or <catch> element When the VXML browser begins to interpret the element Within the element When the VXML browser leaves the element

Here is an example of document scoped variable.  As you can see it is accessible throughout the current VXML document.

<?xml version=”1.0″?>
<vxml version=”2.0″>

<var name = “counter” expr = “0″/>

<form id=”F_1″>
<!– additional VXML code –>
<filled>
<assign name=”counter” expr = “counter + 1″/>
</filled>
</form>

<form id=”F_2″>
<!– additional VXML code –>
<filled>
<assign name=”counter” expr = “counter + 2″/>
</filled>
</form>

</vxml>

Here is an example of a dialog scoped document.  In form “F_1″ the value of “counter” after the assign <element> would be 1.  In form “F_2″ the value after the <assign> value would be 2.

<?xml version=”1.0″?>
<vxml version=”2.0″>

<form id=”F_1″>
<!– additional VXML code –>
<filled>
<var name = “counter” expr = “0″/>
<assign name=”counter” expr = “counter + 1″/>
</filled>
</form>

<form id=”F_2″>
<!– additional VXML code –>
<filled>
<var name = “counter” expr = “0″/>
<assign name=”counter” expr = “counter + 2″/>
</filled>
</form>

</vxml>

It is also good to know that variable references will match the closest applicable scope. You can prefix a reference with a scope name, such as application.counter, for clarity or to resolve ambiguity.

We hope this clears up a little confusion about VXML variables and where they are defined and when they can accessed.

Jeremy Richmond
VXML Certified Developer

New tutorial on passing variables between CCXML and VoiceXML

Monday, August 11th, 2008

Ever wanted to pass variables between a CCXML and VoiceXML app and weren’t sure how? Well, now you can learn in a recently posted tutorial from Voxeo staff member Jeff Menkel: Passing variables to and from VoiceXML and CCXML. This tutorial builds on the previous piece about passing variables to CCXML applications as well as other pieces of the CCXML documentation. It’s well worth a read and shows how easy it is to use CCXML and VoiceXML together.

Technorati Tags:
, , , , , ,