C.14. BackgroundDetect()

Spielt eine Audiodatei im Hintergrund und erkennt Sprechen.
BackgroundDetect(SoundDatei[,Stille[,Min[,Max]]])
Ähnlich Background(), versucht jedoch zu erkennen, ob jemand spricht.
Während der Wiedergabe der Datei wird Eingang von Audio in Empfangsrichtung überwacht. Wird eine Geräuschphase von mehr als Min Millisekunden Dauer und weniger als Max Millisekunden registriert und darauf folgend eine geräuschlose Phase von wenigstens Stille Millisekunden, wird die Audiowiedergabe abgebrochen und die Ausführung an die Extension talk delegiert, falls diese existiert.
Sind Stille, Min und Max nicht spezifiziert, werden jeweils die Standardwerte 1000 ms, 100 ms und unendlich angenommen.
Wenn aufgelegt wird, liefert die Anwendung -1 zurück, nach abgeschlossener Wiedergabe ohne vorhandene Ausstiegsbedingungen 0.
exten => 123,1,BackgroundDetect(sinfonie)
exten => 123,n,Playback(vm-sorry)
exten => talk,1,Playback(ja-bitte)
Asterisk-Versionen:
————————| 1.2 |————————| 1.4 |————————| 1.6 |————————
Interner Hilfetext zu dieser Applikation in Asterisk 1.4:
  -= Info about application 'BackgroundDetect' =-

[Synopsis]
Background a file with talk detect

[Description]
  BackgroundDetect(filename[|sil[|min|[max]]]):  Plays  back  a  given
filename, waiting for interruption from a given digit (the digit must
start the beginning of a valid extension, or it will be ignored).
During the playback of the file, audio is monitored in the receive
direction, and if a period of non-silence which is greater than 'min' ms
yet less than 'max' ms is followed by silence for at least 'sil' ms then
the audio playback is aborted and processing jumps to the 'talk' extension
if available.  If unspecified, sil, min, and max default to 1000, 100, and
infinity respectively.
Differenz des internen Hilfetexts von Asterisk 1.2 zu 1.4:
— keine —
Differenz des internen Hilfetexts von Asterisk 1.4 zu 1.6:
--- in Asterisk 1.4
+++ in Asterisk 1.6
@@ -4,12 +4,12 @@
   Background a file with talk detect

   [Description]
-    BackgroundDetect(filename[|sil[|min|[max]]]):  Plays  back  a  given
-  filename, waiting for interruption from a given digit (the digit must
-  start the beginning of a valid extension, or it will be ignored).
-  During the playback of the file, audio is monitored in the receive
-  direction, and if a period of non-silence which is greater than 'min' ms
-  yet less than 'max' ms is followed by silence for at least 'sil' ms then
-  the audio playback is aborted and processing jumps to the 'talk' extension
-  if available.  If unspecified, sil, min, and max default to 1000, 100, and
-  infinity respectively.
+    BackgroundDetect(<filename>[,<sil>[,<min>[,<max>[,<analysistime>]]]]):
+  Plays back <filename>, waiting for interruption from a given digit (the digit
+  must start the beginning of a valid extension, or it will be ignored).  During
+  the playback of the file, audio is monitored in the receive direction, and if
+  a period of non-silence which is greater than <min> ms yet less than <max> ms
+  is followed by silence for at least <sil> ms, which occurs during the first
+  <analysistime> ms, then the audio playback is aborted and processing jumps to
+  the <talk> extension, if available.  If unspecified, <sil>, <min>, <max>, and
+  <analysistime> default to 1000, 100, infinity, and infinity respectively.