From e0acf4a68d3cec55028ecca629c9e08cc0f5abe7 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Fri, 7 May 2021 09:53:17 +1000 Subject: [PATCH] Retire Asterisk service As announced in [1], retire the Asterisk PBX service [1] http://lists.opendev.org/pipermail/service-discuss/2021-March/000198.html Change-Id: I527eb3423831c6a155228b6d79428681f60a3273 --- doc/source/asterisk.rst | 31 ---------- doc/source/systems.rst | 1 - hiera/common.yaml | 1 - inventory/base/hosts.yaml | 7 --- manifests/site.pp | 17 ------ .../files/pbx/asterisk/cdr.conf | 3 - .../files/pbx/asterisk/cdr_custom.conf | 3 - .../files/pbx/asterisk/extensions.conf | 47 -------------- .../files/pbx/asterisk/modules.conf | 4 -- modules/openstack_project/manifests/pbx.pp | 61 ------------------- .../templates/pbx/asterisk/sip.conf.erb | 37 ----------- 11 files changed, 212 deletions(-) delete mode 100644 doc/source/asterisk.rst delete mode 100644 modules/openstack_project/files/pbx/asterisk/cdr.conf delete mode 100644 modules/openstack_project/files/pbx/asterisk/cdr_custom.conf delete mode 100644 modules/openstack_project/files/pbx/asterisk/extensions.conf delete mode 100644 modules/openstack_project/files/pbx/asterisk/modules.conf delete mode 100644 modules/openstack_project/manifests/pbx.pp delete mode 100644 modules/openstack_project/templates/pbx/asterisk/sip.conf.erb diff --git a/doc/source/asterisk.rst b/doc/source/asterisk.rst deleted file mode 100644 index 3872cce25e..0000000000 --- a/doc/source/asterisk.rst +++ /dev/null @@ -1,31 +0,0 @@ -:title: Asterisk - -.. _asterisk: - -Asterisk -######## - -A telephony server. - -At a Glance -=========== - -:Hosts: - * sip://pbx.opendev.org -:Puppet: - * https://opendev.org/opendev/puppet-asterisk - * :git_file:`modules/openstack_project/manifests/pbx.pp` -:Projects: - * http://www.asterisk.org -:Documentation: - * https://wiki.openstack.org/wiki/Infrastructure/Conferencing - * http://ofps.oreilly.com/titles/9781449332426/ -:Bugs: - * https://storyboard.openstack.org/#!/project/748 - * http://issues.asterisk.org - -Overview -======== - -This is a Ubuntu Xenial system that runs Asterisk, a telephony server. -It is used as a conferencing server for the OpenStack project. diff --git a/doc/source/systems.rst b/doc/source/systems.rst index a08be32ffd..9083736e98 100644 --- a/doc/source/systems.rst +++ b/doc/source/systems.rst @@ -39,6 +39,5 @@ Major Systems signing github activity - asterisk letsencrypt ppa diff --git a/hiera/common.yaml b/hiera/common.yaml index 79e774eb3a..fdc87d1012 100644 --- a/hiera/common.yaml +++ b/hiera/common.yaml @@ -270,7 +270,6 @@ cacti_hosts: - openstackid01.openstack.org - openstackid.org - paste.openstack.org -- pbx01.opendev.org - puppetmaster.openstack.org - meetpad.opendev.org - mirror01.dfw.rax.opendev.org diff --git a/inventory/base/hosts.yaml b/inventory/base/hosts.yaml index 8a34f3abc5..f0408283ff 100644 --- a/inventory/base/hosts.yaml +++ b/inventory/base/hosts.yaml @@ -618,13 +618,6 @@ all: region_name: DFW public_v4: 23.253.235.223 public_v6: 2001:4800:7817:103:be76:4eff:fe05:176e - pbx01.opendev.org: - ansible_host: 104.239.146.91 - location: - cloud: openstackci-rax - region_name: DFW - public_v4: 104.239.146.91 - public_v6: 2001:4800:7819:104:be76:4eff:fe04:b06f refstack01.openstack.org: ansible_host: 104.239.144.250 location: diff --git a/manifests/site.pp b/manifests/site.pp index a040784308..acf1893958 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -270,23 +270,6 @@ node /^nb\d+\.open.*\.org$/ { } } -# Node-OS: xenial -node /^pbx\d*\.open.*\.org$/ { - $group = "pbx" - class { 'openstack_project::server': } - class { 'openstack_project::pbx': - sip_providers => [ - { - provider => 'voipms', - hostname => 'dallas.voip.ms', - username => hiera('voipms_username', 'username'), - password => hiera('voipms_password'), - outgoing => false, - }, - ], - } -} - # Node-OS: xenial node /^openstackid\d*(\.openstack)?\.org$/ { $group = "openstackid" diff --git a/modules/openstack_project/files/pbx/asterisk/cdr.conf b/modules/openstack_project/files/pbx/asterisk/cdr.conf deleted file mode 100644 index cc3fa0fd28..0000000000 --- a/modules/openstack_project/files/pbx/asterisk/cdr.conf +++ /dev/null @@ -1,3 +0,0 @@ -[general](+) - -enable=yes diff --git a/modules/openstack_project/files/pbx/asterisk/cdr_custom.conf b/modules/openstack_project/files/pbx/asterisk/cdr_custom.conf deleted file mode 100644 index d4234613bc..0000000000 --- a/modules/openstack_project/files/pbx/asterisk/cdr_custom.conf +++ /dev/null @@ -1,3 +0,0 @@ -[mappings](+) - -Master.csv => ${CSV_QUOTE(${CDR(clid)})},${CSV_QUOTE(${CDR(src)})},${CSV_QUOTE(${CDR(dst)})},${CSV_QUOTE(${CDR(dcontext)})},${CSV_QUOTE(${CDR(channel)})},${CSV_QUOTE(${CDR(dstchannel)})},${CSV_QUOTE(${CDR(lastapp)})},${CSV_QUOTE(${CDR(lastdata)})},${CSV_QUOTE(${CDR(start)})},${CSV_QUOTE(${CDR(answer)})},${CSV_QUOTE(${CDR(end)})},${CSV_QUOTE(${CDR(duration)})},${CSV_QUOTE(${CDR(billsec)})},${CSV_QUOTE(${CDR(disposition)})},${CSV_QUOTE(${CDR(amaflags)})},${CSV_QUOTE(${CDR(accountcode)})},${CSV_QUOTE(${CDR(uniqueid)})},${CSV_QUOTE(${CDR(userfield)})},${CDR(sequence)} diff --git a/modules/openstack_project/files/pbx/asterisk/extensions.conf b/modules/openstack_project/files/pbx/asterisk/extensions.conf deleted file mode 100644 index 60ca172a90..0000000000 --- a/modules/openstack_project/files/pbx/asterisk/extensions.conf +++ /dev/null @@ -1,47 +0,0 @@ -; extensions.conf customizations for pbx.openstack.org - -[public] - -exten => s,1,Answer() - same => n,Playback(silence/1) - same => n,Set(RETRIES=3) - same => n,Set(COUNT=0) - same => n,While($[${COUNT} < ${RETRIES}]) - same => n,Read(CONFNUM,conf-getconfno) - same => n,Verbose(3,${CHANNEL(name)} entered conference number: ${CONFNUM}) - same => n,GotoIf(${DIALPLAN_EXISTS(public,${CONFNUM},1)}?${CONFNUM},1) - same => n,Set(COUNT=$[${COUNT} + 1]) - same => n,ExecIf($[${COUNT} < ${RETRIES}]?Playback(conf-invalid)) - same => n,EndWhile() - same => n,Playback(vm-goodbye) - same => n,Hangup() - -; Default setup for a Conference bridge. -; Conferences are 6000 - 7999 -exten => _[67]XXX,1,Answer() - same => n,Playback(silence/1) - same => n,ConfBridge(${EXTEN},,,sample_user_menu) - same => n,Hangup() - -; Echo test -exten => 5000,1,Answer() - same => n,Playback(silence/1) - same => n,Playback(demo-echotest) - same => n,Echo() - same => n,Playback(demo-echodone) - same => n,Hangup() - -; Easter egg -- spam on the keypad. -exten => 7726,1,Answer() - same => n,Playback(silence/1) - same => n,Playback(spam) - same => n,Hangup() - -; All other extensions go to s,1 -exten => _X.,1,Goto(s,1) - -; Let someone call in to sip:conference@pbx.openstack.org -exten => conference,1,Goto(s,1) - -; Let someone call in to sip:echo@pbx.openstack.org -exten => echo,1,Goto(5000,1) diff --git a/modules/openstack_project/files/pbx/asterisk/modules.conf b/modules/openstack_project/files/pbx/asterisk/modules.conf deleted file mode 100644 index 28584b83e0..0000000000 --- a/modules/openstack_project/files/pbx/asterisk/modules.conf +++ /dev/null @@ -1,4 +0,0 @@ -[modules](+) -; Application modules -load => app_confbridge.so -load => chan_bridge.so diff --git a/modules/openstack_project/manifests/pbx.pp b/modules/openstack_project/manifests/pbx.pp deleted file mode 100644 index f9a220646e..0000000000 --- a/modules/openstack_project/manifests/pbx.pp +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright 2013 Red Hat, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -# Class to configure asterisk on a CentOS node. -# -# == Class: openstack_project::pbx -class openstack_project::pbx ( - $sip_providers = [], -) { - - class { 'asterisk': - modules_conf_source => 'puppet:///modules/openstack_project/pbx/asterisk/modules.conf', - } - - file {'/etc/asterisk/sip.conf.d/sip.conf': - ensure => present, - owner => 'asterisk', - group => 'asterisk', - mode => '0660', - content => template('openstack_project/pbx/asterisk/sip.conf.erb'), - require => File['/etc/asterisk/'], - } - - file {'/etc/asterisk/extensions.conf.d/extensions.conf': - ensure => present, - owner => 'asterisk', - group => 'asterisk', - mode => '0660', - source => 'puppet:///modules/openstack_project/pbx/asterisk/extensions.conf', - require => File['/etc/asterisk/'], - } - - file {'/etc/asterisk/cdr.conf.d/cdr.conf': - ensure => present, - owner => 'asterisk', - group => 'asterisk', - mode => '0660', - source => 'puppet:///modules/openstack_project/pbx/asterisk/cdr.conf', - require => File['/etc/asterisk/'], - } - - file {'/etc/asterisk/cdr_custom.conf.d/cdr_custom.conf': - ensure => present, - owner => 'asterisk', - group => 'asterisk', - mode => '0660', - source => 'puppet:///modules/openstack_project/pbx/asterisk/cdr_custom.conf', - require => File['/etc/asterisk/'], - } -} diff --git a/modules/openstack_project/templates/pbx/asterisk/sip.conf.erb b/modules/openstack_project/templates/pbx/asterisk/sip.conf.erb deleted file mode 100644 index e212129fcc..0000000000 --- a/modules/openstack_project/templates/pbx/asterisk/sip.conf.erb +++ /dev/null @@ -1,37 +0,0 @@ -; sip.conf customizations for pbx.openstack.org - -[general](+) -udpbindaddr=:: -tcpenable=yes -tcpbindaddr=:: -context=public -allowguest=yes -disallow=all -allow=g722 -allow=ulaw -allow=alaw -allow=gsm -nat=force_rport,comedia -<% @sip_providers.each do |provider| -%> -register => <%= provider['username'] %>:<%= provider['password'] %>@<%= provider['hostname'] %>:5060 -<% end -%> - - -<% @sip_providers.each do |provider| -%> -<% if provider['outgoing'] == true -%> -[<%= provider['username'] %>] -context=public -host=<%= provider['hostname'] %> -secret=<%= provider['password'] %> -type=peer -defaultuser=<%= provider['username'] %> -fromuser=<%= provider['username'] %> -trustrpid=yes -sendrpid=yes -<% end -%> -<% end -%> - -[openstack] -type=user -secret=openstack -context=public