Skip to content

MixMonitor()

Synopsis

Record a call and mix the audio during the recording. Use of StopMixMonitor is required to guarantee the audio file is available for processing during dialplan execution.

Description

Records the audio on the current channel to the specified file.

This application does not automatically answer and should be preceeded by an application such as Answer or Progress().

Note

MixMonitor runs as an audiohook.

Note

If a filename passed to MixMonitor ends with '.wav49', Asterisk will silently convert the extension to '.WAV' for legacy reasons. MIXMONITOR_FILENAME will contain the actual filename that Asterisk is writing to, not necessarily the value that was passed in.

  • MIXMONITOR_FILENAME - Will contain the filename used to record.

Warning

Do not use untrusted strings such as CALLERID(num) or CALLERID(name) as part of ANY of the application's parameters. You risk a command injection attack executing arbitrary commands if the untrusted strings aren't filtered to remove dangerous characters. See function FILTER().

Syntax

MixMonitor(filename.extension,[options,[command]])
Arguments
  • file

    • filename required - If filename is an absolute path, uses that path, otherwise creates the file in the configured monitoring directory from asterisk.conf.

    • extension required

  • options

    • a - Append to the file instead of overwriting it.

    • b - Only save audio to the file while the channel is bridged.

    • B(interval) - Play a periodic beep while this call is being recorded.

      • interval - Interval, in seconds. Default is 15.
    • c - Use the real Caller ID from the channel for the voicemail Caller ID.
      By default, the Connected Line is used. If you want the channel caller's real number, you may need to specify this option.

    • d - Delete the recording file as soon as MixMonitor is done with it.
      For example, if you use the m option to dispatch the recording to a voicemail box, you can specify this option to delete the original copy of it afterwards.

    • v(x) - Adjust the heard volume by a factor of x (range '-4' to '4')

      • x required
    • V(x) - Adjust the spoken volume by a factor of x (range '-4' to '4')

      • x required
    • W(x) - Adjust both, heard and spoken volumes by a factor of x (range '-4' to '4')

      • x required
    • r(file) - Use the specified file to record the receive audio feed. Like with the basic filename argument, if an absolute path isn't given, it will create the file in the configured monitoring directory.

      • file required
    • t(file) - Use the specified file to record the transmit audio feed. Like with the basic filename argument, if an absolute path isn't given, it will create the file in the configured monitoring directory.

      • file required
    • n - When the r or t option is used, MixMonitor will insert silence into the specified files to maintain synchronization between them. Use this option to disable that behavior.

    • i(chanvar) - Stores the MixMonitor's ID on this channel variable.

      • chanvar required
    • p - Play a beep on the channel that starts the recording.

    • P - Play a beep on the channel that stops the recording.

    • m(mailbox) - Create a copy of the recording as a voicemail in the indicated mailbox(es) separated by commas eg. m(1111@default,2222@default,...). Folders can be optionally specified using the syntax: mailbox@context/folder

      • mailbox required
  • command - Will be executed when the recording is over.
    Any strings matching '^{X}' will be unescaped to X.
    All variables will be evaluated at the time MixMonitor is called.

    Warning

    Do not use untrusted strings such as CALLERID(num) or CALLERID(name) as part of the command parameters. You risk a command injection attack executing arbitrary commands if the untrusted strings aren't filtered to remove dangerous characters. See function FILTER().

See Also

Generated Version

This documentation was generated from Asterisk branch 21 using version GIT