AMI Pause Mixmonitor - Not Monitor

Hi,

After a few weeks of testing and trawling forums I wondered if the community could suggest a solution to pausing mixmonitor during a recording?

I am using Mixmonitor to seperate call legs using the left and right options then post processing with sox to combine the two legs into a stereo recording. I have Mixmonitor set to record only when the call is bridged which removes any ringing etc but if a user places a caller on hold this increases the length of the recording for that leg as hold music is recorded. The result being an out of sync recording.

What I would like to do is pause Mixmonitor to stop the hold music being present in the recording for that leg of the call BUT using AMI to achieve this I only have options to pause Monitor.

I appreciate I can use the one touch recording context to stop then start the recording for the given leg then using Mixmonitor’s ‘a’ flag I can append the original recording, but due to the way in which I have modified Mixmonitor to seperate left and right channels I end up with two recording files which is not desirable,

I have tried using AMI to mute audio when music on hold is invoked by reacting to the event but this results in silence in the recording as you might expect. When sox then combines the left and right channels the audio is out of sync by the length of the time the caller was placed on hold.

Any help or an alternative angle to approach this via would be appreciated.

You may want to look into HOLD_INTERCEPT() to modify the order of the process.

  1. Hold Request
    1. AMI Action: PauseMonitor
    2. AMI Action: Park

This might help, but I’m not sure how to resume the call and MixMonitor.

Thanks for your reply interestingly I have made some progress. In order to better explain my testing I have made things simple using internal extensions 2001 and 2002.

Both extensions are set to record = force

I have created a script that looks for State:ONHOLD manager events then issues the command PauseMonitor for the two channels involved.

The AMI returns

Event: Hold
SIP/2001-0000252b
SIP/2002-0000252a
Response: Success
Message: Paused monitoring of the channel

Response: Success
Message: Paused monitoring of the channel

Then when music on hold is disabled I get the events

Event: Unhold
SIP/2001-0000252b
SIP/2002-0000252a
Response: Success
Message: Unpaused monitoring of the channel

Response: Success
Message: Unpaused monitoring of the channel

When testing I am dialling from 2002 to 2001 so from the perspective of 2001 the call is inbound. If 2002 invokes hold the recording does not contain hold music BUT if 2001 invokes hold music the music on hold is present in the recording.

Interestingly in reverse if 2001 calls 2002 the issue is the same. (no surprise).

Is this a bug as the AMI is suggesting that recording is paused and providing status as confirmation but all inbound calls result in music on hold present in the recording file and all outbound calls do not if pressing hold on the same handset.

Any advice would be appreciated as this is driving me mad.