[asterisk-users] passing commands asterisk cli and getting output using PHP AGI

James Mutuku listmutuku at gmail.com
Thu Sep 3 03:41:40 CDT 2009


I have included that but my scripts goes silent at

AGI Rx << EXEC Flite "Hello 1215, you have dialed 1220."
AGI Tx >> 200 result=0

Below is my script

#!/usr/bin/php -q
     <?php


      set_time_limit(30);
      require('phpagi.php');

      error_reporting(E_ALL);

      $agi = new AGI();
      $asm = $agi->new_AsteriskManager();
      $agi->answer();
      $callext = $agi->get_variable("DNID");
      $callext=$callext['data'];
      $callid = $agi->get_variable("CALLERID(num)");
      $callid=$callid['data'];

      $agi->exec("Flite","\"Hello $callid, you have dialed $callext.\"");

      $asm->command("show hints");

     $agi->exec("flite","\"Goodbye\"");
      $agi->hangup();
   ?>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090903/17bd110e/attachment.htm 


More information about the asterisk-users mailing list