I am sitting with the following problem and don’t really know what I am doing wrong here.
I want to execute a PHP file from the dialplan, but keep getting a permission denied error.
-- Launched AGI Script /var/lib/asterisk/agi-bin/test.php /var/lib/asterisk/agi-bin/test.php: Failed to execute '/var/lib/asterisk/agi-bin/test.php': Permission denied
same => n,AGI(/var/lib/asterisk/agi-bin/test.php)
I set the user for the file and permissions but seems like still not working.
-rwxrwxrwx 1 asterisk asterisk 240 12月 5 11:26 test.php
The PHP file has just a simple send email function to see if the PHP file is executed.
When I run the PHP file with
php -f /var/lib/asterisk/agi-bin/test.php
It works like a charm, but with the dialplan it doesn’t.
What could be the right solution for this?
I really don’t know anymore what I am doing wrong.
Have tried so many things now.