C.13. Background()
Spielt eine Audiodatei, während Touch-Tone-Ziffern (DTMF-Töne)
akzeptiert werden.
Background(Datei1
[&Datei2
...][,Optionen
[,Sprache
]])
Spielt die angegebene(n) Audiodatei(en), während auf den Start der
Eingabe einer Extension durch den Benutzer gewartet wird. Sobald der
Benutzer mit der Eingabe einer Extension begonnen hat, wird die Wiedergabe
beendet. Der Dateiname sollte ohne Dateiendung angegeben werden, da Asterisk
dann automatisch das Dateiformat mit den geringsten Übersetzungskosten
auswählt.
Optionen
ist einer der folgenden Werte (nicht
kombinierbar):skip
- Die Wiedergabe der Nachricht wird übersprungen, falls sich der Channel gegenwärtig nicht im
up
-Status befindet (z. B., weil er bisher nicht beantwortet wurde). Istskip
angegeben, wird die Anwendung unverzüglich beendet, falls der Channel aufgelegt ist. noanswer
- Der Channel kann erst beantwortet werden, nachdem die angegebene Audiodatei abgespielt wurde. Ist diese Option nicht angegeben, wird der Channel automatisch beantwortet, bevor die Audiodatei abgespielt wird. Beachten Sie, dass nicht alle Kanäle erlauben, vor ihrer Beantwortung eine Nachricht abzuspielen.
Der Parameter
Sprache
kann verwendet werden, um eine
bestimmte Sprache zu definieren, in der Nachrichten abgespielt werden
sollen, falls diese nicht der für diesen Channel aktuell eingestellten
Sprache entspricht.Liefert -1 zurück, wenn aufgelegt wurde oder falls der angegebene
Dateiname nicht existiert, sonst 0.
exten => 123,1,Answer() exten => 123,n,Background(bitte-extension-eingeben)
Asterisk-Versionen:
————————| 1.2 |————————| 1.4 |————————| 1.6 |————————
Interner Hilfetext zu dieser Applikation 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 (do not put extension)
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.
See Also: Playback (application) -- Play sound file(s) to the channel,
that cannot be interrupted
Differenz des internen Hilfetexts von Asterisk 1.2 zu 1.4:
--- in Asterisk 1.2
+++ in Asterisk 1.4
@@ -1,23 +1,25 @@
-= Info about application 'BackGround' =-
[Synopsis]
- Play a file while awaiting extension
+ 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 explicity 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
+ This application will play the given list of files (do not put extension)
+ 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
+ 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
+ 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
+ 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: Playback (application) -- Play sound file(s) to the channel,
+ that cannot be interrupted
Differenz des internen Hilfetexts von Asterisk 1.4 zu 1.6:
--- in Asterisk 1.4
+++ in Asterisk 1.6
@@ -4,7 +4,7 @@
Play an audio file while waiting for digits of an extension to go to.
[Description]
- Background(filename1[&filename2...][|options[|langoverride][|context]]):
+ Background(filename1[&filename2...][,options[,langoverride][,context]]):
This application will play the given list of files (do not put extension)
while waiting for an extension to be dialed by the calling channel. To
continue waiting for digits after this application has finished playing
@@ -21,5 +21,8 @@
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.
+ This application sets the following channel variable upon completion:
+ BACKGROUNDSTATUS The status of the background attempt as a text string, one of
+ SUCCESS | FAILED
See Also: Playback (application) -- Play sound file(s) to the channel,
that cannot be interrupted
Siehe auch
Abschnitt C.117, „Playback()
“, Abschnitt C.14, „BackgroundDetect()
“, CLI-Befehl show
translation