Run a custom .AGI script in freebbx

I have installed a P.I.A.F v 1.1 on a server and im trying to run a .AGI script that i’ve placed under /var/lib/asterisk/agi-gin i’ve set up my extensions_custom.conf like this

exten => s,1, Wait (6)
exten => s,2, Answer
exten => s,3, AGI (xxxxxxx.agi)
exten => s,4, Hangup

and when i call using SIP protocol

the agi file launches and then returns 0 errors and doesnt run the script
and the agi file works fine on a native asterisk server

is there a way to load this agi file in freepbx?
if there a way to load the agi file in the GUI?

any ideas?

Is your AGI file owned by Asterisk and are the permissions set the same as the other AGI files on the system?

the AGI file i think it is owned by asterisk, because if i use a native asterisk server it will run, and at first in freepbx it gave me a permission denied, i then ran chmod 775 xxxxxx.agi to give it permissions and then the error of permission denied went away and i went to the agi complete 0 errors message