[asterisk-bugs] [JIRA] (ASTERISK-24345) StopMixMonitor doesn't stop audio recording when run using DYNAMIC_FEATURES
Rusty Newton (JIRA)
noreply at issues.asterisk.org
Wed Sep 24 15:45:30 CDT 2014
[ https://issues.asterisk.org/jira/browse/ASTERISK-24345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=222761#comment-222761 ]
Rusty Newton edited comment on ASTERISK-24345 at 9/24/14 3:45 PM:
------------------------------------------------------------------
First off, thank you [~ldardini] for providing a great description of your issue and all of the debug, logs and dialplan necessary to investigate the issue.
Fortunately the issue does not appear to be a bug, but only invalid configuration.
You are starting MixMonitor on one channel:
{noformat}
-- Executing [9999 at authenticated:4] MixMonitor("SIP/103-DEVEL-0000001b", "srv01-1411249646.27.wav,i(MIXMONITORID)a") in new stack
{noformat}
You are attempting to stop MixMonitor on *a different channel*:
{noformat}
-- Executing [s at macro-pause-recording:2] StopMixMonitor("SIP/104-DEVEL-0000001c", "0x7f41d0016730") in new stack
{noformat}
The documentation for StopMixMonitor says:
{noformat}
[Description]
Stops the audio recording that was started with a call to 'MixMonitor()' on
the current channel.
{noformat}
Therefore, you must call StopMixMonitor on the same channel. I talked with [~mmichelson] (an Asterisk dev) to verify that this is the case.
You may wish to reconsider the construction of your dynamic feature mapping. Or else the ways in which you are starting and stopping MixMonitor altogether. In the case of the dynamic feature:
{noformat}
StopMixMonitor => #0,peer/both,Macro(pause-recording)
{noformat}
For the ActivatedOn field, you are using *peer* which , in the case MixMonitor was started via your dialplan, will attempt to StopMixMonitor on the connected channel and not the channel calling the feature (where you have MixMonitor running).
I'm going to close out the issue. If you have any more questions on this; the best place to post them would probably be the [Asterisk Users mailing list|http://lists.digium.com/mailman/listinfo/asterisk-users].
Thanks again for being rigorous with the details you provided on your report.
was (Author: rnewton):
First off, thank you [~ldardini] for providing a great description of your issue and all of the debug, logs and dialplan necessary to investigate the issue.
Fortunately the issue does not appear to be a bug, but only invalid configuration.
You are starting MixMonitor on one channel:
{noformat}
-- Executing [9999 at authenticated:4] MixMonitor("SIP/103-DEVEL-0000001b", "srv01-1411249646.27.wav,i(MIXMONITORID)a") in new stack
{noformat}
You are attempting to stop MixMonitor on *a different channel*:
{noformat}
-- Executing [s at macro-pause-recording:2] StopMixMonitor("SIP/104-DEVEL-0000001c", "0x7f41d0016730") in new stack
{noformat}
The documentation for StopMixMonitor says:
{noformat}
[Description]
Stops the audio recording that was started with a call to 'MixMonitor()' on
the current channel.
{noformat}
Therefore, you must call StopMixMonitor on the same channel. I talked with [~mmichelson] (an Asterisk dev) to verify that this is the case.
You may wish to reconsider the construction of your dynamic feature mapping:
{noformat}
StopMixMonitor => #0,peer/both,Macro(pause-recording)
{noformat}
For the ActivatedOn field, you are using *peer* which , in the case MixMonitor was started via your dialplan, will attempt to StopMixMonitor on the connected channel and not the channel calling the feature (where you have MixMonitor running).
I'm going to close out the issue. If you have any more questions on this; the best place to post them would probably be the [Asterisk Users mailing list|http://lists.digium.com/mailman/listinfo/asterisk-users].
Thanks again for being rigorous with the details you provided on your report.
> StopMixMonitor doesn't stop audio recording when run using DYNAMIC_FEATURES
> ---------------------------------------------------------------------------
>
> Key: ASTERISK-24345
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-24345
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Affects Versions: 11.12.1, 12.5.0
> Reporter: Leandro Dardini
> Severity: Minor
>
> If MixMonitor recording is started in the dialplan and then the recording is attempted to stop using a macro executed using DYNAMIC_FEATURES, it is not stopped. If the MixMonitor recording is started using DYNAMIC_FEATURES, then it can be stopped using StopMixMonitor using DYNAMIC_FEATURES.
> Example code:
> From extensions.ael
> {noformat}
> 9999 => {
> Set(RECORDINGFORMAT=wav); Set(__MONITOR_FILENAME=${UNIQUEID}.${RECORDINGFORMAT});
> Set(__DYNAMIC_FEATURES=StopMixMonitor#StartMixMonitor);
> MixMonitor(${MONITOR_FILENAME},ai(MIXMONITORID));
> Set(__MIXMONITORID=${MIXMONITORID});
> Dial(SIP/104-DEVEL);
> }
> {noformat}
> From extensions.conf
> {noformat}
> [macro-pause-recording]
> exten => s,1,NoOp(Stopping Recording - MONITOR_FILENAME is ${MONITOR_FILENAME} - MIXMONITORID is ${MIXMONITORID})
> exten => s,n,StopMixMonitor(${MIXMONITORID})
> [macro-unpause-recording]
> exten => s,1,NoOp(Resuming Recording - MONITOR_FILENAME is ${MONITOR_FILENAME} - MIXMONITORID is ${MIXMONITORID})
> exten => s,n,MixMonitor(${MONITOR_FILENAME},a)
> {noformat}
> From features.conf
> {noformat}
> StopMixMonitor => #0,peer/both,Macro(pause-recording)
> StartMixMonitor => #1,peer/both,Macro(unpause-recording)
> {noformat}
> The asterisk log shows that stopMixMonitor is executed, but the recording is not stopped:
> {noformat}
> -- Executing [9999 at authenticated:1] Set("SIP/103-DEVEL-0000001b", "RECORDINGFORMAT=wav") in new stack
> -- Executing [9999 at authenticated:2] Set("SIP/103-DEVEL-0000001b", "__MONITOR_FILENAME=srv01-1411249646.27.wav") in new stack
> -- Executing [9999 at authenticated:3] Set("SIP/103-DEVEL-0000001b", "__DYNAMIC_FEATURES=StopMixMonitor#StartMixMonitor") in new stack
> -- Executing [9999 at authenticated:4] MixMonitor("SIP/103-DEVEL-0000001b", "srv01-1411249646.27.wav,i(MIXMONITORID)a") in new stack
> -- Executing [9999 at authenticated:5] Set("SIP/103-DEVEL-0000001b", "__MIXMONITORID=0x7f41d0016730") in new stack
> == Begin MixMonitor Recording SIP/103-DEVEL-0000001b
> -- Executing [9999 at authenticated:6] Dial("SIP/103-DEVEL-0000001b", "SIP/104-DEVEL") in new stack
> == Using SIP RTP TOS bits 184
> == Using SIP RTP CoS mark 5
> -- Called SIP/104-DEVEL
> -- SIP/104-DEVEL-0000001c is ringing
> -- SIP/104-DEVEL-0000001c answered SIP/103-DEVEL-0000001b
> > 0x7f41cc06bb50 -- Probation passed - setting RTP source address to 217.200.185.19:4010
> > 0x7f41d00228e0 -- Probation passed - setting RTP source address to 83.211.224.67:11790
> > 0x7f41d00228e0 -- Probation passed - setting RTP source address to 83.211.224.67:11790
> > 0x7f41cc06bb50 -- Probation passed - setting RTP source address to 217.200.185.19:4010
> -- Feature Found: StopMixMonitor exten: StopMixMonitor
> -- Executing [s at macro-pause-recording:1] NoOp("SIP/104-DEVEL-0000001c", "Stopping Recording - MONITOR_FILENAME is srv01-1411249646.27.wav - MIXMONITORID is 0x7f41d0016730") in new stack
> -- Executing [s at macro-pause-recording:2] StopMixMonitor("SIP/104-DEVEL-0000001c", "0x7f41d0016730") in new stack
> srv01*CLI>
> srv01*CLI>
> srv01*CLI>
> srv01*CLI>
> srv01*CLI>
> srv01*CLI>
> srv01*CLI>
> srv01*CLI>
> srv01*CLI>
> srv01*CLI>
> {noformat}
> Usually when the MixMonitor recording is stopped, the following messages appear in the log. When the StopMixMonitor is executed inside a macro called using DYNAMIC_FEATURES, they are not shown (and the recording is not stopped)
> {noformat}
> == MixMonitor close filestream (mixed)
> == End MixMonitor Recording ....
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list