To log events during the execution of a CCXML application, your CCXML document must use <log> elements. To log information on specific events, include <log> elements within <transition> elements.
<transition event="connection.disconnected" name="evt"> <log expr="'Call '+evt.connectionid+' has been disconnected'"/> </transition>The expr attribute of the <log> element is used to define the text of the message to log. In this example the connectionid identifying the telephone call is included as a variable within the message.
Another useful application of this technique is to test for attempts to use unsupported features of <createcall>. To check the event field for a problem on connection.progressing:
<transition event="connection.progressing" name="evt"> <log expr="'connection.progressing Start for connectionid ' + evt.connectionid"/> <if cond="evt.info != null"> <log expr="'connection.progressing Has info set, info.problem = ' + evt.info.problem"/> </if> <log expr="'connection.progressing End for connectionid ' + evt.connectionid"/> </transition>