AGI Script completed returning -1

Hi,

I’m running a few PHP scripts in dialplan of my Asterisk 1.6.2.16.1. Some of them connect to SQL, some not, but the common thing is that sometimes (less than 0,1%, but still) they fail, returning -1. What does -1 status mean for a PHP script, is it somehow possible to track what exactly happens?