Play
Play
The Play verb is used to play an audio file to the remote party.
Play Attributes
Name | Allowed Values | Default Value |
---|---|---|
loop |
integer > 1 |
1 |
-
loop. The 'loop' attribute specifies how many times you’d like the audio file to be repeated. Specifying '0' will cause the <Play> verb to loop until the call is hung up.
How to Convert a Wav File to the Correct Bitrate
You can use a software call ffmpeg as follows:
ffmpeg -i source_file.wav -acodec pcm_s16le -ac 1 -ar 8000 result_file.wav
Basic examples
<Response> <Play>http://example.com/demo.wav</Play> </Response>
If the Play verb does not contain a URL, the verb will be ignored, and the next verb will be executed. |
Disk cache for Play verb
Please refer to Cache Strategy document for details about Disk Cache and Play verb execution.