| CCXML 1.0-W3C Development Guide | Home | Frameset Home |
|
http://myserver.com/myApp.jsp?foo=123&bar=456
<transition event="connection.alerting">
<log expr="'*** foo is equal to: ' + session.values.foo"/>
<log expr="'*** bar is equal to: ' + session.values.bar"/>
<if cond="session.values.foo == '123'">
<!-- accept the incoming call if foo equals 123 -->
<accept/>
<elseif cond="session.values.bar == '456'"/>
<!-- accept the incoming call if bar equals 456 -->
<accept/>
<else/>
<!-- otherwise we reject the incoming call -->
<reject/>
</if>
</transition>
http://api.voxeo.net/SessionControl/CCXML10.start?tokenid=abc123&phonenum=14075551122&cid=4071112222<?xml version="1.0" encoding="UTF-8"?>
<ccxml version="1.0" xmlns:voxeo="http://community.voxeo.com/xmlns/ccxml">
<meta name="author" content="Jeff Menkel"/>
<meta name="copyright" content="2008 Voxeo Corporation"/>
<meta name="maintainer" content="YOUR_EMAIL@HERE.COM"/>
<var name="phonenum" expr="session.values.phonenum"/>
<var name="cid" expr="session.values.cid"/>
<eventprocessor>
<transition event="ccxml.loaded">
<log expr="'*** placing call ***'"/>
<createcall dest="'tel:+' + phonenum" callerid="cid"/>
</transition>
<transition event="connection.connected">
<log expr="'***** CONNECTION.CONNECTED: OUTBOUND *****'"/>
<dialogstart src="'MyDialog.xml'" type="'application/voicexml+xml'"/>
</transition>
<transition event="dialog.exit">
<log expr="'***** DIALOG EXITING *****'"/>
<exit/>
</transition>
</eventprocessor>
</ccxml>
<?xml version="1.0" encoding="UTF-8"?>
<vxml version = "2.1" >
<form>
<block>
<prompt>
Congratulations! You have successfully passed in parameters to your application!
</prompt>
</block>
</form>
</vxml>
| ANNOTATIONS: EXISTING POSTS |
mheadd
|
|
| Can you provide a little more infomation on the difference between using "session.values" and "session.external" when injecting values into a CCXML script?
Is one preferable over the other? Is one more compliant with the spec than the other? Thanks! |
|
voxeojeff
|
|
| Hello Mark,
The way that our current implementation of CCXML 1.0 works is that, both the session.values and session.external arrays return the same values. They are, in actuality, aliases of one another. You can use whichever you wish, since the end result is in fact the same. I hope this helps to clarify things, please let me know if you have any more questions. Regards, Jeff |
|
VoxeoDante
|
|
| Hello Mark,
As a follow up to Jeff's earlier post. Session.external is no longer part of the CCXML spec. For that reason I would suggest moving forward using the session.values. As far as our platform is concerned you can use either, but to make the XML more compliant session.values would be the preferred choice. All the best, Dante Vitulano |
| login |
|