Help with AGI

I am trying to get the pbdirectory AGI script to work and it appears that it is not even being called. So I went to the very basics using agi-test.agi to see if that would work. Still nothing. Here is the debug, dialplan, and agi-bin directory listing.

AGI Debugging Enabled
– Executing [[email protected]:1] ResetCDR(“SIP/1001-093c7ea8”, “”) in new stack
– Executing [[email protected]:2] NoCDR(“SIP/1001-093c7ea8”, “”) in new stack
– Executing [[email protected]:3] Progress(“SIP/1001-093c7ea8”, “”) in new stack
– Executing [[email protected]:4] Wait(“SIP/1001-093c7ea8”, “1”) in new stack
– Executing [[email protected]:5] Progress(“SIP/1001-093c7ea8”, “”) in new stack
– Executing [[email protected]:6] Playback(“SIP/1001-093c7ea8”, “silence/1&cannot-complete-as-dialed&check-number-dial-again|noanswer”) in new stack
– <SIP/1001-093c7ea8> Playing ‘silence/1’ (language ‘en’)
– <SIP/1001-093c7ea8> Playing ‘cannot-complete-as-dialed’ (language ‘en’)
== Spawn extension (from-internal, 300, 6) exited non-zero on ‘SIP/1001-093c7ea8’
– Executing [[email protected]:1] Hangup(“SIP/1001-093c7ea8”, “”) in new stack
== Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/1001-093c7ea8’

from extensions_custom.conf
exten => 300,AGI(agi-test.agi)
exten => 300,Hangup

-rwxrwxr-x 1 asterisk asterisk 1742 Jun 23 2010 agi-test.agi
-rwxrwxr-- 1 asterisk asterisk 1872 May 26 09:30 checksound.agi
-rwxrwxr-- 1 asterisk asterisk 30970 May 26 09:30 dialparties.agi
-rwxrwxr-- 1 asterisk asterisk 13305 May 26 09:30 directory
-rwxrwxr-x 1 asterisk asterisk 91315 Jun 23 2010 eagi-sphinx-test
-rwxrwxr-x 1 asterisk asterisk 118215 Jun 23 2010 eagi-test
-rwxrwxr-- 1 asterisk asterisk 5638 May 26 09:30 enumlookup.agi
-rwxrwxr-- 1 asterisk asterisk 1613 May 26 09:30 fixlocalprefix
-rwxrwxr-x 1 asterisk asterisk 14530 Jun 23 2010 jukebox.agi
-rwxrwxr-- 1 asterisk asterisk 2003 May 26 09:30 list-item-remove.php
-rwxrwxr-- 1 asterisk asterisk 10220 May 26 09:12 pbdirectory
-rwxrw-r-- 1 asterisk asterisk 31772 May 26 09:32 phpagi-asmanager.php
-rwxrw-r-- 1 asterisk asterisk 65908 May 26 09:32 phpagi.php
-rwxrwxr-- 1 asterisk asterisk 3710 May 26 09:30 queue_devstate.agi
-rwxrwxr-- 1 asterisk asterisk 4001 May 26 09:21 recordingcheck
-rwxrwxr-- 1 asterisk asterisk 21117 May 26 09:30 sql.php

I tested the dialplan to make sure it was getting there by substituting the following:
exten => 300,1,Playback(demo-congrats)
exten => 300,2,Hangup()
exten => h,1,Hangup()

This works so my conclusion is that the AGI command is not doing anything.

Help.

I had two issues. One was the obvious screwed up dialplan.

exten => 300,1,AGI(agi-test.agi)
exten => 300,2,Hangup

The other I had to upgrade to the latest API. Once I fixed these all is well.