What I need is a PHP Script to be called by 'cron' to clean-up old recorded outgoing messages at some regular interval. Basically, we have outgoing messages that are recorded by my customer that are saved into a folder '/var/lib/asterisk/sounds/custom/xxxxxxx/' where xxxxxxx is the DID of the owner. There is a database call 'dax' and a table called 'dnislookup' that contains the current file name of the prompts to be played to the callers. However, the customer's folder will have several recorded prompts which are old.
Your job is to create a script that will open the table, gather the current prompt file names and then go to the customers folder and delete any that are not current. The fields in dnislookup of concern are 'bin1' to 'bin8', 'bin90' to 'bin94'. These fields will contain the current & active prompts without the file extension. An example of a file name might be '1_1234' (note: '1_' means it's bin 1) - In the customer's folder this would be '[url removed, login to view]'
Confused, please ask questions
9 pekerja bebas membida secara purata $65 untuk pekerjaan ini
Im in the USA and can do this no problem. PHP and Asterisk is my specialty, check out projects I have written at [login to view URL] on the left menu under 'Projects"