| CCXML 1.0-W3C Development Guide | Home | Frameset Home |
| cond | Data Type: (ECMAScript Expression) | Default: True |
| The cond attribute specifies an ECMAScript expression which can be evaluated to 'true' or 'false'. A condition must evaluate to 'true' in order for any enclosed operations to be performed. | ||
| event | Data Type: (ECMAScript Expression) | Default: none - attribute is required |
| The event attribute denotes the matching event type used to kick off the code contained within the <transition> element. Event types can be a user-defined, dot separated ECMAScript string of any length, or, (more commonly), it can indicate a platform-defined event type. Note that the '*' suffix is a wildcard, and will match zero or more characters of any event name. | ||
| name | Data Type: (variable name) | Default: none - attribute is required |
| The name attribute denotes the unique variable that is to receive the event indicated in the <transition> element. | ||
| state | Data Type: STRING | Default: none - attribute is required |
| Indicates the current possible state(s) of the eventhandler. | ||
| <?xml version="1.0" encoding="UTF-8"?> <ccxml version="1.0" xmlns="http://www.w3.org/2002/09/ccxml"> <meta name="author" content="Jeff Menkel"/> <meta name="copyright" content="2007 Voxeo Corporation"/> <meta name="maintainer" content="YOUR_EMAIL@HERE.COM"/> <eventprocessor> <transition event="connection.alerting"> <log expr="'*** Incoming call detected ***'"/> <accept/> </transition> <transition event="connection.connected"> <log expr="'*** The call was answered ***'"/> <disconnect/> </transition> <transition event="connection.disconnected"> <log expr="'*** Disconnecting ***'"/> <exit/> </transition> </eventprocessor> </ccxml> |
| ANNOTATIONS: EXISTING POSTS |
mtatum111
|
|
| can you explain the difference between the event attribute and the name attribute for <transition>
It appears that both of them are very similar. Thanks |
|
voxeoAlexBring
|
|
| Hey Melissa,
The name attribute is actually now an outdated part of the transition element. It has been replaced by a much better feature that is built into ccxml 1.0-W3C. The newer feature is "event$". For example using it would look like this: instead of: [color=red] <transition event="connection.connected" name="evnt"> <assign name="conn_id" expr="evnt.connectionid"/> </transition> [/color] it would look like this: [color=red] <transition event="connection.connected"> <assign name="conn_id" expr="event$.connectionid"/> </transition> [/color] Hope this helps to clear up any confusion, if you have any other questions please don't hesitate to ask. Standing by, Alex |
| login |