Questions about writing AGI scripts are on-topic here: ensure you provide a minimal reproducible example of your code, and proper debugging details. General configuration and use of Asterisk (e.g. integrating your AGI script into a dialplan, wondering why your script does not run from Asterisk) is **not** on-topic on this site.