This post is to address one problem we have been having with elastix for a while now.
We get clients who do lots of call recording and they are constantly complaining that they cant find the recordings..Here is my solution to that problem...
After reading
www.elastix.org/en/component/kunena/3-he...rd-name-problem.html I have come up with the following "dummy proof" procedure for this
1) make a symlink log into the console as root
ln -s /var/spool/asterisk/monitor /var/www/html/rec
2) make a script to do the sorting of the file names
nano /root/sortcalls.sh
#============PASTE THE BELOW CODE INTO THAT FILE===============
#!/bin/bash
TODAY=`date +'%Y-%m-%d'`
mkdir /var/spool/asterisk/monitor/$TODAY
mv /var/spool/asterisk/monitor/$TODAY* /var/spool/asterisk/monitor/$TODAY
#=============END OF THE FILE===================
3) make the file executable
chmod +x /root/sortcalls.sh
4) install the file into the crontab
crontab -e
*/5 * * * * /root/sortcalls.sh
5) log into the elastix admin page and goto "PBX -> PBX CONFIG -> General Settings
set the "Recording Location:" to "/var/spool/asterisk/monitor/"
set the "Run after record:" to ...
** the below is all one line... **
mv ^{MIXMON_DIR}/^{CALLFILENAME}.^{MIXMON_FORMAT} ^{MIXMON_DIR}/`/usr/bin/mysql -u root -peLaStIx.2oo7 -N -B -D asteriskcdrdb -e "SELECT calldate,'From:',src,'To:',dst,'' FROM cdr WHERE uniqueid = ^{UNIQUEID}"|sed -s s'/\s/_/ g'`.^{MIXMON_FORMAT}
** the above is all one line make sure it pastes in that way.... **
6) apply the settings and try recording some calls the calls in
serverip/rec should look like
Index of /monitor
[ICO] Name Last modified Size Description
[DIR] Parent Directory -
[DIR] 2010-07-23/ 23-Jul-2010 14:47 -
[DIR] 2010-07-25/ 25-Jul-2010 13:00 -
and the recordings should be sorted into the folder name with the current date
7) if you need more help contact me
www.ztelco.com and I would be happy to help...