Asterisk 11 - Stopmixmonitor issues

Get help with installing, upgrading and running Asterisk.

Moderators: muppetmaster, Moderator, Support

Asterisk 11 - Stopmixmonitor issues

Postby edestechnical » Fri Jan 15, 2016 4:59 am

Hi Asterisk world...

I have asterisk 11 running on an ubuntu system and I am having problems getting the desired behaviour for mixmonitor recordings.

I have queues set up and working fine, mixmonitor is called just before queue in the dialplan.

I have features set up that allow the users to press #5 and #6 to stop and restart the recordings, these features work when the key sequences are pressed, I can see this is the cli.

What doesn't work as expected is calling StopMixMonitor(), the recording continues. I have tried several different ways of passing the mixmonitor id to stopmixmonitor but I cannot get the recording to stop.

I tried storing the mixmonitor id and the original channel name in the channel variables:
MixMonitor(${RECORDING_FILENAME}.wav,bi(__MIXMONID));
or
MixMonitor(${RECORDING_FILENAME}.wav,bi(__MIXMONID));
Set(__MIXMONCHANNEL=${CHANNEL});

but this then doesn't work:
[macro-pause-recording]
exten => s,1,Verbose(Stopping Recording ${RECORDING_FILENAME} mixmonid ${MIXMONID})
same => n,DumpChan()
same => n,StopMixMonitor(${MIXMONID}) ; this doesn't work...
same => n,StopMixMonitor(${MIXMONCHANNEL}) ; nor does this...
same => n,Verbose(macro-pause-recording done)


Please could someone shed any light on the correct way to stop mixmonitor?

Many thanks,
Ed
edestechnical
Newsterisk
 
Posts: 2
Joined: Fri Jan 15, 2016 4:48 am

Re: Asterisk 11 - Stopmixmonitor issues

Postby abw1oim » Mon Jan 18, 2016 1:43 am

From the docs for StopMixMonitor:

Stops the audio recording that was started with a call to MixMonitor() on the current channel.


In other words: StopMixMonitor will only stop a Monitoring started at the current channel.
If MixMonitor is started outside the queue it is started at the callers Channel while Your interruption command comes from the callees Channel which doesn't have any MixMonitor started thus it can't stop it.
I'm not completely sure, but You may try setting AUDIOHOOK_INHERIT before calling StartMixMonitor.
The alternative approach is to use the Monitoring-function within the Queue-apllication itself (see queues.conf). To be honest: I never tried this in combination with callee-induced key-sequences for interruption and restart ...
Olaf Winkler
Asterisk- & Database-Solutions
abw1oim
Oldsterisk
 
Posts: 358
Joined: Fri Aug 05, 2011 1:00 am
Location: Germany


Return to Asterisk Support

Who is online

Users browsing this forum: Exabot [Bot] and 1 guest