| CCXML Voxeo 1.0 Development Guide | Home | Frameset Home |
|
<?xml version="1.0" encoding="UTF-8"?>
<!-- NOTE THAT WE *MUST* DECLARE THE xmlns ATTRIBUTE -->
<ccxml version="1.0" xmlns:voxeo="http://community.voxeo.com/xmlns/ccxml">
</ccxml>
<eventhandler>
<transition event="connection.CONNECTION_ALERTING">
<accept/>
</transition>
</eventhandler>
<accept> command?
<eventhandler>
<transition event="connection.CONNECTION_ALERTING">
<accept/>
</transition>
<transition event="connection.CONNECTION_CONNECTED">
<accept/>
<log expr="'second answer invoked, awaiting error event ...'"/>
</transition>
</eventhandler>
<eventhandler>
<transition event="call.CALL_ACTIVE">
<log expr="'making a document mistake now ...'"/>
<log expr="'and the temperature is ' + below.zero"/>
</transition>
</eventhandler>
<log> tag is referencing a non-existant object ("below.zero"), thus tossing a second error. The astute cyclist may notice that we are using the "CALL_ACTIVE" event in this transition -- this event actually fires in parallel with the "connection.CONNECTION_CONNECTED" event. Which ones fires first? It doesn't matter, because our asynchronous state machine handles it all.
<eventhandler>
<transition event="call.CALL_INVALID">
<exit/>
</transition>
</eventhandler>
<eventhandler>
<transition event="error.statemismatch" name="evt">
<log expr="'state mismatch detected (' + evt.error + ')'"/>
</transition>
</eventhandler>
<transition> block. Such a scenario could easily cause infinite loops to occur. Instead, an error generated inside an error handler will force the session to be terminated automatically.
<eventhandler>
<transition event="error.*" name="evt">
<log expr="'an error has occured (' + evt.error + ')'"/>
</transition>
</eventhandler>
<?xml version="1.0" encoding="UTF-8"?>
<!-- NOTE THAT WE *MUST* DECLARE THE xmlns ATTRIBUTE -->
<ccxml version="1.0" xmlns:voxeo="http://community.voxeo.com/xmlns/ccxml">
<eventhandler>
<transition event="connection.CONNECTION_ALERTING">
<accept/>
</transition>
<transition event="connection.CONNECTION_CONNECTED">
<accept/>
<log expr="'second answer invoked, awaiting error event ...'"/>
</transition>
<transition event="call.CALL_ACTIVE">
<log expr="'making a document mistake now ...'"/>
<log expr="'and the temperature is ' + below.zero"/>
</transition>
<transition event="call.CALL_INVALID">
<voxeo:sendemail to="'yourEmail@there.com'"
from="'myApp@here.com'"
type="'debug'"
body=" ' call.CALL_INVALID detected!' "/>
<exit/>
</transition>
<transition event="error.statemismatch" name="evt">
<log expr="'state mismatch detected (' + evt.error + ')'"/>
<voxeo:sendemail to="'yourEmail@there.com'"
from="'myApp@here.com'"
type="'debug'"
body=" ' error.statemismatch detected !' "/>
</transition>
<transition event="error.*" name="evt">
<log expr="'an error has occured (' + evt.error + ')'"/>
<voxeo:sendemail to="'yourEmail@there.com'"
from="'myApp@here.com'"
type="'debug'"
body=" ' generic error detected !' "/>
</transition>
</eventhandler>
</ccxml>
| ANNOTATIONS: EXISTING POSTS |
| login |
|