Hi,

I am trying to use the WAIT FOR DIGIT command with the phpagi class phpagi.php. When I 
run the file testing_phpagi.php which creates an instace of the  phpagi class and 
calls the agi cmd, from command line,  it runs fine without any parse errors. I can 
also iterate thru the VERBOSE, WAIT FOR DIGIT etc commands as I run the 
testing_phpagi.php file from the command line. However, when I dial the extension, the 
agi exits without waiting for the digit. Below are the lines copied from the Asterisk 
console:

    -- Executing AGI("SIP/1000-586b", "testing_phpagi") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/testing_phpagi
    -- AGI Script testing_phpagi completed, returning 0
==========================
Lines of code from testing_phpagi.php:
--------------------------------------
#!/usr/bin/php -q
<?
require 'phpagi.php';
                                                                               
global $agi;
global $response;
                                                                               
$agi = new AGI();
                                                                               
$response = $agi->agi_getdtmf(10,3000)
//$agi->conlog("Got response: $response");
                                                                               
?>
=============================
My extensions.conf:
;test sample php agi
exten => 2000,1,agi,testing_phpagi

===============================
The phpagi.php file is unaltered.

Can anyone kindly suggest what/where I am missing a step?

Thanks in advance,
_______________________________________________
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to