I have an IVR set up with a couple of queue’s. The calls on queues are getting recorded but the MONITOR_EXEC is not getting executed after the call is done. I am running asterisk 10.12

the IVR setting looks like this in the extensions.conf:

include = default
exten = s,1,NoOp(vot.net)
exten = s,2,Answer()
exten = s,3,Background(record/VoTOfficeGreeting_converted)
exten = s,n,Set(MONITOR_EXEC=mv /var/spool/asterisk/monitor/${UNIQUEID}.wav /var/recordings/tmp/${UNIQUEID}.wav)
exten = s,5,Hangup()
exten = 1,1,Goto(queues,800,1)
exten = 2,1,Goto(queues,802,1)
exten = t,1,Voicemail(501,u)
exten = i,1,Goto(voicemenu-custom-1,s,1)

Please let me know what I am not doing correct.

thanks in advance.

The Set is unreachable for normal calls, as the Background jumps to the new extension.

what happens if I put the set before the background?