Playback(filenames[,options])
Full arguments reference
filenamesrequired - Ampersand separated list of filenames. If the filename is a relative filename (it does not begin with a slash), it will be searched for in the Asterisk sounds directory. If the filename is able to be parsed as a URL, Asterisk will download the file and then begin playback on it. To include a literal&in the URL you can enclose the URL in single quotes.filenamerequiredfilename2(multiple)
-
options- Comma separated list of optionsskip- Do not play if not answered-
noanswer- Playback without answering, otherwise the channel will be answered before the sound is played.Note
Not all channel types support playing messages while still on hook.
-
say- Play using the say.conf file. mix- Play using a mix of filename and the say.conf file.
Plays back given filenames (do not put extensionA dialplan entry that matches a dialed number or pattern within a context and triggers a sequence of prioritized steps. of wav/alaw etc). The Playback application answers the channelA single call leg passing through Asterisk. Channels represent connections to endpoints and are what dialplan applications act on. if no options are specified. If the file is non-existent it will fail.
This application sets the following channel variable upon completion:
- PLAYBACKSTATUS - The status of the playback attempt as a text string.
SUCCESSFAILED
See Also: Background (application) -- for playing sound files that are interruptible
WaitExten (application) -- wait for digits from caller, optionally play music on hold
filenamesrequired - Ampersand separated list of filenames. If the filename is a relative filename (it does not begin with a slash), it will be searched for in the Asterisk sounds directory. If the filename is able to be parsed as a URL, Asterisk will download the file and then begin playback on it. To include a literal&in the URL you can enclose the URL in single quotes.filenamerequiredfilename2(multiple)
-
options- Comma separated list of optionsskip- Do not play if not answered-
noanswer- Playback without answering, otherwise the channel will be answered before the sound is played.Note
Not all channel types support playing messages while still on hook.
-
say- Play using the say.conf file. mix- Play using a mix of filename and the say.conf file.
User Notes
Know a tip or gotcha for this topic? Share it below and help others.
Contribute a note
Share a tip, gotcha, or practical example. Keep it under 2000 characters. No questions (use the Asterisk community forums for support). Wrap code in backticks.