<Play>

The <Play> element plays an audio file for the caller. The content nested within the <Play> should be the URL of an audio file. The valid audio file must be 8bit mono 8000Hz mulaw in either .mp3 or .wav format.

Element Attributes

Attribute

Description

loop optional

The amount of times the <Play> should be repeated. 1 indicates an infinite loop.

  • Valid values: integer greater than or equal to 1
  • Default value: 1

Nesting

In addition to the default <Response> element, the <Play> element can also be nested within the <Gather> verb.

The <Play> element cannot nest any other elements within itself. It must only nest the URL or tone stream which will be played to the caller.

<Response>
  <Play loop='3'>http://example.com/hello.wav</Play>
</Response>