Problem getting an AGI script to run.

Joined: Wed 13 of Oct, 2010

Problem getting an AGI script to run.

Posted:Wed 13 of Oct, 2010 (18:15 UTC)
I'm trying to call a php AGI script when a specific number is dialed
so there won't be any interruptions to other calls going through.

exten => _12084670088,1,agi(LCRDial.php)

Every time I try to test it I get the following error:

   -- Executing [12084670088@DIDS:1] AGI("SIP/11593-b3ad5250", "LCRDial.php") in new stack
    -- Launched AGI Script /usr/share/asterisk/agi-bin/LCRDial.php
  ==  LCRDial.php: Failed to execute '/usr/share/asterisk/agi-bin/LCRDial.php': No such file or directory

Most of the posts on using AGI scripts say that the directory for AGI Scripts is

I placed a copy of my script in this location as well as the one that the error
message shows that it is searching in. I thought it might be a permission problem,
but I changed the permissions on the file and all the folders down to the file and
I get the same error. I tried changing the asterisk.conf file so that the asterisk
agi directory is back to the correct location but I still get the same error.

astagidir => /var/lib/asterisk/agi-bin

I'm not sure what I need to do to get the agi script to be recognized and ran.
Can anyone give me some suggestions?