Python AGI script

One of the first things you need to do when using AGI is to ensure your script works locally outside of Asterisk. Additionally, instead of using relative paths inside the script, make sure you use the full path so that any external files referenced in the script can be found when running the AGI. Also, ensure that your permissions are correctly set, which I believe they are in your case

Regarding testing your script outside of Asterisk, you can’t directly test AGI applications outside the Asterisk environment. However, you can simulate their behavior by replacing them with verbose messages. This allows you to ensure that the script runs correctly. Once it passes all these local tests, you can then integrate your AGI script into Asterisk.