[Home]

Summary:ASTERISK-24527: Give StopMixMonitor the ability to Stop MixMonitor on ANY channel.
Reporter:xrobau (xrobau)Labels:
Date Opened:2014-11-14 18:59:54.000-0600Date Closed:
Priority:MinorRegression?No
Status:Open/NewComponents:Applications/app_mixmonitor
Versions:13.0.0 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:If the channel that started recording (via dialplan) wishes to stop recording after (for example) going through Queues, the StopMixMonitor command is unable to stop it, as it will only look on the CURRENT channel for the MixMonID.

Adding the ability to specify the channel to StopMixMon would make this more controllable by the dialplan:

{code}
  -- Executing [recordcheck@sub-record-check:18] MixMonitor("Local/11991199@from-pstn-0000000c;2", "2014/11/15/q-1122-91919191-20141115-103758-1416011878.395.wav,ai(LOCAL_MIXMON_ID),") in new stack
   -- Executing [recordcheck@sub-record-check:19] Set("Local/11991199@from-pstn-0000000c;2", "__MIXMON_ID=0x7fd0b498c6d0") in new stack
   -- Executing [recordcheck@sub-record-check:20] Set("Local/11991199@from-pstn-0000000c;2", "__RECORD_ID=Local/11991199@from-pstn-0000000c;2") in new stack
{code}

That starts recording, then gets handed to a Queue..

{code}
  -- Executing [1122@ext-queues:41] Queue("Local/11991199@from-pstn-0000000c;2", "1122,t,,,,,,,,") in new stack
   -- Called Local/303@from-queue/n
   --     -- LazyMembers debugging - Numbusies: 0, Nummems: 1
 == Begin MixMonitor Recording Local/11991199@from-pstn-0000000c;2
   -- Executing [303@from-queue:1] Set("Local/303@from-queue-0000000d;2", "QAGENT=303") in new stack
   -- Executing [303@from-queue:2] Goto("Local/303@from-queue-0000000d;2", "1122,1") in new stack
   -- Goto (from-queue,1122,1)
{code}

....

{code}
 -- Executing [recordcheck@sub-record-check:26] StopMixMonitor("Local/303@from-queue-0000000d;2", "") in new stack
   -- Executing [recordcheck@sub-record-check:27] StopMixMonitor("Local/303@from-queue-0000000d;2", "0x7fd0b498c6d0") in new stack
  -- Executing [recordcheck@sub-record-check:28] StopMixMonitor("Local/303@from-queue-0000000d;2", "Local/11991199@from-pstn-0000000c;2") in new stack
   -- Executing [recordcheck@sub-record-check:29] Return("Local/303@from-queue-0000000d;2", "") in new stack
{code}

Either of the last two StopMixMonitors should be valid, I would think?


Comments:By: Rusty Newton (rnewton) 2014-11-17 16:34:20.321-0600

Well, if I'm reading the debug right, it looks like MixMonitor was started on {{Local/11991199@from-pstn-0000000c;2}}, so you will have to call StopMixMonitor on the {{Local/11991199@from-pstn-0000000c;2}} channel execution.

Your last two calls to StopMixMonitor were called on {{Local/303@from-queue-0000000d;2}}.

By: Rusty Newton (rnewton) 2014-11-17 16:35:20.454-0600

This isn't really a bug, but a feature request. Are you working on a patch?

By: xrobau (xrobau) 2014-11-17 19:26:16.711-0600

I did make it a feature request, didn't I? (Improvement? It's not a bug, sorry if I added it to the wrong place)

And yes, I know WHY it's not working - I had a look at the code, and stop_mixmon only uses the current ast_chan. I ended up doing an exec that uses AMI to do it against the required channel.  Hacky and yuck.

Hence the (low priority) feature request.

It's probably not THAT traumatic for someone who's fluent in Asterisk internals..

By: Rusty Newton (rnewton) 2014-12-03 16:35:37.117-0600

>I did make it a feature request, didn't I? (Improvement? It's not a bug, sorry if I added it to the wrong place)

No you are good. I was just curious if you were working on a patch.

Thanks!