C.132. Record()
Aufnahme von Audio auf einem Channel in eine Datei.
Ab Asterisk 1.2:
Record(Basisname[.Format[,Stille[,maxDauer[,Optionen]]]])
Nimmt Audio auf dem Channel auf und speichert es in der Datei
Basisname.Format. Existiert diese Datei bereits, wird sie
überschrieben.Optionale Parameter sind:
format- Spezifiziert das Dateiformat der Aufnahmedatei (
g723,g729,gsm,h263,ulaw,alaw,wav, ...). Stille- Gibt die Dauer in Sekunden an, die geräuschlos verstreichen darf, bevor die Aufnahme beendet wird.
maxDauer- Gibt die maximale Aufnahmedauer in Sekunden an. Falls nicht angegeben oder 0, gibt es keine Obergrenze.
Optionen- Kann beliebige der aufgeführten Flags enthalten:
s- Nimmt nicht auf, wenn die Leitung bisher nicht beantwortet wurde.
n- Antwortet nicht, aber nimmt trotzdem auf, auch wenn die Leitung bisher nicht beantwortet wurde.
a- Hängt die Aufnahme an die bereits bestehende Aufnahme an, statt sie zu überschreiben.
t- Benutzt die alternative Abschlusstaste
*an Stelle der standardmäßig eingestellten#-Taste. q- Keinen Piep-Ton vor der Aufnahme spielen.
x- Auch die Abbruchtasten
#oder*als DTMF-Töne aufzeichnen. Die Aufnahme kann dann nur durch Timeout vonmaxDaueroder durch Auflegen beendet werden.
Enthält der
Basisname die Zeichenkette
%d, wird diese durch eine Nummerierung ersetzt, die bei jedem
erneuten Aufnehmen der Datei um 1 erhöht wird.Der Teilnehmer kann die Taste
# benutzen, um die
Aufnahme abzubrechen und zur nächsten Priorität überzugehen. Beim Auflegen
wird die Aufnahme verworfen.Liefert -1 zurück, wenn der Benutzer auflegt, sonst 0.
; den Namen des Anrufers aufzeichnen: exten => 123,1,Playback(bitte-sprechen-sie-ihren-namen-nach-dem-ton) exten => 123,n,Record(/tmp/name.gsm,3,10) exten => 123,n,Playback(/tmp/name)
Beachten Sie auch die Hinweise bei
Monitor().Asterisk-Versionen:
————————| 1.2 |————————| 1.4 |————————| 1.6 |————————
Interner Hilfetext zu dieser Applikation in Asterisk 1.4:
-= Info about application 'Record' =-
[Synopsis]
Record to a file
[Description]
Record(filename.format|silence[|maxduration][|options])
Records from the channel into a given filename. If the file exists it will
be overwritten.
- 'format' is the format of the file type to be recorded (wav, gsm, etc).
- 'silence' is the number of seconds of silence to allow before returning.
- 'maxduration' is the maximum recording duration in seconds. If missing
or 0 there is no maximum.
- 'options' may contain any of the following letters:
'a' : append to existing recording rather than replacing
'n' : do not answer, but record anyway if line not yet answered
'q' : quiet (do not play a beep tone)
's' : skip recording if the line is not yet answered
't' : use alternate '*' terminator key (DTMF) instead of default '#'
'x' : ignore all terminator keys (DTMF) and keep recording until hangup
If filename contains '%%%%d', these characters will be replaced with a number
incremented by one each time the file is recorded. A channel variable
named RECORDED_FILE will also be set, which contains the final filemname.
Use 'core show file formats' to see the available formats on your system
User can press '#' to terminate the recording and continue to the next priority.
If the user should hangup during a recording, all data will be lost and the
application will teminate.Differenz des internen Hilfetexts von Asterisk 1.2 zu 1.4:
--- in Asterisk 1.2
+++ in Asterisk 1.4
@@ -17,13 +17,14 @@
'n' : do not answer, but record anyway if line not yet answered
'q' : quiet (do not play a beep tone)
's' : skip recording if the line is not yet answered
- 't' : use alternate '*' terminator key instead of default '#'
+ 't' : use alternate '*' terminator key (DTMF) instead of default '#'
+ 'x' : ignore all terminator keys (DTMF) and keep recording until hangup
If filename contains '%%%%d', these characters will be replaced with a number
incremented by one each time the file is recorded. A channel variable
named RECORDED_FILE will also be set, which contains the final filemname.
- Use 'show file formats' to see the available formats on your system
+ Use 'core show file formats' to see the available formats on your system
User can press '#' to terminate the recording and continue to the next priority.Differenz des internen Hilfetexts von Asterisk 1.4 zu 1.6:
--- in Asterisk 1.4
+++ in Asterisk 1.6
@@ -4,7 +4,7 @@
Record to a file
[Description]
- Record(filename.format|silence[|maxduration][|options])
+ Record(filename.format,silence[,maxduration][,options])
Records from the channel into a given filename. If the file exists it will
be overwritten.