# Play

The `<Play>` verb plays an audio file to the caller, or sends DTMF tones in place of audio.

## Attributes

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `loop` | integer | `1` | Number of times to play the audio file. Same semantics as `<Say>`'s `loop` attribute: `0` repeats until the call ends, capped at 1,000 iterations. |
| `digits` | string | — | Sends DTMF tones instead of playing an audio file. Accepts the digits `0`-`9`, the letters `A`-`D` (case-insensitive), `*`, `#`, and `w`; each `w` waits 0.5 seconds. |

## Nesting

`<Play>` contains the URL of the audio file to play as text content, or omits content entirely when using the `digits` attribute. The `digits` attribute and the URL text content are alternatives: use one or the other. `<Play>` cannot contain nested verbs.

## Examples

Playing an audio file from a URL:

```xml
<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Play>https://cdn.pressone.co/audio/welcome.mp3</Play>
</Response>
```

Looping an audio file twice before continuing:

```xml
<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Play loop="2">https://cdn.pressone.co/audio/hold-music.mp3</Play>
  <Hangup/>
</Response>
```

Sending DTMF tones to dial an extension after connecting:

```xml
<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Play digits="wwww1928"/>
</Response>
```

## See also

- [Say](/voice/oneml/say)
- [Pause](/voice/oneml/pause)
- [OneML overview](/voice/oneml/overview)
