Won't Fix
Details
Assignee
UnassignedUnassignedReporter
Michael BatzMichael BatzHB Grooming Date
Oct 18, 2021Doc Backlog Status
NBDoc Backlog Grooming Date
Aug 18, 2021Components
Affects versions
Priority
Major
Details
Details
Assignee
Unassigned
UnassignedReporter
Michael Batz
Michael BatzHB Grooming Date
Oct 18, 2021
Doc Backlog Status
NB
Doc Backlog Grooming Date
Aug 18, 2021
Components
Affects versions
Priority
PagerDuty
PagerDuty
PagerDuty
Created March 2, 2013 at 1:07 PM
Updated October 19, 2021 at 6:02 PM
Resolved October 19, 2021 at 6:02 PM
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 thepoller-configuration.xml
it needs the parametersip-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.