StopMixMonitor destroy call

Hello. I have asterisk 16 and would like to implement stop/resume recording on demand(feature code)
added 2 features code to features.conf:

pauseMonitor => #2,self/both,GoSub(sub-pause-recording,s,1)     ;Allow the callee to pause monitoring
unpauseMonitor => #3,self/both,GoSub(sub-unpause-recording,s,1)
exten => s,1,Verbose(Stopping Recording)
exten => s,n,StopMixMonitor()
exten => s,n,Set(__callWasAlreadyPaused=1)
exten => s,n,Return()

exten => s,1,Verbose(Resuming Recording)
exten => s,n,GoSub(sub-monitor,s,1(${EXTEN})))
exten => s,n,Return()

exten => s,1,NoOp(sub-monitor)
exten => s,n(append),MixMonitor(${WAV}.wav,a,${action})
exten => s,n,Return()
exten => s,n(standartMonitor),MixMonitor(${WAV}.wav,,${action})
exten => s,n(skipRecording),Return()

and it’s work for inbound call redirected to queue

but when I tried to add this to outbound call:

exten => s,n,Set(__DYNAMIC_FEATURES=pauseMonitor#unpauseMonitor)
exten => s,n,Dial(PJSIP/+${toClientNumber}@${trunk},90,TU(sub-monitor,s,1))

when pause of recording actions executed - call destroyed:

Channel PJSIP/ left 'simple_bridge' basic-bridge <d542aac6-ba15-487a-8f18-24e0e58c2f1e>
  == MixMonitor close filestream (mixed)
    -- Channel PJSIP/utdnvxscoj-000001dd left 'simple_bridge' basic-bridge <d542aac6-ba15-487a-8f18-24e0e58c2f1e>

Please help how to stop record without destroying channels.