--set(api_hangup_hook=system /usr/local/freeswitch/scripts/fax_cleanup ${fax_result_code} ${jobid} ${uuid} ${file}) fax_result_code = env:getHeader("fax_result_code"); jobid = env:getHeader("jobid"); file = env:getHeader("file"); uuid = env:getHeader("uuid"); os.execute("/usr/bin/touch /tmp/touchme"); os.execute("/bin/echo " .. fax_result_code .. " >> /tmp/debug.log"); os.execute("/usr/local/bin/php /production/fax/scripts/fax_cleanup " .. fax_result_code .. " " .. jobid .. " " .. uuid .. " " .. file); collectgarbage("collect");