<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=us-ascii" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
the command <b>asterisk -rx 'pri show spans'</b> on asterisk 1.2
doesn't work, work only on asterisk 1.4 <span class="moz-smiley-s8"><span>
=-O </span></span><br>
<br>
<br>
federico fetto wrote:
<blockquote cite="mid20081119144135.2e31c7a7@nagpur.localdomain"
type="cite">
<pre wrap="">On Wed, 19 Nov 2008 15:17:50 +0200
"Hakan C" <a class="moz-txt-link-rfc2396E" href="mailto:ella4ever@gmail.com"><ella4ever@gmail.com></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">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...";
}
?>
</pre>
</blockquote>
<pre wrap=""><!---->
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 <a class="moz-txt-link-freetext" href="http://www.api-digital.com">http://www.api-digital.com</a> --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
<a class="moz-txt-link-freetext" href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">
</pre>
</body>
</html>