Asterisk MixMonitor Issue for Separating Caller and Callee Audio

I’m using Asterisk 22.5.1, compiled from source with PJSIP 2.15.1. I need to record the caller and callee audio in separate files for inbound calls (no outbound calls).

In older Asterisk versions with ChanSIP, the Monitor function worked well for this. However, in the newer version, Monitor is deprecated, and MixMonitor is recommended.

I’m trying to use MixMonitor’s r (receive) and t (transmit) options to split the audio streams. My dialplan looks like this:

MixMonitor(“main1.wav”,r(“main-r.wav”))
MixMonitor(“main2.wav”,t(“main-t.wav”))

This creates four files as expected, but all files contain the same audio, with both directions mixed, instead of separating the caller and caller audio.

Has anyone faced a similar issue with MixMonitor in Asterisk? If so, how did you resolve it? Any help or suggestions would be greatly appreciated!

That should work fine (and I just tested it).

When the call hangs up, you should see the following if you have the verbose level at >= 2:

MixMonitor close filestream (mixed)
MixMonitor close filestream (mixed)
MixMonitor close filestream (read)
MixMonitor close filestream (write)
End MixMonitor Recording PJSIP/1173-00000000
End MixMonitor Recording PJSIP/1173-00000000 

If you’re running MixMonitor on the same channel, you can combine the two statements into one…

MixMonitor(“main1.wav”,r(“main-r.wav”)t(“main-t.wav”))

If you’re still having issues, more detail around your dialplan and channels would be good.

Thank You. This works.

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