MixMonitor append not working


I’m using MixMonitor and StopMixMonitor to record on demand some calls using a feature code. The problem is that I want the call to be recorded on the same file when I pause the recording using the a parameter on the MixMonitor command but it doesn’t work, the file contains only the part after the last unpause. The code follows:

exten => s,1,GotoIf($["${XAD}" = "0" | "${XAD}" = ""]?startrec:stoprec)
exten => s,n(startrec),Set(XAD=1)
exten => s,n,Set(FILENAME="/var/spool/asterisk/monitor/${STRFTIME(${EPOCH},Europe/Athens,%Y%m%d)}/${CALLERID(num)}-${CALLERID(dnid)}-${UNIQUEID}")
exten => s,n,Set(AUDIOHOOK_INHERIT(MixMonitor)=yes)
exten => s,n,MixMonitor(${FILENAME}.wav,a)
exten => s,n,MacroExit
exten => s,n(stoprec),StopMixMonitor
exten => s,n,Set(XAD=0)
exten => s,n,MacroExit

You should be using Pause and Unpause.

This can only be done on Monitor, not on MixMonitor.

I thought we had used them for PCI DSS, but I guess it must have been the mute option, which is, I think, AMI only. This would have been in the AMI code, to which I no longer have access, so I cannot check what we actually did.

Looking at the code, the append flag only affects the actual file. It doesn’t seem to be passed to the layer that adds the RIFF (.wav) metadata. I’d say that you will find the whole recording is there but the metadata only lists the chunk from the last segment.

It looks to me that this will only work for formats, like .slin, which do not have any metadata.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.