OneML reference
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:
Code
Playing hold music twice before continuing:
Code
Sending DTMF tones to reach an extension after the call connects:
Code
See also
Last modified on