I have the following uncommented
monitor_exec=/usr/local/fop2/recording_fop2.pl
It is set to run as user asterisk
-rwxr-xr-x 1 asterisk asterisk 6870 Jul 14 06:49 recording_fop2.pl
Here are the sox and soxmix.
[root@biaggis-blm-ipt1 fop2]# which sox
/usr/bin/sox
[root@biaggis-blm-ipt1 fop2]# which soxmix
/usr/bin/soxmix
I have this in fop2recordings
select * from fop2recordings;
+----+--------------+---------------------+----------------+-----------------+-----------------------------------------------------------------------------+----------+---------+
| id | uniqueid | datetime | ownerextension | targetextension | filename | duration | context |
+----+--------------+---------------------+----------------+-----------------+-----------------------------------------------------------------------------+----------+---------+
| 1 | 1342500033.3 | 2012-07-16 23:40:53 | 210 | 206 | /var/spool/asterisk/monitor/fop2/2012-07-16/210_206_234046_1342500033.3.wav | 7 | |
+----+--------------+---------------------+----------------+-----------------+-----------------------------------------------------------------------------+----------+---------+
1 row in set (0.00 sec)