Waits for a specified
number of milliseconds after completion of any queued Play or Record commands.
Number of milliseconds the system should wait before moving to the next executable
- If Play/Speak/Record commands are executing, Wait will pause for these commands to complete before starting the countdown. In other words, wait starts its count down after the completion of play/speak/record.
- Commands such
as Play, Speak, Record etc. are asynchronous, in the sense
that the script will not wait for the execution of these commands to complete
to move to the next executable statement. Instead, the script continues by
executing the succeeding statements even if the commands like Play or Speak
or Record have not yet executed completely. In order to make the execution
synchronous (i.e. further statements are not executed till the
completion of any pending executions) Wait command can be made use
of. For example, if we put 'Wait 5' as the very next executable statement
after a Play command which plays a ".wav" file with duration,
say 10 seconds, then the script waits for the completion of the Play
statement plus an additional 5 milliseconds before the next statement
is executed. Key presses, if any, will be flushed during this session.
// wait 5 second to continue after the speak command
speak "Welcome to Xtend IVR. Please wait 5 seconds."