Asterisk cmd Playback

Business PBX Solutions
Provider Solution Details
Intuitive Technology
  • Simple and powerful
  • Integrated Multisite Administration
  • Complete System for $1299
Details
3CX Software PBX for Windows
  • Windows Software Solution
  • Easy to Install and Manage
  • Auto Configures Phones & Trunks
  • Android, iOS, Windows & Mac clients
Details
Bicom VoIP Become an ITSP Now!
  • Become a serious competitor in VoIP Immediately
  • FULL Consultancy, Installation, Training & Support
  • Sell Hosted IP PBXs, Biz Lines, Call Centre
  • Turnkey Provisioning at your data center
Details

Synopsis

Play a sound and/or video file


Description

Playback(filename1[&filename2...][,options])

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.


Options

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.


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


Example

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

Return code

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

Troubleshooting

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: Sun 06 of Jan, 2013 (14:54 UTC) by JustRumours


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+

Page Changes | Comments

 

Featured -

Search: