[asterisk-dev] Send SNMP Traps

Olle E. Johansson oej at edvina.net
Wed Jan 16 11:13:42 CST 2013


16 jan 2013 kl. 15:30 skrev Matthew Jordan <mjordan at digium.com>:

> On 01/15/2013 03:21 PM, Meadows Hoa wrote:
>> We would like to use SNMPv3 traps to send logging information to another
>> server. It appears that Asterisk currently does not send SNMPv3 traps.
>> Wondering if it would work to add a function into res_snmp.c that
>> invokes the snmptrap command for invoking net-snmp trap utility to send
>> that trap if the function also passes the necessary parameters?
>> 
>> Any help on sending SNMPv3 Traps from Asterisk would be appreciated.
> 
> SNMPv3 support would certainly be doable but not exactly trivial, if for
> no other reason than adding support for secure communication always ends
> up being non-trivial.
> 
> Asterisk uses the well know net-snmp library, which does support SNMPv3
> (see http://www.net-snmp.org/dev/agent/snmpv3_8h_source.html). As this
> is a separate SNMP engine, res_snmp and it's corresponding units would
> require some reasonable refactoring to support it correctly. You'd want
> to make the engine configurable from res_snmp.conf. The agent_thread
> would have to know which engine to initialize when started, and would
> have to know how to shut it down.
> 
> Without investigating it more, I'm not sure if the existing table
> registration methods are compatible with an SNMPv3 engine. If they are,
> then the code modifications are limited to initialization/termination;
> if not, then the scope expands dramatically.
> 
> In general, this is certainly doable and would be a nice improvement to
> an extended support module, but would require some reasonable
> development effort.

If you just want to send traps from the dialplan on certain events, you
can call the net-snmp trap tool from the dialplan.

If not, on which events do you want to send traps?

/O



More information about the asterisk-dev mailing list