You can do this with a minor code change. Please be cautious of doing this in a production system. This is something you'll want to test in a test system first just in case I've made any mistakes. I'm only human.
You can modify the dialplan to change the location of the queue calls based on the QUEUE number.
First create a new directory. The standard default location of recordings is
/var/spool/asterisk/monitor
All subsequent files go into subdirectories based on YEAR/MONTH/DAY
My example puts all recordings in a separate folder in /var/spool/asterisk/monitor
My queue is "2000" so I will create a directory called "queue2000" =
mkdir queue2000
(You can do this with as many different queues as you would like.) Also these names are case sensitive so make sure you match the case in the directory with the code well modify below
Now make asterisk able to write to it
chown asterisk:asterisk queue2000
Now since we need to modify the code that the GUI will change, we need to make a copy of it.
Call recording code is /etc/asterisk/extensions_additional.conf
So if you copy the entire section from
[sub-record-check]
....[all code]....
;--== end of [sub-record-check] ==--;
And paste it into the bottom of
extensions_override_issabel.conf
After you paste the code, down towards the bottom you'll see this:
exten => recq,1,Set(AUDIOHOOK_INHERIT(MixMonitor)=yes)
exten => recq,n,Set(MONITOR_FILENAME=${MIXMON_DIR}${YEAR}/${MONTH}/${DAY}/${CALLFILENAME})
exten => recq,n,MixMonitor(${MONITOR_FILENAME}.${MIXMON_FORMAT},${MONITOR_OPTIONS},${MIXMON_POST})
exten => recq,n,Set(__REC_STATUS=RECORDING)
exten => recq,n,Set(CDR(recordingfile)=${CALLFILENAME}.${MON_FMT})
exten => recq,n,Return()
Insert this as the 3rd line. You'll notice that there is a "2000" and "queue2000". If you are using different queue number change this.
exten => recq,n,ExecIf($["${ARG2}" = "2000"]?set(MONITOR_FILENAME=${MIXMON_DIR}queue2000/${YEAR}/${MONTH}/${DAY}/${CALLFILENAME}))
It should now look like this:
exten => recq,1,Set(AUDIOHOOK_INHERIT(MixMonitor)=yes)
exten => recq,n,Set(MONITOR_FILENAME=${MIXMON_DIR}${YEAR}/${MONTH}/${DAY}/${CALLFILENAME})
exten => recq,n,ExecIf($["${ARG2}" = "2000"]?set(MONITOR_FILENAME=${MIXMON_DIR}queue2000/${YEAR}/${MONTH}/${DAY}/${CALLFILENAME}))
exten => recq,n,MixMonitor(${MONITOR_FILENAME}.${MIXMON_FORMAT},${MONITOR_OPTIONS},${MIXMON_POST})
exten => recq,n,Set(__REC_STATUS=RECORDING)
exten => recq,n,Set(CDR(recordingfile)=${CALLFILENAME}.${MON_FMT})
exten => recq,n,Return()
Save your changes.
Reload the config
asterisk -rx 'core reload'
Queue calls should now go to your new folder
-rw-r--r-- 1 asterisk asterisk 470444 Mar 26 12:38 rg-600-5557773333-20210326-123751-1616773071.949.wav
/var/spool/asterisk/monitor/queue2000/2021/03/26
Regular calls to
-rw-r--r-- 1 asterisk asterisk 479724 Mar 26 12:38 5557771111-20210326-123739-1616773059.944.wav
/var/spool/asterisk/monitor/2021/03/26
You can repeat this command with different queue numbers if you want to put different ones in different locations.