Permissions denied when executing perl script wakeup call

hello. i am trying to set up wake up calls using asterisk 1.6. when i try the extension for wake up calls

exten => _55XXXX#,1,AGI(wakeup-call.pl) ; Set wake-up call
exten => _#55#,1,AGI(wakeup-call.pl) ; Cancel all
exten => _#55XXXX#,1,AGI(wakeup-call.pl) ; Cancel specific
exten => _
#55#,1,AGI(wakeup-call.pl) ; Check status

it gives the following errors

Executing [551130#@incoming1:1] AGI(“USTM/102@7625-0”, “wakeup-call.pl”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/wakeup-call.pl
wakeup-call.pl: Failed to execute ‘/var/lib/asterisk/agi-bin/wakeup-call.pl’: Permission denied

how to solve this?

Make sure that the script has at least read and execute permissions for the user under which Asterisk is running, and also that all the directories on the path have at least execute permission. Make sure that SELinux isn’t getting in the way. I would personally advise making sure that Asterisk is running as root.

i have the same problème with a php script and i want to know if you have found a solution ? because i have verify the permission of php file and the parent’s directory and i have found nothing