<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hello,<br>
    <br>
    you can use SNMP Asterisk integration to monitoring&nbsp; the actives
    calls (Total calls, SIP calls, IAX2 calls, DAHDI calls)<br>
    <br>
    Regards<br>
    <br>
    <br>
    <div class="moz-cite-prefix">El 16/02/2013 08:04, Farooq Hussain
      escribi&oacute;:<br>
    </div>
    <blockquote
cite="mid:CALjExg9CjTW4rvbA79igCdhBe476Wa8BbCgPAC5ebjeva894vA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>Hello Everyone,<br>
            <br>
          </div>
          I have write a script following script for nagios </div>
        <br clear="all">
        <div>
          <div>
            <div><br>
              -- typeset -i CRITICAL;<br>
              <br>
              #Positional parameter<br>
              CRITICAL=`echo $2`;<br>
              ME=`basename $0`;<br>
              #echo $CRITICAL<br>
              <br>
              if [[ "$2" == "" ]]<br>
              then<br>
              echo NO INPUT!!! Usage ./$ME -c N<br>
              else<br>
              typeset -i ASCALLS;<br>
              ASCALLS=`asterisk -rx "core show channels" | grep active |
              grep call | awk '{print $1}'`<br>
              #echo $ASCALLS;<br>
              #mload=`echo "$ASCALLS" | $BC`;<br>
              #echo $((num+1))<br>
              <br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if [[ "$ASCALLS" -lt "$CRITICAL" ]]<br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; then<br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo OK!!! Total Active Calls:$ASCALLS;<br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit 0<br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else<br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo CRITICAL!!! Total Active Calls:$ASCALLS;<br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit 2<br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fi<br>
              fi<br>
              Thanks<br>
              <br>
              <br>
            </div>
            <div>But following in not return int value <br>
              <br>
              `asterisk -rx "core show channels" | grep active | grep
              call | awk '{print $1}'`<br>
              <br>
            </div>
            <div>Please let me know if anyone help me in regard<br>
            </div>
            <div><br>
              Farooq Hussain
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by <a class="moz-txt-link-freetext" href="http://www.api-digital.com">http://www.api-digital.com</a> --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               <a class="moz-txt-link-freetext" href="http://www.asterisk.org/hello">http://www.asterisk.org/hello</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>
  </body>
</html>