| CCXML 1.0-W3C Development Guide | Home | Frameset Home |
|
http://api.voxeo.net/SessionControl/CCXML.send?sessionid=abc123&eventname=MyEvent
<transition event="MyEvent">
<log expr="'*** This is my custom CCXML Event! ***'"/>
</transition>
http://api.voxeo.net/SessionControl/CCXML.send?sessionid=abc123&eventname=MyEvent
<send name="'http.get'" target="'http://api.voxeo.net/SessionControl/CCXML.send?sessionid=abc123&eventname=MyEvent'"/>
http://api.voxeo.net/SessionControl/CCXML.send?sessionid=abc123&eventname=Clint&eastwood=day
<transition event="Clint">
<log expr="'Go ahead, make my: ' + event$.eastwood"/>
</transition>
| ANNOTATIONS: EXISTING POSTS |
romilly1
|
|
| Hi guys,
If we're in a VXML, how can we send an event to our parent CCXML with some parameters? Thank you |
|
voxeoJeffK
|
|
| Hello,
You can use the HTTP syntax as described in the tutorial above. The key is getting the sessionID from the CCXML parent when you start the VXML dialog so you know where to send your event. You can do this as described here by sending the session.id variable information to the VXML dialog: http://docs.voxeo.com/ccxml/1.0-final/ccxml10_passtovxml.htm Regards, Jeff Kustermann Voxeo Support |
|
romilly1
|
|
| Thank you | |
careprad_v
|
|
| I test it by browser, first I call my application and get the parentsessionid, and then request the url http://api.voxeo.net/SessionControl/CCXML.send?sessionid=thesessionid&eventname=MyEvent
got this response: sendevent command was successful and my voicexml dialog code is like this: <?xml version="1.0"?> <vxml version="2.0" xmlns="http://www.w3.org/2001/vxml"> <form> <catch event="myevent"> <prompt>got my event. awesome you are.</prompt> </catch> <block> <prompt bargein="false"> <audio src="audio/waiting.wav" /> </prompt> </block> </form> </vxml> But the event did not fire, I got the log from the debugger: event: MYEVENT _sessionid="0" delay="0s" eventid="c50e8ed449d3444886db8e41a6893498" eventsource="basichttp" eventsourcetype="basichttp" hints="" name="myevent" namelist="sessionid,eventname" sendid="sendid" target="68c1fbe3d7a0899fb56736a1ef2d69f0" targettype="ccxml" 00249 69f0 02:32:46 AM warning: event was not handled What's the problem? |
|
VoxeoDante
|
|
| Hello careprad_v,
The issue here is that you are sending the information to the CCXML API, but you are using VoiceXML for your application. When you are sending that event, it is arriving at the CCXML engine, and not the VoiceXML engine. There is not an external API for the VoiceXML, and the only way to fire events in VoiceXML is from the session it's self. If you want to send an event to the session while it is running you would need to use CCXML to catch the even in a transition. I hope that helps. Regards, Danté Vitulano Hosted Solutions Engineer [url=http://www.voxeo.com/university/home.jsp] [img=http://www.voxeo.com/images/logos/VoxeoUnivLogo.png/] [/url] [b][color=blue]Interested in Training? Visit the Voxeo University Page to Learn More![/color][/b] |
|
careprad_v
|
|
| Yes, now I am using voicexml not ccxml, so I want to send an event to the session while it is running like what I do in tropo, do you mean that I can't catch the customer event in voicexml other than ccxml? | |
VoxeoGarret
|
|
| Hello,
As Dante mentioned earlier, you will not be able to send an event to Vxml directly. You would need to pass a parameter to CCxml in order to do such. If you need to send a custom event in Vxml within the session you can use the throw method. However, if you are looking to use an external event from the API you will need to utilize CCxml. Regards, Garrett King Customer Support Engineer Voxeo Corporation |
| login |
|