#!/usr/bin/php -q
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4: */

//-- Goto http://eder.us/projects/phpagi/ for PHPAGI api info

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

//-- setup AGI object
$o_agi = new AGI();
$o_agi->answer();

// get company name
$a_temp = $o_agi->get_variable('PRIORITY');
if ($a_temp[result] == 0)
{
    $b_error = true;
    $o_agi->conlog('ERROR: PRIORITY is not defined');
    return;
}
elseif ($a_temp[result] == 1)
{
    $i_priority = $a_temp[data];
    $o_agi->conlog("priority is _${i_priority}_");
}

?>
