How to migrate CCXML applications created with Blueworx Voice Response Version
4.2 to Version 6.1.
Changes to elements and attributes
The following
elements have changed in line with the latest implementation of the
CCXML V1.0 specification:
- <createccxml >
- The start attribute is no longer included in the specification.
Instead use <createccxml> without it, and on
the ccxml.created transition in the parent, send
a message to the child as follows:
<transition event="ccxml.created">
<send target="event$.sessionid" name="'yourEventYouWantToTriggerHere'"/>
</transition>
- <fetch>
- The synch attribute is no longer valid. You will
have to use asynchronous fetches, using the fetch.done transition
to continue the process.
- <script>
- The expr attribute is no longer valid. Instead,
fetch the script file (remembering to specify type="text/ecmascript")
and in the fetch.done transition use <script
fetchid="event$.fetchid"/>
- <send>
- The data attribute is now called name.
This change must be implemented in all CCXML files, or the parser
will refuse to run them.
- <dialogstart>
- The duplex attribute has been replaced by the mediadirection attribute.
In Blueworx Voice Response V4.2, 'full' was
the only supported value of the duplex attribute. 'both' is
now the only supported value of the mediadirection attribute. 'dialogtransmit'
and 'dialogreceive' are valid values of mediadirection,
but are not supported by the Blueworx Voice Response V6.1
CCXML implementation.
- <disconnect>
- The dialogid attribute is no longer valid. Use <dialogterminate
dialogid="dialogid"/> instead.
- <exit/>
- If the no value is specified for the expr attribute,
the parent's ccxml.exit event will be given
a default value of undefined not 0, as in the Blueworx Voice Response V4.2
CCXML implementation.
- <dialogstart>
- Failed <dialogstart> and elements no longer
throw an error.dialog.wrongstate event and now throw
an error.dialog.notstarted event instead.
If a
parameter is specified differently in a dialogprepare element
to where it is also specified in the corresponding dialogstart element,
an error.dialog.notstarted event is generated. To
avoid this, either always specify the same thing or simply don't specify
the same parameters in both elements.
- <dialogprepare>
- Failed <dialogprepare> elements no longer
throw an error.dialog.wrongstate event and now throw
an error.dialog.notprepared event instead.
- <move>
- If problems arise with this element, an error.move event
is now thrown instead of the previous error events, but if no source
or event attribute is set, an error.fetch is thrown.
Events
The following events have changed in
line with the latest implementation of the CCXML V1.0 specification:
- ccxml.exit
- This event is now generated regardless of how the child session
terminated. If you need specific logic that is triggered only if a
session is terminated by an <exit> element,
check for (ccxml.exit event name).reason
== 'exit'
- ccxml.loaded
- ccxml.loaded events not created by <createccxml> elements
have the parent attribute set by default to a value of undefined rather
than 0, as in the Blueworx Voice Response V4.2
CCXML implementation.
- connection.*
- The connection object available on all connection.* events
no longer has a duplexmode attribute. If you want
similar information, you can use the new input and outputs parameters. input corresponds
to a dialogid if connected to a dialog, outputs is
an array of connectionids connected to this connection.
(Usually this includes only the connection's own connectionid).
- error.connection.*
- The connection object available on all error.connection.*
events no longer has a duplexmode attribute. If you
want similar information, you can input and outputs parameters. input corresponds
to a dialogid if connected to a dialog, outputs is
an array of connectionids connected to this connection.
(Usually this includes only the connection's own connectionid).
- error.notallowed
- An error.connection.wrongstate event is now posted
instead of error.notallowed if an attempt is made
to disconnect, accept, or reject a connection when the connection
is not in an appropriate state. An error.notallowed event
still occurs if you do not have permission to modify the connection
(the session attempting to modify the connection does not own the
connection).
- error.dialog.wrongstate
- This event has been removed and an error.dialog event
is thrown instead. This is likely only to occur on <dialogterminate> requests
where the specified dialogid attribute value does
not correspond to a currently running or preparing dialog. Failed <dialogstart> and <dialogprepare> elements
now instead throw error.dialog.notstarted and error.dialog.notprepared events,
respectively.