Plays a sound file to the caller.
Playback(filename[,options])
Plays (in the
directory filename/var/lib/asterisk/sounds/) to the caller.
The filename does not include an extension; Asterisk automatically selects
the format with the lowest transcoding cost. Options may be
specified.
The option skip causes the message to be skipped if
the channel is not in the up state.
Answers the channel before the audio file is played, unless
noanswer is specified. Note that not alle channels support
playback when 'on hook'.
Returns -1 when the channel is hung up. If the file cannot be
found, jumps to priority n+101 if it
exists.
exten => 123,1,Answer() exten => 123,n,Playback(tt-weasels)
|
|
|
Internal help for this application in Asterisk 1.4: -= Info about application 'Playback' =-
[Synopsis]
Play a file
[Description]
Playback(filename[&filename2...][|option]): Plays back given filename
s (do not put
extension). Options may also be included following a pipe symbol. The 's
kip'
option causes the playback of the message to be skipped if the channel
is not in the 'up' state (i.e. it hasn't been answered yet). If 'skip'
is
specified, the application will return immediately should the channel no
t be
off hook. Otherwise, unless 'noanswer' is specified, the channel will
be answered before the sound is played. Not all channels support playing
messages while still on hook. If 'j' is specified, the application
will jump to priority n+101 if present when a file specified to be playe
d
does not exist.
This application sets the following channel variable upon completion:
PLAYBACKSTATUS The status of the playback attempt as a text string,
one of
SUCCESS | FAILED
diff output to internal help in Asterisk 1.2: - none - |
See also.
the section called “Background()”