Get information about a sip peer
<?php
require_once('../phpagi-asmanager.php');
if(!isset($_SERVER['argv'][1]))
{
echo "Usage:\t{$_SERVER['_']} {$_SERVER['argv'][0]} peer\n\n";
exit;
}
if($asm->connect())
{
$peer = $asm->command("sip show peer {$_SERVER['argv'][1]}");
if(!strpos($peer['data'], ':'))
echo $peer['data'];
else
{
$data = array();
foreach(explode("\n", $peer['data']) as $line)
{
$a =
strpos('z'.
$line, ':') -
1;
}
}
$asm->disconnect();
}
?>
Documentation generated on Thu, 30 Sep 2010 02:22:07 -0700 by phpDocumentor 1.4.2