Hello everyone, am having trouble with my asterisk for some reason asterisk is failing to execute my python agi.py script. I keep on getting this error WARNING[28506][C-00000011] res_agi.c: Failed to execute ‘/root/ivr/agi.py’: File does not exist and then the call drops. The file is within the correct directory and is executable.
These are the properties of the file -rwxr-xr-x 1 root asterisk 747 Dec 7 08:43 agi.py
david is implying that your PATH environment variable does not include the path to your Python executable. If you enter
which -a python3
that may give you a clue.
If your PATH is borked, you should find out why. It may prevent you from executing any shell commands from Asterisk (via SHELL() or agi()) without having to specify absolute paths.
When I asked about permissions, it hadn’t clicked that they were using a user, rather than a system directory as their first level directory, otherwise I would have asked for the permissions on that, as well, and probably challenged its use.