Skip to Content
Asterisk: The Future of Telephony, 2nd Edition
book

Asterisk: The Future of Telephony, 2nd Edition

by Jim Van Meggelen, Jared Smith, Leif Madsen
August 2007
Intermediate to advanced
608 pages
20h 33m
English
O'Reilly Media, Inc.
Content preview from Asterisk: The Future of Telephony, 2nd Edition

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_format

Specifies the file format. If not set, defaults to wav.

fname_base

If set, changes the filename used to the one specified.

options

One of two options can be specified:

m

When 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 the m flag can be set from the administrator interface.

b

Don’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()
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.
Start your free trial

You might also like

Asterisk: The Future of Telephony

Asterisk: The Future of Telephony

Jim Van Meggelen, Jared Smith, Leif Madsen
Switching to VoIP

Switching to VoIP

Theodore Wallingford

Publisher Resources

ISBN: 9780596510480Errata Page