Plays a sound file while listening for DTMF input from the caller.
Background(soundfile1[&soundfile2...][,options[,language]])
Plays the specified sound files while waiting for the caller to dial an extension. Playback stops the moment the first digit is pressed. Filenames must be provided without file extensions; Asterisk chooses the file format with the minimum transcoding cost.
Allowed options may not be combined:
skip
up state when the application is run. If skip is
specified, the application ends immediately when the channel is hung
up.noanswer
The language parameter can be used to specify a
language for the sound file(s) played, in the event this should be
different than the language currently specified for the channel.
Returns -1 if hung up or if the specified sound file does not exist, otherwise returns 0.
exten => 123,1,Answer() exten => 123,n,Background(please-enter-extension)
|
|
|
Internal help for this application in Asterisk 1.4: -= Info about application 'BackGround' =-
[Synopsis]
Play an audio file while waiting for digits of an extension to go to.
[Description]
Background(filename1[&filename2...][|options[|langoverride][|context]]
):
This application will play the given list of files while waiting for an
extension to be dialed by the calling channel. To continue waiting for d
igits
after this application has finished playing files, the WaitExten applica
tion
should be used. The 'langoverride' option explicitly specifies which lan
guage
to attempt to use for the requested sound files. If a 'context' is speci
fied,
this is the dialplan context that this application will use when exiting
to a
dialed extension. If one of the requested sound files does not exist, c
all processing will be
terminated.
Options:
s - 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 this happens, the
application will return immediately.
n - Don't answer the channel before playing the files.
m - Only break if a digit hit matches a one digit
extension in the destination context.
diff output to internal help in Asterisk 1.2: 5c5 < Play an audio file while waiting for digits of an extension to go to. --- > Play a file while awaiting extension 12c12 < should be used. The 'langoverride' option explicitly specifies which l anguage --- > should be used. The 'langoverride' option explicity specifies which la nguage 18c18 < s - Causes the playback of the message to be skipped --- > s - causes the playback of the message to be skipped 20c20 < hasn't been answered yet). If this happens, the --- > hasn't been answered yet.) If this happens, the 22,24c22,24 < n - Don't answer the channel before playing the files. < m - Only break if a digit hit matches a one digit < extension in the destination context. --- > n - don't answer the channel before playing the files > m - only break if a digit hit matches a one digit > extension in the destination context |
See also. the section called “Playback()”, the section called “BackgroundDetect()”, CLI-Befehl show
translation