AstRecipes » Storing audio files in subfolders
It is often useful to store audio recordings in different subfolders, e.g. per day. We imagine that you want to record queue traffic on an external volume called /recording.for YYYY in 2009 2010 2011 2012
do
for MM in 01 02 03 04 05 06 07 08 09 10 11 12
do
for DD in 01 02 03 04 05 06 07 08 09 10
11 12 13 14 15 16 17 18 19 20
21 22 23 24 25 26 27 28 29 30 31
do
mkdir -p $YYYY/$MM/$DD
done
echo Created: $YYYY/$MM
done
done
chown -R asterisk.asterisk /recordings
Thanks Atis for pointing it out
[queue-abc]
exten => s,1,Wait(3)
exten => s,n,Answer
exten => s,n,Set(MONITOR_FILENAME=/recordings/${STRFTIME(${EPOCH},,%G/%m/%d)}/queue_abc-${UNIQUEID}.WAV)
exten => s,n,Queue(queue_abc|t|||150)



