# Play

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

## Attributes

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `loop` | integer | `1` | Number of times to play the file. `0` repeats it until the call ends, capped at 1,000 repetitions, the same as `<Say>`. |
| `digits` | string | None | Sends DTMF tones instead of playing a file. Accepts `0`-`9`, `A`-`D` (any case), `*`, `#` and `w`; each `w` waits 0.5 seconds. |

## Nesting

`<Play>` contains the URL of the audio file as text content, or no content when you use `digits`. Use one or the other. `<Play>` cannot contain other verbs.

## Examples

Playing an audio file from a URL:

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

Playing hold music twice before continuing:

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

Sending DTMF tones to reach an extension after the call connects:

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

## See also

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