Skip to main content
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. You can also use the digits attribute to play DTMF tones instead of an audio file. <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

ATTRIBUTEDESCRIPTIONOPTIONSDEFAULT
loop Times to repeat the audio 1
mediaStorage When true fetches the file from Telnyx media storage using the provided media name. true, falsefalse
digits DTMF tones to play. The value can include digits 0-9, *, #, and w (for a 0.5 second pause). When specified, the verb plays DTMF tones instead of an audio file. -

Examples

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