Name
Record() — Records channel audio to a file
Synopsis
Record(filename:format,silence[,maxduration][,options]) (in Asterisk 1.0.x) Record(filename.format,silence[,maxduration][,options]) (in Asterisk 1.2.x)
Records audio from the channel into the given
filename. If the file already exists, it
will be overwritten.
Optional arguments include:
formatSpecifies the format of the file type to be recorded. Valid formats include:
g723,g729,gsm,h263,ulaw,alaw,vox,wav, andWAV.silenceSpecifies the number of seconds of silence to allow before returning.
maxdurationSpecifies the maximum recording duration, in seconds. If missing or
0, there is no maximum.optionsMay contain any of the following letters:
sSkip recording if the line is not yet answered.
nDo not answer, but record anyway if the line is not yet answered.
aAppend the recording to the existing recording rather than replacing it.
tUse the alternate
*terminator key instead of the default#.
If the filename contains %d,
these characters will be replaced with a number incremented by one
each time the file is recorded.
The user can press # to
terminate the recording and continue to the next priority.
Returns -1 when the user
hangs up.
; record the caller's name
exten => 123,1,Playback(pls-rcrd-name-at-tone)
exten => 123,2,Record(/tmp/name:gsm,3,30)
exten => 123,3,Playback(/tmp/name)Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access