3 Replies Latest reply on Mar 8, 2012 3:18 PM by DanielleH

    Counting SIP calls in progress on Cisco CUBE

    Wyseman

      Hi,

      I'm trying to create a graph of SIP calls in progress on a router with CUBE.

      I've found that there is a list of Call ID's on 1.3.6.1.4.1.9.9.63.1.3.2.1.1 (http://tools.cisco.com/Support/SNMP/do/BrowseOID.do?objectInput=1.3.6.1.4.1.9.9.63.1.3.2.1.1&translate=Translate)

      The Call ID's listed in the returned list are 2 per call, 1 for the internal leg, and one for the outward to the SIP provider.

      I've written a small shell script to get this value in MRTG / Cacti etc, however i'm not able to figure out how to do the same thing in Solarwinds.

      #/bin/bash

      router_count=`snmpwalk -c $2 -v2c $1 1.3.6.1.4.1.9.9.63.1.3.2.1.1 |wc -l`

      trunk_count=`echo "$router_count"/2 |bc`

      echo $trunk_count

      Script takes 2 parameters, the IP address of the router, and the SNMP community string.  It gets a count of call ID's and devides by 2, giving trunks in use.

      Is there any way to achieve the same thing?  I have experimented with Transforms in the Universal device poller, however there appears to be no function to "Count" returned entries.

      Any help appreciated :)

       

      /James

        • Re: Counting SIP calls in progress on Cisco CUBE

          Wyseman--

          If you don't hear back from the community soon, check out the SW Knowledgebase for more information.

          If that doesn't help, open a support ticket. When you open a support ticket, would you:

          --Reference this thread to Support.
          --Post back here with a case number.
          --Post any solutions you get from Support.


          Many thx,

          M

          • Re: Counting SIP calls in progress on Cisco CUBE
            Wyseman

            I finally had the need to get this working and have achieved it with the following:

            You will require:

            A shell script in /usr/local/scripts/ with the following contents:

            #/bin/bash

            router_count=`snmpwalk -c $2 -v2c $1 1.3.6.1.4.1.9.9.63.1.3.2.1.1 |wc -l`

            trunk_count=`echo "$router_count"/2 |bc`

            echo $trunk_count

             

             

            A linux box, or other box with net-snmp, working with appropriate SNMP queryability (is that a word?)

             

             in /etc/snmp/snmpd.conf

             

            # the following line goes just under the other view systemview lines already in the file.

            view    systemview    included   .1.3.6.1.4

             

            # The following lines go near the exec examples at the end of the box.

            exec brisbane /bin/sh /usr/local/scripts/countcube.sh 10.1.0.1 public

            exec darwin /bin/sh /usr/local/scripts/countcube.sh 10.2.0.1 public

            exec london /bin/sh /usr/local/scripts/countcube.sh 10.3.0.1 public

             

            After this is all set up, you should be able to add the following pollers on solar winds, pointing at the net-snmp box.

            1.3.6.1.4.1.2021.8.1.101.1

            1.3.6.1.4.1.2021.8.1.101.2

            1.3.6.1.4.1.2021.8.1.101.3

            where the last number is the number of the exec line above.. 

            e.g.

            brisbane = 1

            darwin = 2

            etc

            This gives you a graph friendly count of sip trunks.  The only issue i have seen is where a call is signalling but not established, the shell script can return .5 of a call (only 1 of the 2 call legs exists)  I'm sure i can fix this with some kind of flag to the |bc in the shell script, something for the future.

            I know it's not perfect as you still need a separate Linux box, but it gives the results I wanted.
            Comments / Suggestions for improvement welcomed!
            /James