OneML reference
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:
Code
Looping an audio file twice before continuing:
Code
Sending DTMF tones to dial an extension after connecting:
Code
See also
Last modified on