Start/stop MixMonitor on another channel

Hello,

I am trying to create a call recording scheme in which either side can record their own channel, but the other side must agree to recording. The problem is, I don’t know who the other side is until the call is actually answered. I can activate MixMonitor on the called channel in a pre-bridge handler, but there is no possibility to attach a pre-bridge handler to the calling channel. I also don’t see a way to (de)activate MixMonitor on a different channel. A kludgy solution would be to start recording on the calling channel, and then delete the file on hangup in case it was not allowed. I would appreciate if someone has a better idea.

I don’t think there is the flexibility in dialplan to really do this, but it would not be that hard using AMI to monitor things and know what is going on.

Thanks for the info. I don’t want to bring AMI into this, so obviously I have to rethink my design.

Do you know why it is not possible to have a pre-bridge handler on a calling channel (considering that pre-dial handlers can be attached to both channels)? Difficult to implement or simply nobody got around to it?

It likely just wasn’t designed or implemented for that case.