Monday, July 12, 2010

Programming with Asterisk Elastic in Linux ^_^

#!/usr/bin/php -q
set_time_limit(30);
require('include/phpagi.php');
error_reporting(E_ALL);
$agi = new AGI();
$agi->answer();
$agi->stream_file("congrats you are connected to the VOIP line","#");
do
{
$agi->stream_file("enter-digits-call-number","#");
$result = $agi->get_data('beep', 3000, 20);
$keys = $result['result'];
$agi->stream_file("you entered nubmer:","#");
$agi->say_digits($keys);
} while($keys != '111');
$agi->hangup();
?>

No comments:

Post a Comment