B.12. Background()

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
Playback is skipped if the channel is not in the up state when the application is run. If skip is specified, the application ends immediately when the channel is hung up.
noanswer
The channel is only answered after the specified sound file has been played. The default behavior is to answer the channel automatically before playing the sound file. Note that not all channel types allow playback of a message before being answered.
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)

Note

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 digits
after this application has finished playing files, the WaitExten application
should be used. The 'langoverride' option explicitly specifies which language
to attempt to use for the requested sound files. If a 'context' is specified,
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, call 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 language
---
> should be used. The 'langoverride' option explicity specifies which language
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