Using an automated connection timeout

To specify a connection timeout, you can either modify the default timeout value by editing the configuration file $DTJ_HOME/dtj.ini, or you can use a connection.ibm.timeout event within a <transition> element.

By default, CCXML disconnects a connection that has handled no dialog start and end, transfer attempts, or other call events for five or more minutes. This timeout is to ensure that channels are not taken up unnecessarily if a call fails to hang up, or if for some reason the CCXML application does not handle the termination of a call and the releasing of any associated VoiceXML dialogs.

Editing $DTJ_HOME/dtj.ini

To override the default timeout, insert a line into $DTJ_HOME/dtj.ini as follows:

wvr.ccxml.dialog.timeout=number of minutes

For example, to change the timeout to be 10 minutes long, insert:

wvr.ccxml.dialog.timeout=10

Using a connection.ibm.timeout event

For more flexible control of the timeout, use a connection.ibm.timeout event within a <transition> element. The connection.ibm.timeout event has two values - callLengthSeconds and connectionid. It can only be handled using a transition with the specific event value of connection.ibm.timeout. ‘Wildcarded’ event values such as connection.* do not allow the event to be handled.

If the connection.ibm.timeout event is not handled by the CCXML document, the timeout behavior remains the same as before — the call is disconnected. If the event is handled, another connection.ibm.timeout event will be sent after an increment of the timeout specified by the value of wvr.ccxml.dialog.timeout in $DTJ_HOME/dtj.ini. The call is not disconnected unless a transition including a disconnect element is used. This allows calls to be disconnected more intelligently, for example, disconnecting calls that timeout only if a dialog is associated with them.

Letting calls last as long as necessary

To let calls last as long as necessary, add the following transition to your CCXML document:
<transition event="connection.ibm.timeout" name="event$">
<log expr="'[connection.ibm.timeout] event on connectionid ' 
   + event$.connectionid + ', ignoring and allowing call to continue."/>
</transition>

Logging timeouts, then killing the dialog

To log the first two timeouts, then kill the dialog, add the following transition to your CCXML document:
<transition event="connection.ibm.timeout" name="event$">
<log expr="'[connection.ibm.timeout] callLengthSeconds =  ' 
 + event$.callLengthSeconds + '; connectionid ' 
 + event$.connectionid + ', dialogid ' 
 + session.connections[event$.connectionid].dialogid"/>
 <if cond="event$.callLengthSeconds &gt; 120">
 <log expr="'Length over 120s, terminating'"/>
  <if cond="session.connections[event$.connectionid].dialogid != null">
  <dialogterminate dialogid="session.connections[event$.connectionid].dialogid"/>
  <else/>
  <disconnect connectionid="event$.connectionid"/>
  </if>
 </if>
</transition> 

Disconnecting a timed-out connection without dialog

To disconnect a timed-out connection if it does not have a dialog associated with it, add the following transition to your CCXML document:
<transition event="connection.ibm.timeout" name="event$">
<log expr="'[connection.ibm.timeout] callLengthSeconds = ' 
+ event$.callLengthSeconds + '; connectionid ' + event$.connectionid 
+ ', dialogid ' + session.connections[event$.connectionid].dialogid"/>
   <if cond="session.connections[event$.connectionid].dialogid == null">
    <disconnect connectionid="event$.connectionid"/>
   </if>
</transition>