command plays back the specified .wav file on the phone line.
<wave file 1> [<wave file 2> <wave file 3> ... <wave file N>]
The wave file to be played.
- If no extension
is provided, “.wav” is assumed. A string variable can be used
in place of the wave filename. Play begins immediately and happens in the
background. The script continues execution. Any subsequent play or speak commands
are queued and played back. To force the Play to complete before proceeding,
use the "wait 0" command.
- It is recommended that a wave file be in 16 KHz 8 bit mono PCM format. An internal conversion will be attempted by the engine for other wave formats.
- Silence may be imposed using Play command. In order to play silence for 1 second, use Play \Pau=n\, where n is the no:of milliseconds. For instance, a pause of 1 second can be given as
- Whenever a play command is encountered in the script, the IVR engine initiates the search for the wave file in the path specified by $wavDir, moving on to the script directory and then to the 'wave' directory. Following an unsuccessful search, it jumps to ONSYSTEMERROR label with $error containing an error message reporting a missing wave file.
- To support wave files with long names, call Escape() as shown below.
play Escape("Very Good Morning World.wav")
- A hangup command waits for the play or record command to complete. But a user hangup will terminate the play/record and jump to ONHANGUP.
- A wait command starts its count down only after completing the play/record. For example,
implies that the IVR wait for 1 second after completing the play. On the other hand,
suggests that the IVR wait for 1 second which includes the play time too.
$filename = "YouEntered.wav"
$num = Input(5)