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). Ist skip 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. Es gilt zu beachten, 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)
[Anmerkung]Anmerkung

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 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.

Differenz zum internen Hilfetext 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

Siehe auch. Playback(), BackgroundDetect(), CLI-Befehl show translation


Version 1.2, November 2002

Neue Version verfügbar

Sie betrachten gerade die alte Version des Buches (Version 1.0). Wir empfehlen Ihnen für Asterisk 1.4 und 1.6 die neue Version des Buches.

Asterisk-Tag 2008

Lernen Sie Mark Spencer (den Erfinder von Asterisk) kennen! Viele Vorträge, Case-Studies und Workshops rund um das Thema VoIP. Asterisk-Tag.org

Das gedruckte Buch