Call recording monitor major problem


We are using asterisk 1.8.11 on centos 5.8

We have to use the pausemonitor feature in order to pause call recording
Unfortunately this doesnt work with mixmonitor, we have to use monitor to record the calls -

here’s the macro written with the pause features

exten => s,1,Noop(DYNAMIC FEATURES)
exten => s,n,Set(__DYNAMIC_FEATURES=pauseMonitor#unpauseMonitor#toggleMonitor)
exten => s,n,Set(MONDIR=/var/spool/asterisk/monitor)
exten => s,n,Monitor(gsm,${MONDIR}/${FNAME},m)
exten => s,n,MacroExit

This all works fine and I can pause and unpause call recording whenever a call is in progress.

However, the “m” option joins the “in” and “out” files end to end, rather than mixing them together
So my final recorded call plays back as the oubound channel for 1/2 of the recording and inbound channel for the second 1/2 !!

Surely the “m” option should mix the files together, just as if I was using mixmonitor???
I would much prefer to use mixmonitor, but that doesnt allow me to use the pausemontor and unpausemonitor functions.

Option m simply executes soxmix or sox -m or whatever is defined in the variable MONITOR_EXEC.
You can bump the debug level to 1 to see what exactly is happening:

You should see: monitor executing soxmix blah-in blah-out blahin the logs.