[asterisk-bugs] [JIRA] (ASTERISK-24345) StopMixMonitor doesn't stop audio recording when run using DYNAMIC_FEATURES

Richard Mudgett (JIRA) noreply at issues.asterisk.org
Mon Sep 22 10:39:29 CDT 2014


     [ https://issues.asterisk.org/jira/browse/ASTERISK-24345?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard Mudgett updated ASTERISK-24345:
---------------------------------------

    Description: 
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}


  was:
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

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);
      }

>From extensions.conf

[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)

>From features.conf

StopMixMonitor  => #0,peer/both,Macro(pause-recording)                                                
StartMixMonitor => #1,peer/both,Macro(unpause-recording)

The asterisk log shows that stopMixMonitor is executed, but the recording is not stopped:

    -- 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> 

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)

  == MixMonitor close filestream (mixed)
  == End MixMonitor Recording ....




> 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