Name
Monitor() — Monitors (records) the audio on the current channel
Synopsis
Monitor([file_format[:urlbase][,fname_base][,options]])
Starts monitoring a channel. The channel’s input and
output voice packets are logged to files until the channel hangs up or
monitoring is stopped by the StopMonitor() application.
Monitor() takes the following
arguments:
file_formatSpecifies the file format. If not set, defaults to
wav.fname_baseIf set, changes the filename used to the one specified.
optionsOne of two options can be specified:
mWhen the recording ends, mix the two leg files in to one and delete the original leg files. If the variable
${MONITOR_EXEC}is set, the application referenced in it will be executed instead of soxmix, and the raw leg files will not be deleted automatically. soxmix (or${MONITOR_EXEC}) is handed three arguments: the two leg files and the filename for the target mixed file, which is the same as the leg filenames but without the in/out designator. If${MONITOR_EXEC_ARGS}is set, the contents will be passed on as additional arguments to${MONITOR_EXEC}. Both${MONITOR_EXEC}and themflag can be set from the administrator interface.bDon’t begin recording unless a call is bridged to another channel.
exten => 123,1,Answer()
; record the current channel, and mix the audio channels at the end of
; recording
exten => 123,2,Monitor(wav,monitor_test,mb)
exten => 123,3,SayDigits(12345678901234567890)
exten => 123,4,StopMonitor()