#!/usr/bin/php5
<?
require 'phpagi.php';
ob_implicit_flush(false);
set_time_limit(3000);
$stdin = fopen( 'php://stdin', 'r' );
$stdout = fopen('php://stdout', 'w');

$agi = new AGI();

//faz a ligacao

$agi->exec("Dial SIP/2000");

//outro modo
//fwrite(STDOUT," exec dial SIP/2000\n");
//fflush($stdout);

//desliga
$agi->hangup();
exit();

?>