Asterisk cmd Playback


Play a sound and/or video file



Plays the specified sound or video file(s) (you need to omit the filename extension). Sound files are stored in the /var/lib/asterisk/sounds directory by default (the directory path can be changed in asterisk.conf).

Playback is Multi-Language-compliant. It will look in a subdirectory corresponding with the current language code (as set by the SetLanguage command, or the channel's default language code. Failing that, it will play the non-language-specific edition.

Playback will play the whole sound file(s), and when complete, return control. Compare with the Background command, which plays a sound file but returns control immediately, allowing Asterisk to perform other commands on this channel while the sound file is playing.

See: Asterisk tips answer-before-playback on how to avoid the dropping of audio on the first prompt played after you answer a call.


skip: Play the sound file only if the channel has already been answered. If the channel has not yet been answered, the Playback command will return immediately without playing anything.

noanswer: Play the sound file, but don't answer the channel first (if hasn't been answered already). Not all channels support playing messages while still on hook.

j: If option is specified, the application will jump to priority n+101 if present when a file specified to be played does not exist.

say: Use say.conf to interpret the string

If neither skip nor noanswer options are specified, then the Playback command will first answer the channel (if it hasn't been answered already) and then play the sound file.

The options wont work if there are spaces between the filename, the comma and the option(s).


exten => 500,1,Playback(tt-weasels,skip)

Return code

On completion, ${PLAYBACKSTATUS} contains either "FAILED" or "SUCCESS".


Playback is not affected by timing, unless internal_timing is turned on in asterisk.conf.

See also

Asterisk | Applications | Functions | Variables | Expressions | Asterisk FAQ

Created by: oej, Last modification: Mon 02 of Feb, 2015 (11:49) by borja
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+