Details
-
Type:
Bug
-
Status: Reopened (View Workflow)
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.10.8
-
Fix Version/s: None
-
Component/s: Polling / Monitors / Outages
-
Security Level: Default (Default Security Scheme)
-
Labels:
Description
The idea is to monitor the connection of SIP clients to an Asterisk server. SIP clients could be for example important phones or a SIP uplink to a provider.
The attached SIPPeerPoller connects to an Asterisk box using the Asterisk Manager Interface (AMI) and executes a sip show peers command and checks the connection state for a given SIP peer. (it has to be configured in Asterisk's sip.conf, that Asterisk monitors the connection to that SIP peer with the option qualify=yes option). If the result from asterisk is "OK (x ms)", then the poller gives back an up message, if not it gives back a down message.
The monitor reads the OpenNMS AMI configuration file (ami-config.xml) to get the data accessing the asterisk box. In the poller-configuration.xml it needs the parameter sip-peer to be set as the sip peer, that should be monitored. Here is an example:
<service name="SIP-Uplink" interval="30000" user-defined="false" status="on"> <parameter key="timeout" value="3000"/> <parameter key="retry" value="2"/> <parameter key="sip-peer" value="uplink" /> </service> <monitor service="SIP-Uplink" class-name="org.opennms.netmgt.poller.monitors.AsteriskSIPPeerMonitor" />
Ronny has done some refactoring for better JUnit testing:
https://gitorious.org/opennms-monitor-extension/opennms-asterisk-sip-peer-monitor
In the attachment, there is also a patched opennms-asterisk.jar file for the OpenNMS/lib directory, if somebody wants to try it.