Hi,
the command  asterisk -rx 'pri show spans' on asterisk 1.2 doesn't work, work only on asterisk 1.4  =-O


federico fetto wrote:
On Wed, 19 Nov 2008 15:17:50 +0200
"Hakan C" <[EMAIL PROTECTED]> wrote:

  
Hey Jon,

You are asking something too specific.
If you want to monitor your PRI, its not so difficult to script.

<?
$checkPRI = exec("asterisk -rx 'pri show spans'");
if (ereg('/^Down/', $checkPRI, $match) {
echo "OMG, someone call the ambulance\r\n";
echo $match;
} else {
echo "working...";
}
?>
    

Or better (imo):
<?
$checkPRI = exec("asterisk -rx 'pri show spans'");
if (ereg('/^Up/', $checkPRI, $match) {
 echo "working...";
 } else {
 echo "OMG, someone call the ambulance\r\n";
 echo $match;
}
?>

Bye
Federico Fetto

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


  


 


_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to