[asterisk-dev] Asterisk Monitor MIB
Jeff Gehlbach
jeffg at jeffg.org
Wed Mar 19 13:58:37 CDT 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Mar 19, 2008, at 1:55 PM, Michael Henderson wrote:
> I have been able to make a C program that uses the AMI to connect
> and issue commands to get the result and show it to the user. Now I
> want to use MIB to do so.
You mean "use SNMP"? A MIB is something that an SNMP agent
implements. Asterisk 1.4 and later has a built-in SNMP (sub)agent in
the form of res_snmp.
> I have created the MIB file. When I call the ASTERsip object I want
> it to show the number of connected users in SIP network and their
> details should be in table format and the data should be more about
> their addresses, where-from they are connecting and where-to. What
> is the corresponding c code for it to work in this manner?
You could approach this one of two ways. You could enhance res_snmp
to implement the MIB that you have designed, or you could create
essentially a proxy that back-ends SNMP requests to AMI. You could do
this latter method in C using the net-snmp libraries, in Perl using
Net::SNMP, in Java using SNMP4J-Agent...
Have you developed an SNMP agent before? I'm currently working on
some enhancements to res_snmp (in line with the first suggestion
above) and would be interested to see the MIB that you have created.
If it is generally useful, we could adapt it as a branch off of the
existing Asterisk MIB.
> Moreover I take the IP address, username and secret from the user in
> runtime in my C code but how can I do so using the MIB. Please help
> me regarding this.
I don't understand this last question. Can you clarify please?
- -jeff
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
iEYEARECAAYFAkfhYl0ACgkQB3953+hexDpV4gCeJQ3Y2Q2f3PjqfmCapY2LqHzd
6vwAn1z331QeRreGLLk7iY1kEKHIkFKq
=tZS2
-----END PGP SIGNATURE-----
More information about the asterisk-dev
mailing list