› VitalPBX Community Support › General Discussion › pause/resume call recording
- This topic has 7 replies, 2 voices, and was last updated 2 years, 1 month ago by
gerrykernan.
- Post
-
- November 12, 2018 at 12:10 pm
hi
i’m trying to add a custom feature to allow users pause/resume call recordings .
ive added these macros to the dialplan
[macro-recpause]
exten => s,1,Playback(/var/lib/asterisk/sounds/en/beep)
exten => s,n,NoOP(Call file name is ${ARG1})
exten => s,n,Noop(“pause code pressed”)
exten => s,n,StopMixMonitor()[macro-recunpause]
exten => s,1,Playback(/var/lib/asterisk/sounds/en/beep)
exten => s,n,Playback(/var/lib/asterisk/sounds/en/beep)
exten => s,n,NoOp(${ARG1})
exten => s,n,Noop(“resume code pressed”)
exten => s,n,MixMonitor(${ARG1},a,${MIXMON_POST})and these to features__10-application-map.conf
InPauseMonitor => #2,peer/both,Macro(recpause),${REC_FILENAME}
InUnpauseMonitor => #3,peer/both,Macro(recunpause),${REC_FILENAME}[custom-features]
one_touch_rec =>
InUnpauseMonitor =>
InPauseMonitor =>but when i press #2 during a call the variable ${REC_FILENAME} is not passed to the marco , is what im trying to do feasible?
shoud i be doing this another way.
Best Regards
gerry
0
- Replies
-
- November 15, 2018 at 4:31 pm
hi
i got little futher on this , using macros below
[macro-recpause]
exten => s,1,Playback(/var/lib/asterisk/sounds/en/beep)
exten => s,n,Noop(“pause code pressed”)
exten => s,n,StopMixMonitor()[macro-recunpause]
exten => s,1,Playback(/var/lib/asterisk/sounds/en/beep)
exten => s,n,Playback(/var/lib/asterisk/sounds/en/beep)exten => s,n,Noop(“resume code pressed”)
exten => s,n,NoOP(Call file name is ${UNIQUEID} )
exten => s,n,Set(AUDIO_FILE=${UNIQUEID})
exten => s,n,NoOP(AUDIO_FILE name is ${UNIQUEID} )
exten => s,n,Set(RECORDING_FORMAT=${IF($[“${RECORDING_FORMAT}”=”wav49”]?WAV:${RECORDING_FORMAT})})
exten => s,n,Set(REC_FILENAME=${ASTSPOOLDIR}/monitor/${STRFTIME(${EPOCH},,%Y/%m/%d)}/${AUDIO_FILE}.${RECORDING_FORMAT})
exten => s,n,Noop(rec file = ${REC_FILENAME})
exten => s,n,MixMonitor(${REC_FILENAME},a,${MIXMON_POST})but the ${UNIQUEID} i get when the callee presses #3 to resume call recording is differnet than the ${UNIQUEID} created when the call is first answered
Call answered
– Executing [s@sub-perform-recording:1] NoOp(“PJSIP/13_4-00000130”, “Perform Call Recording”) in new stack
— Executing [s@sub-perform-recording:2] Set(“PJSIP/13_4-00000130”, “AUDIO_FILE=1542299030.15220“) in new stack
— Executing [s@sub-perform-recording:3] Set(“PJSIP/13_4-00000130”, “RECORDING_FORMAT=wav”) in new stack
— Executing [s@sub-perform-recording:4] Set(“PJSIP/13_4-00000130”, “REC_FILENAME=/var/spool/asterisk/monitor/2018/11/15/1542299030.15220.wav”) in new stack
— Executing [s@sub-perform-recording:5] Set(“PJSIP/13_4-00000130”, “CDR(recfile)=/var/spool/asterisk/monitor/2018/11/15/1542299030.15220.wav”) in new stack
— Executing [s@sub-perform-recording:6] MixMonitor(“PJSIP/13_4-00000130”, “/var/spool/asterisk/monitor/2018/11/15/1542299030.15220.wav,b,”) in new stack
— Executing [s@sub-perform-recording:7] Set(“PJSIP/13_4-00000130”, “_RECORDING_IN_PROGRESS=yes”) in new stackcallee presses #3 to resume recording
Executing [s@macro-recunpause:3] NoOp(“SIP/infinityit-00002668”, “”resume code pressed””) in new stack
— Executing [s@macro-recunpause:4] NoOp(“SIP/infinityit-00002668”, “Call file name is 1542299030.15219 “) in new stack
— Executing [s@macro-recunpause:5] Set(“SIP/infinityit-00002668”, “AUDIO_FILE=1542299030.15219”) in new stack
— Executing [s@macro-recunpause:6] NoOp(“SIP/infinityit-00002668”, “AUDIO_FILE name is 1542299030.15219 “) in new stack
— Executing [s@macro-recunpause:7] Set(“SIP/infinityit-00002668”, “RECORDING_FORMAT=wav”) in new stack
— Executing [s@macro-recunpause:8] Set(“SIP/infinityit-00002668”, “REC_FILENAME=/var/spool/asterisk/monitor/2018/11/15/1542299030.15219.wav”) in new stack
— Executing [s@macro-recunpause:9] NoOp(“SIP/infinityit-00002668”, “rec file = /var/spool/asterisk/monitor/2018/11/15/1542299030.15219.wav”) in new stack
— Executing [s@macro-recunpause:10] MixMonitor(“SIP/infinityit-00002668”, “/var/spool/asterisk/monitor/2018/11/15/1542299030.15219.wav,a,”) in new stack
== Begin MixMonitor Recording SIP/infinityit-00002668im assuming this is a ${UNIQUEID} for each leg of the call. is it possible to acces the UNIQUEID variable for the other leg?
gerry
0- November 15, 2018 at 5:10 pm
- November 26, 2018 at 2:34 pm
hi ,
i’m not getting anywere with this as when opertor presses #2 to stop call and #3 to resume the variable ${UNIQUEID} is the opposite id of the other channel that variable REC_FILE uses to name teh file. found that using same=>n,Set(GLOBAL(MYUNIQUEID)=${UNIQUEID}) only works if there is olnt i call active , when multiple calls this variable has UNIQUEID of most recent call.
according to this page https://wiki.asterisk.org/wiki/display/AST/Custom+Dynamic+Features
if i, reading it correctly the ActivateBy parameter is nolonger used
“ActivatedBy is no longer honored. The feature is activated by which channel DYNAMIC_FEATURES includes the feature is on. Use a pre-dial handler to set different values for DYNAMIC_FEATURES on the channels. Historic values are: “caller”, “callee”, and “both”.”
where would i get this in a pre-dial handler ?
gerry
but futher in teh wiki
0- November 26, 2018 at 2:52 pm
- November 26, 2018 at 3:11 pm
- November 26, 2018 at 3:35 pm
hi mrivera
think i have it working
had to change entries in features__10-application-map.conf from “both” to “self” , then dumpchan shows the mixmonitor_filename variable and i can use in the pause/resume macros.
InPauseMonitor => #2,self/both,Macro(recpause),recording-disabled
InUnpauseMonitor => #3,self/both,Macro(recunpause),recording-disabled[macro-recpause]
exten => s,1,Playback(/var/lib/asterisk/sounds/en/beep)
exten => s,n,dumpchan()
exten => s,n,NoOP(Call file name MIXMon file ${MIXMONITOR_FILENAME})
exten => s,n,Noop(“pause code pressed”)
exten => s,n,StopMixMonitor()[macro-recunpause]
exten => s,1,Playback(/var/lib/asterisk/sounds/en/beep)
exten => s,n,Playback(/var/lib/asterisk/sounds/en/beep)
exten => s,n,dumpchan()
exten => s,n,Noop(“resume code pressed”)
exten => s,n,Noop(rec file = ${MIXMONITOR_FILENAME})
exten => s,n,MixMonitor(${MIXMONITOR_FILENAME},a,${MIXMON_POST})0- November 29, 2018 at 10:33 am
- You must be logged in to reply to this topic.