Play
The <Play> verb plays an MP3 or WAV audio file, which Telnyx fetches back to the caller from the URL you configure.
Alternatively, specify mediaStorage="true" to fetch a file you previously uploaded to Telnyx using media storage APIs. When mediaStorage="true" is used the verb expects a media_name instead of a URL.
<Play> can be used independently as a verb or nested within <Gather> as a noun to play an audio file while waiting for DTMF tones.
Attributes
| ATTRIBUTE | DESCRIPTION | OPTIONS | DEFAULT |
|---|---|---|---|
loop | Times to repeat the audio | 1 | |
mediaStorage | When true fetches the file from Telnyx media storage using the provided media name. | true, false | false |
Examples
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Play>https://example.com/welcome.mp3</Play>
</Response>