CCXML Voxeo 1.0 Development GuideHome  |  Frameset Home

  D: Dialog Extensions  |  TOC  |  F: Outbound Dialing  
This documentation is for CCXML 1.0-Voxeo, which has been superceded by CCXML 1.0-W3C. The CCXML-Voxeo platform is not being updated any longer. The CCXML 1.0-W3C version, however, has many new features and is actively being enhanced. If you're writing a new CCXML application, you should use CCXML 1.0-W3C. Click here for the CCXML 1.0-W3C documentation.

Appendix E: ECMAScript and CCXML 2002

Most of the attribute values in CCXML 2002 are treated as ECMAScript code, which basically presents it's own programming language in a small space. Usually such expressions are used to simply combine variable values or perform conditional operations. When writing ECMAScript code for CCXML 2002, always focus on what's between the quotes and treat this as an isolated unit, which needs to be processed by the ECMAScript engine of the Voxeo CCXML platform.

As a refresher, here are a few key points to keep in mind:


The result of an executed ECMAScript expression is a simple string value, for which the meaning, (obviously), depends on the attribute itself. This why you will see the already resolved values when viewing the Voxeo Real Time Logger. The only exceptions here are conditional expressions. For instance, an <if> or an <elseif> where the result is a simple 'true' or 'false'.

The following list gives an overview of which CCXML elements atrributes are treated as ECMAScript expressions:



ECMAScript Limitations

It is important to note that the <script> element is unsupported in the Voxeo CCXML implematation at this time. For this reason, you will only be able to perform ECMA operations within the variables themselves. To illustrate, an example of an 'inline' ECMAScript operation might look like this:


    <var name="myNum" expr="1"/>
    <assign name="myNum" expr="Number(myNum) + 1"/>







  ANNOTATIONS: EXISTING POSTS
awirtz
9/21/2005 11:06 PM (EDT)
Keep in mind that a literal '<' in a javascript expression will disrupt the parsing of the enclosing tag, and should be written as '& l t ;' (or '& g t ;' for '>')

-Aaron

Example of bad code:

<assign name="myNum" expr="if(x<y) { x; } else { y; }"/>

Example of fixed code:

<assign name="myNum" expr="if(x & l t ; y) { x; } else { y; }"/>

(stupid HTML kept interpreting my character escapes...  The '& l t ;' should really have no spaces, but if I write it that way here it gets mangled.)


[edited - removed some comments on another error which may be due to something else entirely]
mthle01
2/28/2006 5:20 PM (EST)
<?xml version="1.0" >
<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml"
  xml:lang="en-US" >

<form>
<block>
    hello world.
</block>
</form>
</vxml>
mikethompson
2/28/2006 5:38 PM (EST)
Hey there,

Was this posting by accident?  All I see is code for a basic "Hello World" application with no details...

Regards,
Mike Thompson
Voxeo Extreme Support
tomeeo
4/23/2006 1:10 PM (EDT)
Any guidance on calling a web service from CCXML as in VXML with Voxeo.SoapClient ??
mikethompson
4/23/2006 1:54 PM (EDT)
Hey Tomeeo,

There is actually some documentation on using soap via a VXML dialog in our VXML guide.  You can find the sepcific tutorial located here: http://docs.voxeo.com/voicexml/2.0/appendixo.htm?search=soap#anchor

This should give you a good idea of how to interface VXML with SOAP.

Regards,
Mike Thompson
Voxeo Extreme Support
tomeeo
4/23/2006 7:44 PM (EDT)
Wow! Thanks for the response on a Sunday.  Yeah, I saw the VXML SOAP support but for the app I'm building it would be a lot cleaner to have the SOAP calls be made at the call control layer, not the dialog.  Right now, i'm having to call "non-dialog" vxml pages that contain the SOAPClient code just to make a WS call.
mikethompson
4/23/2006 7:48 PM (EDT)
Hey Tomeeo,

I will have to check with our CCXML gurus on Monday to see if this is actually possible.  My gut tells me that it isn't, but it could be entirely possible :).  Stay tuned and I'll get you an answer as soon as I can.

Regards,
Mike Thompson
Voxeo Extreme Support
mikethompson
4/24/2006 1:09 PM (EDT)
Hey Tomeeo,

I spoke with our CCXML gurus this morning and have some information for you.  There is not a specific way to do this at the CCXML level specifically, but you can send off to a server-side script that will do the SOAP request for you and then send the results back to your original session via ccxml.send.  However, this seems to be a bit overbearing as you are practically doing the same thing in the VoiceXML dialog.  Not to mention, doing this at the CCXML level would be difficult because of its asynchronous nature. 

If you do wish to proceed in attempting SOAP at the CCXML level, fortunately, the <script> tag is supported in the CCXML 1.0.  We hope to be rolling that out later this year.  Currently, we do have ccxml 1.0 BETA available in our hosted prophecy partition on evolution, so you might want to play around with that, should you feel its necessary.

Hope this helps,
Mike Thompson
Voxeo Extreme Support

MattHenry
4/24/2006 4:26 PM (EDT)


Hiya Tomeeo,

The Voxeo SOAP client is not currently configured to be accessible from within the CCXML context, (mind you, this applies to CCXML 1.0 on Prophecy, as well). We probably will extend support for this in the future, but this is pretty far down on our 'to-do' list at present, as we haven't received an overwhelming demand for this feature.

As this is the case, any time you access the voxeo SOAP client, it will need to be from within a VoiceXML dialog, at least for the time being.

~Matthew Henry



login
  D: Dialog Extensions  |  TOC  |  F: Outbound Dialing  

© 2008 Voxeo Corporation  |  Voxeo IVR  |  VoiceXML & CCXML IVR Developer Site