Skip to content

NMS-20114: Remove the Asterisk notification strategy, AGI gateway, and AMI configuration - #8737

Open
marshallmassengill wants to merge 2 commits into
release-36.xfrom
mm/NMS-20114-smoke
Open

NMS-20114: Remove the Asterisk notification strategy, AGI gateway, and AMI configuration#8737
marshallmassengill wants to merge 2 commits into
release-36.xfrom
mm/NMS-20114-smoke

Conversation

@marshallmassengill

Copy link
Copy Markdown
Contributor

Removes Asterisk notification support and the AMI peer configuration that existed only to serve it. SNMP data collection for Asterisk servers is unaffected.

  • AsteriskOriginateNotificationStrategy originated a call over the Asterisk Manager Interface, passing notice details as channel variables.
  • The bundled FastAGI server read those variables back to the answering party from canned Asterisk sound files. It is named in no shipped service-configuration.xml, so nothing started it.
  • asterisk-java 1.0.0-final dates to 2009.
  • AsteriskSIPPeerMonitor sent SipShowPeerAction, the AMI form of sip show peer. That is chan_sip only, deprecated in Asterisk 17 and removed in 21.
  • AmiPeerFactory, ami-config.xml, the org.opennms.netmgt.config.ami model and its XSD had no remaining consumers.
  • etc/datacollection/asterisk.xml and asterisk-graph.properties stay, keyed on sysoid .1.3.6.1.4.1.22736.1.
  • integration-tests/config had been reaching opennms-services transitively through opennms-asterisk; it now declares that dependency directly, which ServiceConfigurationPublicConstructorIT needs to resolve daemon classes.
  • ConfigFileConstants ids 74 and 75 are retired rather than renumbered.

Assisted by Anthropic Claude Opus 5.

External References

AsteriskOriginateNotificationStrategy originated a call over the Asterisk
Manager Interface and passed the notice details as channel variables; the
bundled FastAGI server read them back to the answering party using canned
Asterisk sound files. That gateway is named in no shipped
service-configuration.xml, so nothing started it, and asterisk-java
1.0.0-final dates to 2009.

AsteriskSIPPeerMonitor goes as well. Its SipShowPeerAction is the AMI form
of "sip show peer", which is chan_sip only; Asterisk deprecated that channel
driver in 17 and removed it in 21, so the monitor reports Down regardless of
peer state on current versions.

SNMP data collection for Asterisk servers is untouched:
etc/datacollection/asterisk.xml and asterisk-graph.properties remain, keyed
on sysoid .1.3.6.1.4.1.22736.1.

integration-tests/config reached opennms-services transitively through
opennms-asterisk, which is how ServiceConfigurationPublicConstructorIT
resolved the daemon classes named in service-configuration.xml. It now
declares that dependency directly.

ConfigFileConstants id 74 is retired rather than renumbered, matching the
gaps already in that table.
AmiPeerFactory and ami-config.xml existed only to hand AMI credentials to
AsteriskOriginator and AsteriskSIPPeerMonitor. Both are gone, leaving no
consumers, so the factory, the org.opennms.netmgt.config.ami model, the XSD,
the shipped ami-config.xml, and the config-tester and WillItUnmarshal
coverage for it are removed.

ConfigFileConstants id 75 is retired rather than renumbered, matching the
gaps already in that table.

The fileEditor unit test used ami-config.xml as arbitrary sample data for
its root-level-file case; it now names categories.xml instead.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes legacy Asterisk/AMI-related notification and monitoring support from OpenNMS, including associated configuration models, defaults, build modules, and documentation, while leaving SNMP-based Asterisk data collection intact.

Changes:

  • Removes the opennms-asterisk module and the asterisk-java dependency BOM, along with Asterisk gateway/notification/monitor code.
  • Removes AMI configuration support (ami-config.xml) including config model/XSD, AmiPeerFactory, Spring wiring, and related tests.
  • Updates assemblies, config-tester/integration tests, UI tests, and docs to eliminate Asterisk/AMI references.

Reviewed changes

Copilot reviewed 49 out of 49 changed files in this pull request and generated no comments.

Show a summary per file
File Description
ui/tests/fileEditor.test.ts Updates UI test fixture to avoid removed ami-config.xml.
pom.xml Removes opennms-asterisk module and dependency management entries.
opennms-config/src/test/resources/etc/ami-config.xml Removes AMI config test resource.
opennms-config/src/test/java/org/opennms/netmgt/config/AmiPeerFactoryTest.java Removes tests for deleted AmiPeerFactory.
opennms-config/src/main/resources/META-INF/opennms/component-dao.xml Removes Spring DAO bean for ami-config.xml.
opennms-config/src/main/java/org/opennms/netmgt/config/AmiPeerFactory.java Removes AMI peer factory implementation.
opennms-config-tester/src/test/java/org/opennms/netmgt/config/tester/ConfigTesterTest.java Stops validating ami-config.xml / Asterisk config in config-tester.
opennms-config-tester/src/main/resources/META-INF/opennms/applicationContext-configTester.xml Removes ami-config.xml wiring and Asterisk placeholder bean.
opennms-config-model/src/test/java/org/opennms/netmgt/config/ami/AmiConfigTest.java Removes AMI config model XML/schema tests.
opennms-config-model/src/main/resources/xsds/ami-config.xsd Removes AMI config schema.
opennms-config-model/src/main/java/org/opennms/netmgt/config/ami/Range.java Removes AMI model class.
opennms-config-model/src/main/java/org/opennms/netmgt/config/ami/package-info.java Removes AMI JAXB namespace/package metadata.
opennms-config-model/src/main/java/org/opennms/netmgt/config/ami/Definition.java Removes AMI model class.
opennms-config-model/src/main/java/org/opennms/netmgt/config/ami/AmiConfig.java Removes AMI model class.
opennms-config-model/src/main/java/org/opennms/netmgt/config/ami/AmiAgentConfig.java Removes AMI agent config model class.
opennms-config-model/pom.xml Stops exporting AMI config model packages.
opennms-base-assembly/src/main/filtered/etc/opennms.properties Removes AGI-related system property documentation/comments.
opennms-base-assembly/src/main/filtered/etc/notificationCommands.xml Removes Asterisk call-origination notification commands.
opennms-base-assembly/src/main/filtered/etc/log4j2.xml Removes org.asteriskjava logger and asterisk-gateway prefix.
opennms-base-assembly/src/main/filtered/etc/examples/notificationCommands.xml Removes example Asterisk call notification commands.
opennms-base-assembly/src/main/filtered/etc/asterisk-configuration.properties Removes packaged Asterisk configuration properties file.
opennms-base-assembly/src/main/filtered/etc/ami-config.xml Removes packaged AMI config file.
opennms-base-assembly/pom.xml Removes assembly dependency on opennms-asterisk.
opennms-asterisk/src/main/resources/META-INF/services/org.opennms.netmgt.poller.ServiceMonitor Removes SPI registration for Asterisk monitor.
opennms-asterisk/src/main/resources/META-INF/opennms/applicationContext-asteriskGateway.xml Removes Asterisk gateway Spring context.
opennms-asterisk/src/main/resources/beanRefContext.xml Removes beanRef context for Asterisk gateway.
opennms-asterisk/src/main/java/org/opennms/netmgt/notifd/asterisk/AsteriskOriginateNotificationStrategy.java Removes Asterisk notification strategy implementation.
opennms-asterisk/src/main/java/org/opennms/netmgt/asterisk/utils/AsteriskUtils.java Removes Asterisk property expansion utility.
opennms-asterisk/src/main/java/org/opennms/netmgt/asterisk/utils/AsteriskOriginatorException.java Removes exception type for originate support.
opennms-asterisk/src/main/java/org/opennms/netmgt/asterisk/utils/AsteriskOriginator.java Removes AMI call-origination implementation.
opennms-asterisk/src/main/java/org/opennms/netmgt/asterisk/utils/AsteriskConfig.java Removes Asterisk configuration loader.
opennms-asterisk/src/main/java/org/opennms/netmgt/asterisk/monitor/AsteriskSIPPeerMonitor.java Removes SIP peer AMI-based monitor.
opennms-asterisk/src/main/java/org/opennms/netmgt/asterisk/agi/scripts/ReadNoticeDetailsAgiScript.java Removes AGI script used for notification readout.
opennms-asterisk/src/main/java/org/opennms/netmgt/asterisk/agi/scripts/LouieLouieLyricsAgiScript.java Removes unused/example AGI script.
opennms-asterisk/src/main/java/org/opennms/netmgt/asterisk/agi/scripts/BaseOnmsAgiScript.java Removes AGI base script utilities.
opennms-asterisk/src/main/java/org/opennms/netmgt/asterisk/agi/jmx/AsteriskGatewayMBean.java Removes JMX MBean interface for gateway.
opennms-asterisk/src/main/java/org/opennms/netmgt/asterisk/agi/jmx/AsteriskGateway.java Removes JMX daemon wrapper for gateway.
opennms-asterisk/src/main/java/org/opennms/netmgt/asterisk/agi/AsteriskGateway.java Removes FastAGI server daemon implementation.
opennms-asterisk/src/license/THIRD-PARTY.properties Removes third-party notices for removed module.
opennms-asterisk/pom.xml Removes module POM (module deleted).
integration-tests/config/src/test/java/org/opennms/netmgt/config/WillItUnmarshalIT.java Removes unmarshalling test coverage for ami-config.xml.
integration-tests/config/pom.xml Swaps test dependency from opennms-asterisk to opennms-services.
docs/modules/reference/pages/daemons/introduction.adoc Removes AsteriskGateway daemon documentation entry.
docs/modules/reference/pages/configuration/system-properties.adoc Removes AGI-related system property docs.
docs/modules/operation/pages/deep-dive/notifications/introduction.adoc Removes Asterisk call origination from notification mechanism list.
docs/modules/operation/pages/deep-dive/notifications/commands.adoc Removes Asterisk call commands from notification command documentation.
dependencies/pom.xml Removes dependencies/asterisk module from dependency reactor.
dependencies/asterisk/pom.xml Removes asterisk dependency BOM module.
core/lib/src/main/java/org/opennms/core/utils/ConfigFileConstants.java Retires Asterisk/AMI config file IDs and mappings.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dino2gnt dino2gnt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool by me. +6 -3,851 love it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants