About Script Interruption

Script interruption is a feature that allows external events to interrupt the current processing of a script in order to return to another part of the script or stop the execution of the script.

Script interruption is typically used in the following situations:

  • The script plays in an ACD environment in which it provides features such as service-on-hold or music-on-hold to a caller waiting in a queue for the system to transfer the call to an available agent.

  • The script needs to be notified that one of its contacts has been remotely terminated, as when, for example, the caller hangs up.

  • You are using the Cisco Unified CCX Script Editor to debug a script and the Cisco Unified CCX Script Editor makes a request to end the debugging session in the middle of that script.

Note

In every case, any event that triggers the need to interrupt the script can occur at any time while the script executes other steps. In previous Cisco Unified CCX releases, script interruption could happen only for some of these events and only in some of the steps.

By default, scripts are automatically interruptible before any step is executed. Should any external event (such as those described above) interrupt the script, it will continue processing based on the proper handling for the particular event before it begins to execute the next step.

If you want two consecutive steps to execute without the possibility of interruption, you must move these two steps to a subflow where you can disable interruptions completely while the script processes that subflow.

Some steps contain an “interruptible” option, which allows you to indicate whether or not the script can interrupt the step from within when an external event occurs.

Note

For Media steps, the old “interruptible” option that allowed a caller to stop the playback of the prompts using either DTMF or voice, as in case of ASR calls, now called “barge-in” calls.

The following paragraphs describe in more detail the external events that can cause interruptions and the default processing associated with them:

  • A contact is remotely terminated.

    When a caller hangs up, the script will be interrupted (if possible) and a ContactInactiveException will be generated. This exception can then be caught with the OnExceptionGoto step of the General palette and properly handled.

    If a caller hangs up and you have not provided any exception handling logic, the script immediately aborts.

    When managing multiple contacts, the OnExceptionGoto step cannot differentiate which contact was remotely terminated. Instead, it must specify a Label to which it can loop through all known contact variables and use the Get Contact Info step of the Contact palette to search for an Active flag

  • A debugging session is terminated.

    When you click the End button on the toolbar of the Cisco Unified CCX Editor, the script is interrupted and aborts without the possibility of catching or handling this case.

  • A Cisco Unified CCX agent becomes available.

    This event occurs only if the script has previously executed a Select Resource step from the ACD palette. When an agent becomes available, the script is interrupted and control is returned to the Select Resource step, exiting through either the Selected or Connected branches depending on the configuration.

  • A Cisco Unified ICME agent becomes available.

    The script is automatically interrupted without the possibility of catching or handling this case.

If an interrupting event happens when the script is not currently interruptible, the script is automatically interrupted whenever it becomes interruptible again. For example, although a script is not interruptible when it is running a subflow marked to disable interruptions, it will process the interruption as soon as the subflow terminates and control is returned to the parent (if that primary script is interruptible).

As another example, although a script is not interruptible while waiting for the results of a database fetch, it will process the interruption as soon as the results return and before the script executes the next step (unless the interruptible option has been disabled).

Figure shows the Disable Interruptions option in the General tab of the Call Subflow customizer window.

Disable Interruptions Option—Call Subflow Step (General Tab)