Avaya Logo

Home

Previous Topic

Next Topic

Book Contents

Book Index

Flow control instructions

Flow control instructions determine the order in which the instructions are executed. Each instruction is listed with a brief description. An example of a script using these instructions follows the descriptions.

r.0

Event type (ESOFTDISC)

r.1

Value from arg[1] of SOFT_DISC message

r.2

Value from arg[2] of SOFT_DISC message

r.3

Number of the DIP that sent the SOFT_DISC message

r.0

Event type (EDIPINT)

r.1

Value from arg[1] of DIP_INT message

r.2

Value from arg[2] of DIP_INT message

r.3

Number of the DIP that sent the DIP_INT message

r.0

Event type (ETTREC)

r.1

Touch tone character that caused the interrupt

r.2

Number of touch tones received since last ttclear

r.3

Instruction interrupted: t - tflush, s - sleep, d - dbase, i - tic

If no event subroutine is set for ETTREC, the instructions are not interrupted by touch tones.

If rel_op is . . .

Then . . .

==

Equal

!=

Not equal

<

Less than

<=

Less than or equal to

>

Greater than

<=

Greater than or equal to

Incoming call

It is suggested that the method of limiting the number of scripts started with an incoming call be left as it is. That is, do not assign a service to a number of channels greater than the desired limit. If the number of channels assigned to a script exceeds the limit, a script still may check the instance count as its first task and quit before answering the call if the instances exceed the limit.

exec

The exec script instruction is the primary means by which an instance limit may be exceeded. Therefore, any application script concerned about running too many instances of another script should use scrinst for that script before using exec.

In this case, it is important to avoid a wait condition in the interval between scrinst and exec. This could cause other scripts running simultaneously that are performing the same test to receive identical results from scrinst before any of them perform the exec instruction. Use tflush before scrinst to play any speech that is queued. If tflush is not used, the exec instruction causes the speech to play and the script waits for the play to complete before executing the exec instruction.

Soft seizure

Scripts started by a soft seizure request from a DIP may use scrinst to check themselves against an instance limit as their first task, similar to the way scrinst may be used if the script is started by an incoming call. If the script determines that it cannot continue, it may signal the DIP that started it by using the dipterm instruction and calling quit with a specific value that the DIP may check.

In This Section

Sample script using flow control instructions

� 2003 Avaya Inc. All Rights Reserved.