Remove Support for osmo-nitb
This commit is contained in:
parent
fe03832b59
commit
1cd5263e40
14 changed files with 11 additions and 968 deletions
|
@ -41,25 +41,10 @@ for bts in "${!BTS[@]}" ; do
|
|||
ssh $SSH_OPTS root@${BTS[$bts]} "PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin opkg remove libosmoabis6 libosmogsm13 libosmovty3 libosmovty4"
|
||||
fi
|
||||
|
||||
#if [ "$(ssh $SSH_OPTS ${BTS[$bts]} 'ls /usr/bin/osmo-bts-sysmo-nitb 2> /dev/null; echo $?')" == "2" ] ; then
|
||||
if [ "$OSMO_STACK" == "nitb" ] ; then
|
||||
ssh $SSH_OPTS root@${BTS[$bts]} "systemctl stop osmo-bts"
|
||||
gunzip -c osmo-bts-sysmo-arm-cf7a.gz > osmo-bts-sysmo-nitb
|
||||
scp $SSH_OPTS osmo-bts-sysmo-nitb root@${BTS[$bts]}:/usr/bin/
|
||||
ssh $SSH_OPTS root@${BTS[$bts]} "chmod 755 /usr/bin/osmo-bts-sysmo-nitb"
|
||||
ssh $SSH_OPTS root@${BTS[$bts]} "cd /usr/bin; mv osmo-bts-sysmo osmo-bts-sysmo.opkg ; ln -s osmo-bts-sysmo-nitb osmo-bts-sysmo; systemctl start osmo-bts"
|
||||
fi
|
||||
#if [ "$(ssh $SSH_OPTS ${BTS[$bts]} 'ls /usr/bin/osmo-pcu-nitb 2> /dev/null; echo $?')" == "2" ] ; then
|
||||
#ssh $SSH_OPTS root@${BTS[$bts]} "systemctl stop osmo-pcu"
|
||||
#gunzip -c osmo-pcu-arm-54211.gz > osmo-pcu-nitb
|
||||
#scp $SSH_OPTS osmo-pcu-nitb root@${BTS[$bts]}:/usr/bin/
|
||||
#ssh $SSH_OPTS root@${BTS[$bts]} "chmod 755 /usr/bin/osmo-pcu-nitb"
|
||||
#ssh $SSH_OPTS root@${BTS[$bts]} "cd /usr/bin; mv osmo-pcu osmo-pcu.opkg ; ln -s osmo-pcu-nitb osmo-pcu; systemctl start osmo-pcu"
|
||||
#fi
|
||||
|
||||
done
|
||||
|
||||
if [ "$OLDPWD" != "" ]; then
|
||||
cd $OLDPWD
|
||||
fi
|
||||
|
Binary file not shown.
Binary file not shown.
|
@ -163,13 +163,6 @@ class rhizo_base::freeswitch::common {
|
|||
require => Package['freeswitch']
|
||||
}
|
||||
|
||||
unless ($rhizo_base::osmo_stack == "split") {
|
||||
file { '/usr/lib/libfreeswitch.so.1.0.0':
|
||||
source => "puppet:///modules/rhizo_base/usr/lib/libfreeswitch_dyn-98-${fs_lib_version}-${lsbdistcodename}.so",
|
||||
require => Package['freeswitch'],
|
||||
}
|
||||
}
|
||||
|
||||
file { '/etc/freeswitch':
|
||||
ensure => directory,
|
||||
source => 'puppet:///modules/rhizo_base/etc/freeswitch',
|
||||
|
|
|
@ -38,20 +38,11 @@ class rhizo_base {
|
|||
$postcode = hiera('rhizo::postcode')
|
||||
$pbxcode = hiera('rhizo::pbxcode')
|
||||
|
||||
# Network Stack
|
||||
$osmo_stack = hiera('rhizo::osmo_stack', 'nitb')
|
||||
$hlr_db = $osmo_stack ? {
|
||||
'split' => '/var/lib/osmocom/hlr.db',
|
||||
default => hiera('rhizo::hlr_db', '/var/lib/osmocom/hlr.db'),
|
||||
}
|
||||
$sms_db = $osmo_stack ? {
|
||||
'split' => hiera('rhizo::sms_db', '/var/lib/osmocom/sms.db'),
|
||||
default => hiera('rhizo::sms_db', '/var/lib/osmocom/hlr.sqlite3'),
|
||||
}
|
||||
$hlr_db = '/var/lib/osmocom/hlr.db'
|
||||
$sms_db = '/var/lib/osmocom/sms.db'
|
||||
|
||||
# network name
|
||||
$network_name = hiera('rhizo::network_name')
|
||||
$auth_policy = hiera('rhizo::auth_policy')
|
||||
$gprs = hiera('rhizo::gprs', 'egprs')
|
||||
$mcc = hiera('rhizo::mcc', '334')
|
||||
$mnc = hiera('rhizo::mnc', '07')
|
||||
|
@ -70,10 +61,8 @@ class rhizo_base {
|
|||
$upstream_codec = hiera('rhizo::upstream_codec', 'G729')
|
||||
$dids = hiera('rhizo::dids', '')
|
||||
|
||||
$lcls = $osmo_stack ? {
|
||||
'split' => '0',
|
||||
default => hiera('rhizo::lcls', '0')
|
||||
}
|
||||
$lcls = hiera('rhizo::lcls', '0')
|
||||
|
||||
$jb_in = hiera('rhizo::jb_in', '')
|
||||
$jb_out = hiera('rhizo::jb_out', '')
|
||||
$jb_bts = hiera('rhizo::jb_bts', '100')
|
||||
|
@ -197,14 +186,7 @@ class rhizo_base {
|
|||
include rhizo_base::postgresql
|
||||
include rhizo_base::freeswitch
|
||||
include rhizo_base::runit
|
||||
unless $osmo_stack == "split" {
|
||||
include rhizo_base::openbsc
|
||||
$use_nitb_osmo_stack = 'True'
|
||||
}
|
||||
if $osmo_stack == "split" {
|
||||
include rhizo_base::osmocom
|
||||
$use_nitb_osmo_stack = 'False'
|
||||
}
|
||||
include rhizo_base::osmocom
|
||||
include rhizo_base::sudo
|
||||
include rhizo_base::kiwi
|
||||
|
||||
|
|
|
@ -1,193 +0,0 @@
|
|||
# Class: rhizo_base::openbsc
|
||||
#
|
||||
# This module manages the OpenBSC system
|
||||
#
|
||||
# Parameters: none
|
||||
#
|
||||
# Actions:
|
||||
#
|
||||
# Requires: see Modulefile
|
||||
#
|
||||
# Sample Usage:
|
||||
#
|
||||
class rhizo_base::openbsc {
|
||||
|
||||
include systemd
|
||||
|
||||
$network_name = $rhizo_base::network_name
|
||||
$auth_policy = $rhizo_base::auth_policy
|
||||
$lac = $rhizo_base::lac
|
||||
$ms_max_power = $rhizo_base::ms_max_power
|
||||
$max_power_red = $rhizo_base::max_power_red
|
||||
$gsm_band = $rhizo_base::gsm_band
|
||||
$mcc = $rhizo_base::mcc
|
||||
$mnc = $rhizo_base::mnc
|
||||
$smsc_password = $rhizo_base::smsc_password
|
||||
$smpp_password = $rhizo_base::smpp_password
|
||||
$mncc_codec = $rhizo_base::mncc_codec
|
||||
$gprs = $rhizo_base::gprs
|
||||
$mncc_ip_address = $rhizo_base::mncc_ip_address
|
||||
$vpn_ip_address = hiera('rhizo::vpn_ip_address')
|
||||
$sgsn_ip_address = hiera('rhizo::sgsn_ip_address')
|
||||
$ggsn_ip_address = hiera('rhizo::ggsn_ip_address')
|
||||
$repo = hiera('rhizo::osmo_repo', 'latest')
|
||||
$bts = hiera('rhizo::bts')
|
||||
$pgsql_pwd = $rhizo_base::pgsql_pwd
|
||||
|
||||
$nitb_version = $repo ? {
|
||||
'latest' => 'present',
|
||||
'nightly' => 'present',
|
||||
default => 'present',
|
||||
}
|
||||
|
||||
package { [ 'osmocom-nitb' ]:
|
||||
ensure => $nitb_version,
|
||||
require => Class['rhizo_base::apt'],
|
||||
notify => [ Exec['hlr_pragma_wal'],
|
||||
Exec['notify-nitb'] ],
|
||||
}
|
||||
|
||||
package { [ 'osmo-sip-connector' ]:
|
||||
ensure => '1.3.0-0rhizo1',
|
||||
require => Class['rhizo_base::apt'],
|
||||
}
|
||||
|
||||
$utils_version = $repo ? {
|
||||
'latest' => 'installed',
|
||||
'nightly' => 'latest',
|
||||
default => '1.7.2',
|
||||
}
|
||||
|
||||
package { [ 'osmo-bsc-meas-utils' ]:
|
||||
ensure => $utils_version,
|
||||
}
|
||||
|
||||
package { [ 'libosmocore-utils' ]:
|
||||
ensure => 'installed',
|
||||
}
|
||||
|
||||
if $mncc_codec == "AMR" {
|
||||
$phys_chan = "TCH/H"
|
||||
} else {
|
||||
$phys_chan = "TCH/F"
|
||||
}
|
||||
|
||||
service { 'osmocom-nitb':
|
||||
enable => false,
|
||||
ensure => 'stopped',
|
||||
require => Package['osmocom-nitb'],
|
||||
}
|
||||
|
||||
service { 'osmo-nitb':
|
||||
enable => false,
|
||||
ensure => 'stopped',
|
||||
require => Package['osmocom-nitb'],
|
||||
}
|
||||
|
||||
service { 'osmo-sip-connector':
|
||||
enable => false,
|
||||
ensure => stopped,
|
||||
require => Package['osmo-sip-connector'],
|
||||
}
|
||||
|
||||
service { 'osmo-sgsn':
|
||||
enable => true,
|
||||
ensure => running,
|
||||
require => Package['osmo-sgsn'],
|
||||
}
|
||||
|
||||
file { '/usr/local/bin/vty':
|
||||
source => 'puppet:///modules/rhizo_base/vty',
|
||||
owner => 'root',
|
||||
mode => '0755',
|
||||
}
|
||||
|
||||
file { '/etc/default/osmocom-nitb':
|
||||
source => 'puppet:///modules/rhizo_base/etc/default/osmocom-nitb',
|
||||
require => Package['osmocom-nitb'],
|
||||
}
|
||||
|
||||
unless hiera('rhizo::local_bsc_cfg') == "1" {
|
||||
file { '/etc/osmocom/osmo-nitb.cfg':
|
||||
content => template(
|
||||
'rhizo_base/osmo-nitb-head.erb',
|
||||
'rhizo_base/osmo-nitb-bts.erb',
|
||||
'rhizo_base/osmo-nitb-tail.erb'),
|
||||
require => Package['osmocom-nitb'],
|
||||
notify => Exec['notify-nitb'],
|
||||
}
|
||||
}
|
||||
|
||||
file { '/etc/osmocom/osmo-sip-connector.cfg':
|
||||
content => template('rhizo_base/osmo-sip-connector.cfg.erb'),
|
||||
require => Package['osmo-sip-connector'],
|
||||
}
|
||||
|
||||
file { '/etc/osmocom/make_sgsn_acl_config':
|
||||
content => template('rhizo_base/make_sgsn_acl_config.erb'),
|
||||
mode => "0750",
|
||||
notify => Exec['osmo-sgsn.cfg']
|
||||
}
|
||||
|
||||
systemd::dropin_file { 'override.conf':
|
||||
unit => 'osmo-sgsn.service',
|
||||
source => 'puppet:///modules/rhizo_base/systemd/coredump.override'
|
||||
}
|
||||
|
||||
$sgsn_version = $repo ? {
|
||||
'latest' => 'latest',
|
||||
'nightly' => 'latest',
|
||||
default => 'installed',
|
||||
}
|
||||
|
||||
package { [ 'osmo-sgsn' ]:
|
||||
ensure => $sgsn_version,
|
||||
require => Class['rhizo_base::apt'],
|
||||
}
|
||||
|
||||
$libgtp_version = $repo ? {
|
||||
'latest' => 'installed',
|
||||
'nightly' => 'latest',
|
||||
default => '1.8.0',
|
||||
}
|
||||
|
||||
package { [ 'libgtp6' ]:
|
||||
ensure => $libgtp_version,
|
||||
require => Class['rhizo_base::apt'],
|
||||
}
|
||||
|
||||
package { [ 'libosmo-gsup-client0' ]:
|
||||
ensure => 'latest',
|
||||
require => Class['rhizo_base::apt'],
|
||||
}
|
||||
package { [ 'libosmocore' ]:
|
||||
ensure => 'latest',
|
||||
require => Class['rhizo_base::apt'],
|
||||
}
|
||||
|
||||
exec { 'osmo-sgsn.cfg':
|
||||
command =>
|
||||
'/etc/osmocom/make_sgsn_acl_config > /etc/osmocom/osmo-sgsn.cfg',
|
||||
require => File['/etc/osmocom/make_sgsn_acl_config'],
|
||||
refreshonly => true,
|
||||
}
|
||||
|
||||
exec { 'hlr_pragma_wal':
|
||||
command =>
|
||||
'/usr/bin/sqlite3 /var/lib/osmocom/hlr.sqlite3 "PRAGMA journal_mode=wal;"',
|
||||
require => Class['rhizo_base::packages'],
|
||||
refreshonly => true,
|
||||
}
|
||||
|
||||
exec { 'notify-nitb':
|
||||
command => '/bin/echo 1 > /tmp/OSMO-dirty',
|
||||
refreshonly => true,
|
||||
}
|
||||
|
||||
exec { 'restart-nitb':
|
||||
command => '/usr/bin/sv restart osmo-nitb',
|
||||
require => Class['rhizo_base::packages'],
|
||||
refreshonly => true,
|
||||
}
|
||||
|
||||
}
|
|
@ -12,8 +12,6 @@
|
|||
#
|
||||
class rhizo_base::runit {
|
||||
|
||||
$osmo_stack = $rhizo_base::osmo_stack
|
||||
|
||||
file { '/lib/systemd/system/runit.service':
|
||||
ensure => present,
|
||||
source => 'puppet:///modules/rhizo_base/systemd/runit.service',
|
||||
|
@ -56,25 +54,8 @@ class rhizo_base::runit {
|
|||
require => [ File['/etc/sv'] ],
|
||||
}
|
||||
|
||||
$_runit_svc = $osmo_stack ? {
|
||||
'split' => absent,
|
||||
'nitb' => link
|
||||
}
|
||||
|
||||
$_req = $osmo_stack ? {
|
||||
'split' => File['/etc/sv'],
|
||||
'nitb' => [ File['/etc/sv'], Class['rhizo_base::openbsc'] ],
|
||||
default => [ File['/etc/sv'], Class['rhizo_base::openbsc'] ],
|
||||
}
|
||||
|
||||
file { '/etc/service/osmo-nitb':
|
||||
ensure => $_runit_svc,
|
||||
target => '/etc/sv/osmo-nitb',
|
||||
require => $_req,
|
||||
}
|
||||
|
||||
file { '/etc/service/osmo-sip-connector':
|
||||
ensure => $_runit_svc,
|
||||
ensure => absent,
|
||||
target => '/etc/sv/osmo-sip-connector',
|
||||
require => [ File['/etc/sv'] ],
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Configuration settings
|
||||
use_nitb_osmo_stack = <%= @use_nitb_osmo_stack %>
|
||||
use_nitb_osmo_stack = False
|
||||
reload_on_call = 0
|
||||
default_log_level = '<%= @default_log_level %>'
|
||||
lcls = <%= @lcls %>
|
||||
|
|
|
@ -1,46 +0,0 @@
|
|||
#!/bin/bash
|
||||
_auth=`psql postgresql://rhizomatica:<%= @pgsql_pwd %>@localhost:5432/rhizomatica -t -c "SELECT msisdn from subscribers where subscription_status=1" | grep . | sed -n '1h;1!H;${g;s/\n/,/g;p;}'`
|
||||
cat << EOF
|
||||
!
|
||||
! Osmocom SGSN configuration
|
||||
!
|
||||
!
|
||||
log stderr
|
||||
logging level set-all fatal
|
||||
logging print category 1
|
||||
logging print file basename last
|
||||
logging print level 1
|
||||
logging print extended-timestamp 1
|
||||
logging level gprs error
|
||||
logging level mm error
|
||||
logging level llc error
|
||||
line vty
|
||||
no login
|
||||
!
|
||||
sgsn
|
||||
gtp local-ip <%= @vpn_ip_address %>
|
||||
ggsn 0 remote-ip <%= @ggsn_ip_address %>
|
||||
ggsn 0 gtp-version 1
|
||||
ggsn 0 echo-interval 60
|
||||
auth-policy acl-only
|
||||
EOF
|
||||
echo "SELECT imsi from subscriber where extension in ($_auth) ORDER BY imsi;" | sudo /usr/bin/sqlite3 /var/lib/osmocom/hlr.sqlite3 | grep "^[0-9].*" | sed 's/\(.*\)/ imsi-acl add \1/'
|
||||
cat << EOF
|
||||
!gsup remote-ip <%= @vpn_ip_address %>
|
||||
!gsup remote-port 4222
|
||||
!
|
||||
ns
|
||||
timer tns-block 3
|
||||
timer tns-block-retries 3
|
||||
timer tns-reset 3
|
||||
timer tns-reset-retries 3
|
||||
timer tns-test 30
|
||||
timer tns-alive 3
|
||||
timer tns-alive-retries 10
|
||||
bind udp local
|
||||
listen 172.16.0.1 23000
|
||||
accept-ipaccess
|
||||
!
|
||||
bssgp
|
||||
!
|
||||
EOF
|
|
@ -1,92 +0,0 @@
|
|||
!
|
||||
! OpenBSC (UNKNOWN) configuration by puppet
|
||||
!!
|
||||
password foo
|
||||
!
|
||||
log stderr
|
||||
logging filter all 1
|
||||
logging color 1
|
||||
logging print category-hex 0
|
||||
logging print category 1
|
||||
logging timestamp 0
|
||||
logging print file 1
|
||||
logging level all everything
|
||||
logging level rll notice
|
||||
logging level cc info
|
||||
logging level mm info
|
||||
logging level rr notice
|
||||
logging level rsl error
|
||||
logging level nm notice
|
||||
logging level mncc notice
|
||||
logging level pag notice
|
||||
logging level meas notice
|
||||
logging level sccp notice
|
||||
logging level msc notice
|
||||
logging level mgcp notice
|
||||
logging level ho notice
|
||||
logging level db notice
|
||||
logging level ref notice
|
||||
logging level gprs notice
|
||||
logging level ns notice
|
||||
logging level bssgp notice
|
||||
logging level llc notice
|
||||
logging level sndcp notice
|
||||
logging level nat notice
|
||||
logging level ctrl notice
|
||||
logging level smpp fatal
|
||||
logging level filter notice
|
||||
logging level ranap debug
|
||||
logging level sua debug
|
||||
logging level pcu debug
|
||||
logging level lglobal error
|
||||
logging level llapd notice
|
||||
logging level linp notice
|
||||
logging level lmux notice
|
||||
logging level lmi notice
|
||||
logging level lmib notice
|
||||
logging level lsms debug
|
||||
logging level lctrl notice
|
||||
logging level lgtp notice
|
||||
logging level lstats notice
|
||||
logging level lgsup notice
|
||||
logging level loap notice
|
||||
logging level lss7 notice
|
||||
logging level lsccp notice
|
||||
logging level lsua notice
|
||||
logging level lm3ua notice
|
||||
logging level lmgcp notice
|
||||
logging level ljibuf notice
|
||||
logging level lrspro notice
|
||||
!
|
||||
stats interval 5
|
||||
!
|
||||
line vty
|
||||
no login
|
||||
!
|
||||
e1_input
|
||||
e1_line 0 driver ipa
|
||||
e1_line 0 port 0
|
||||
no e1_line 0 keepalive
|
||||
network
|
||||
network country code <%= @mcc %>
|
||||
mobile network code <%= @mnc %>
|
||||
short name <%= @network_name %>
|
||||
long name <%= @network_name %>
|
||||
auth policy <%= @auth_policy %>
|
||||
authorized-regexp .*
|
||||
location updating reject cause 13
|
||||
encryption a5 0
|
||||
neci 1
|
||||
paging any use tch 1
|
||||
rrlp mode none
|
||||
mm info 1
|
||||
handover 0
|
||||
handover window rxlev averaging 10
|
||||
handover window rxqual averaging 1
|
||||
handover window rxlev neighbor averaging 10
|
||||
handover power budget interval 6
|
||||
handover power budget hysteresis 3
|
||||
handover maximum distance 9999
|
||||
timer t3109 4
|
||||
dyn_ts_allow_tch_f <% if @mncc_codec == 'AMR' -%>0<% else -%>1<% end %>
|
||||
subscriber-keep-in-ram 0
|
|
@ -1,545 +0,0 @@
|
|||
!
|
||||
! OpenBSC (UNKNOWN) configuration by puppet
|
||||
!!
|
||||
password foo
|
||||
!
|
||||
log stderr
|
||||
logging filter all 1
|
||||
logging color 1
|
||||
logging print category 1
|
||||
logging timestamp 0
|
||||
logging print file 1
|
||||
logging level all everything
|
||||
logging level rll notice
|
||||
logging level cc info
|
||||
logging level mm info
|
||||
logging level rr notice
|
||||
logging level rsl error
|
||||
logging level nm notice
|
||||
logging level mncc notice
|
||||
logging level pag notice
|
||||
logging level meas notice
|
||||
logging level sccp notice
|
||||
logging level msc notice
|
||||
logging level mgcp notice
|
||||
logging level ho notice
|
||||
logging level db notice
|
||||
logging level ref notice
|
||||
logging level gprs notice
|
||||
logging level ns notice
|
||||
logging level bssgp notice
|
||||
logging level llc notice
|
||||
logging level sndcp notice
|
||||
logging level nat notice
|
||||
logging level ctrl notice
|
||||
logging level smpp fatal
|
||||
logging level filter notice
|
||||
logging level lglobal error
|
||||
logging level llapd notice
|
||||
logging level linp notice
|
||||
logging level lmux notice
|
||||
logging level lmi notice
|
||||
logging level lmib notice
|
||||
logging level lsms debug
|
||||
logging level lctrl notice
|
||||
logging level lgtp notice
|
||||
logging level lstats notice
|
||||
logging level lgsup notice
|
||||
logging level loap notice
|
||||
logging level lss7 notice
|
||||
logging level lsccp notice
|
||||
logging level lsua notice
|
||||
logging level lm3ua notice
|
||||
logging level lmgcp notice
|
||||
!
|
||||
stats interval 5
|
||||
!
|
||||
line vty
|
||||
no login
|
||||
!
|
||||
e1_input
|
||||
e1_line 0 driver ipa
|
||||
e1_line 0 port 0
|
||||
no e1_line 0 keepalive
|
||||
network
|
||||
network country code <%= @mcc %>
|
||||
mobile network code <%= @mnc %>
|
||||
short name <%= @network_name %>
|
||||
long name <%= @network_name %>
|
||||
auth policy <%= @auth_policy %>
|
||||
authorized-regexp .*
|
||||
location updating reject cause 13
|
||||
encryption a5 0
|
||||
neci 1
|
||||
paging any use tch 1
|
||||
rrlp mode none
|
||||
mm info 1
|
||||
handover 0
|
||||
handover window rxlev averaging 10
|
||||
handover window rxqual averaging 1
|
||||
handover window rxlev neighbor averaging 10
|
||||
handover power budget interval 6
|
||||
handover power budget hysteresis 3
|
||||
handover maximum distance 9999
|
||||
timer t3109 4
|
||||
dyn_ts_allow_tch_f 1
|
||||
subscriber-keep-in-ram 0
|
||||
bts 0
|
||||
type sysmobts
|
||||
description MasterBTS
|
||||
band <%= @gsm_band %>
|
||||
cell_identity 0
|
||||
location_area_code <%= @lac %>
|
||||
base_station_id_code 63
|
||||
ms max power <%= @ms_max_power %>
|
||||
cell reselection hysteresis 14
|
||||
rxlev access min 0
|
||||
periodic location update 30
|
||||
radio-link-timeout 32
|
||||
channel allocator ascending
|
||||
rach tx integer 9
|
||||
rach max transmission 7
|
||||
channel-descrption attach 1
|
||||
channel-descrption bs-pa-mfrms 5
|
||||
channel-descrption bs-ag-blks-res 1
|
||||
rach emergency call allowed 1
|
||||
early-classmark-sending forbidden
|
||||
early-classmark-sending-3g allowed
|
||||
ip.access unit_id 1000 0
|
||||
oml ip.access stream_id 255 line 0
|
||||
neighbor-list mode automatic
|
||||
<% if @mncc_codec == 'AMR' -%>codec-support fr amr
|
||||
amr tch-h modes 4 5
|
||||
amr tch-h start-mode 1
|
||||
<% else -%>codec-support fr
|
||||
<% end -%>
|
||||
<% if @gprs == 'active' -%> gprs mode gprs
|
||||
gprs 11bit_rach_support_for_egprs 0
|
||||
gprs routing area 0
|
||||
gprs network-control-order nc0
|
||||
gprs cell bvci 2
|
||||
gprs cell timer blocking-timer 3
|
||||
gprs cell timer blocking-retries 3
|
||||
gprs cell timer unblocking-retries 3
|
||||
gprs cell timer reset-timer 3
|
||||
gprs cell timer reset-retries 3
|
||||
gprs cell timer suspend-timer 10
|
||||
gprs cell timer suspend-retries 3
|
||||
gprs cell timer resume-timer 10
|
||||
gprs cell timer resume-retries 3
|
||||
gprs cell timer capability-update-timer 10
|
||||
gprs cell timer capability-update-retries 3
|
||||
gprs nsei <%= @lac %>0
|
||||
gprs ns timer tns-block 3
|
||||
gprs ns timer tns-block-retries 3
|
||||
gprs ns timer tns-reset 3
|
||||
gprs ns timer tns-reset-retries 3
|
||||
gprs ns timer tns-test 30
|
||||
gprs ns timer tns-alive 3
|
||||
gprs ns timer tns-alive-retries 10
|
||||
gprs nsvc 0 nsvci <%= @lac %>0
|
||||
gprs nsvc 0 local udp port 23<%= @lac %>
|
||||
gprs nsvc 0 remote udp port 23001
|
||||
gprs nsvc 0 remote ip <%= @sgsn_ip_address %>
|
||||
<% else -%> gprs mode none
|
||||
<% end -%> no force-combined-si
|
||||
trx 0
|
||||
rf_locked 0
|
||||
arfcn <%= @arfcn_A %>
|
||||
nominal power 37
|
||||
max_power_red <%= @max_power_red %>
|
||||
rsl e1 tei 0
|
||||
timeslot 0
|
||||
phys_chan_config CCCH
|
||||
hopping enabled 0
|
||||
timeslot 1
|
||||
phys_chan_config SDCCH8
|
||||
hopping enabled 0
|
||||
<% if @gprs == 'active' -%>
|
||||
timeslot 2
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
timeslot 3
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
timeslot 4
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
timeslot 5
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
timeslot 6
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
timeslot 7
|
||||
phys_chan_config PDCH
|
||||
hopping enabled 0
|
||||
<% else -%>
|
||||
timeslot 2
|
||||
phys_chan_config <%= @phys_chan %>
|
||||
hopping enabled 0
|
||||
timeslot 3
|
||||
phys_chan_config <%= @phys_chan %>
|
||||
hopping enabled 0
|
||||
timeslot 4
|
||||
phys_chan_config <%= @phys_chan %>
|
||||
hopping enabled 0
|
||||
timeslot 5
|
||||
phys_chan_config <%= @phys_chan %>
|
||||
hopping enabled 0
|
||||
timeslot 6
|
||||
phys_chan_config <%= @phys_chan %>
|
||||
hopping enabled 0
|
||||
timeslot 7
|
||||
phys_chan_config <%= @phys_chan %>
|
||||
hopping enabled 0
|
||||
<% end -%>
|
||||
<% if @arfcn_B -%>
|
||||
bts 1
|
||||
type sysmobts
|
||||
band <%= @gsm_band %>
|
||||
cell_identity 1
|
||||
location_area_code <%= @lac %>
|
||||
base_station_id_code 63
|
||||
ms max power <%= @ms_max_power %>
|
||||
cell reselection hysteresis 14
|
||||
rxlev access min 0
|
||||
periodic location update 30
|
||||
radio-link-timeout 32
|
||||
channel allocator ascending
|
||||
rach tx integer 9
|
||||
rach max transmission 7
|
||||
channel-descrption attach 1
|
||||
channel-descrption bs-pa-mfrms 5
|
||||
channel-descrption bs-ag-blks-res 1
|
||||
rach emergency call allowed 1
|
||||
ip.access unit_id 1000 1
|
||||
oml ip.access stream_id 255 line 0
|
||||
neighbor-list mode automatic
|
||||
<% if @mncc_codec == 'AMR' -%>codec-support fr amr
|
||||
amr tch-h modes 4 5
|
||||
amr tch-h start-mode 1
|
||||
<% else -%>codec-support fr
|
||||
<% end -%>
|
||||
<% if @gprs == 'active' -%> gprs mode gprs
|
||||
gprs 11bit_rach_support_for_egprs 0
|
||||
gprs routing area 0
|
||||
gprs network-control-order nc0
|
||||
gprs cell bvci 3
|
||||
gprs cell timer blocking-timer 3
|
||||
gprs cell timer blocking-retries 3
|
||||
gprs cell timer unblocking-retries 3
|
||||
gprs cell timer reset-timer 3
|
||||
gprs cell timer reset-retries 3
|
||||
gprs cell timer suspend-timer 10
|
||||
gprs cell timer suspend-retries 3
|
||||
gprs cell timer resume-timer 10
|
||||
gprs cell timer resume-retries 3
|
||||
gprs cell timer capability-update-timer 10
|
||||
gprs cell timer capability-update-retries 3
|
||||
gprs nsei <%= @lac %>1
|
||||
gprs ns timer tns-block 3
|
||||
gprs ns timer tns-block-retries 3
|
||||
gprs ns timer tns-reset 3
|
||||
gprs ns timer tns-reset-retries 3
|
||||
gprs ns timer tns-test 30
|
||||
gprs ns timer tns-alive 3
|
||||
gprs ns timer tns-alive-retries 10
|
||||
gprs nsvc 0 nsvci <%= @lac %>1
|
||||
gprs nsvc 0 local udp port 23<%= @lac %>
|
||||
gprs nsvc 0 remote udp port 23001
|
||||
gprs nsvc 0 remote ip <%= @sgsn_ip_address %>
|
||||
<% else -%> gprs mode none
|
||||
<% end -%> no force-combined-si
|
||||
depends-on-bts 0
|
||||
trx 0
|
||||
rf_locked 0
|
||||
arfcn <%= @arfcn_B %>
|
||||
nominal power 37
|
||||
max_power_red <%= @max_power_red %>
|
||||
rsl e1 tei 0
|
||||
timeslot 0
|
||||
phys_chan_config CCCH
|
||||
hopping enabled 0
|
||||
timeslot 1
|
||||
phys_chan_config SDCCH8
|
||||
hopping enabled 0
|
||||
<% if @gprs == 'active' -%>
|
||||
timeslot 2
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
timeslot 3
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
timeslot 4
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
timeslot 5
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
timeslot 6
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
timeslot 7
|
||||
phys_chan_config PDCH
|
||||
hopping enabled 0
|
||||
<% else -%>
|
||||
timeslot 2
|
||||
phys_chan_config <%= @phys_chan %>
|
||||
hopping enabled 0
|
||||
timeslot 3
|
||||
phys_chan_config <%= @phys_chan %>
|
||||
hopping enabled 0
|
||||
timeslot 4
|
||||
phys_chan_config <%= @phys_chan %>
|
||||
hopping enabled 0
|
||||
timeslot 5
|
||||
phys_chan_config <%= @phys_chan %>
|
||||
hopping enabled 0
|
||||
timeslot 6
|
||||
phys_chan_config <%= @phys_chan %>
|
||||
hopping enabled 0
|
||||
timeslot 7
|
||||
phys_chan_config <%= @phys_chan %>
|
||||
hopping enabled 0
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
<% if @bts2_ip_address -%>
|
||||
bts 2
|
||||
type sysmobts
|
||||
band GSM850
|
||||
cell_identity 2
|
||||
location_area_code <%= @lac %>
|
||||
base_station_id_code 63
|
||||
ms max power 33
|
||||
cell reselection hysteresis 14
|
||||
rxlev access min 0
|
||||
periodic location update 30
|
||||
channel allocator ascending
|
||||
rach tx integer 9
|
||||
rach max transmission 7
|
||||
channel-descrption attach 1
|
||||
channel-descrption bs-pa-mfrms 5
|
||||
channel-descrption bs-ag-blks-res 1
|
||||
rach emergency call allowed 1
|
||||
ip.access unit_id 1000 2
|
||||
oml ip.access stream_id 255 line 0
|
||||
neighbor-list mode automatic
|
||||
codec-support fr
|
||||
gprs mode none
|
||||
no force-combined-si
|
||||
trx 0
|
||||
rf_locked 0
|
||||
arfcn <%= @arfcn_C %>
|
||||
nominal power 37
|
||||
max_power_red <%= @max_power_red %>
|
||||
rsl e1 tei 0
|
||||
timeslot 0
|
||||
phys_chan_config CCCH
|
||||
hopping enabled 0
|
||||
timeslot 1
|
||||
phys_chan_config SDCCH8
|
||||
hopping enabled 0
|
||||
timeslot 2
|
||||
phys_chan_config <%= @phys_chan %>
|
||||
hopping enabled 0
|
||||
timeslot 3
|
||||
phys_chan_config <%= @phys_chan %>
|
||||
hopping enabled 0
|
||||
timeslot 4
|
||||
phys_chan_config <%= @phys_chan %>
|
||||
hopping enabled 0
|
||||
timeslot 5
|
||||
phys_chan_config <%= @phys_chan %>
|
||||
hopping enabled 0
|
||||
timeslot 6
|
||||
phys_chan_config <%= @phys_chan %>
|
||||
hopping enabled 0
|
||||
timeslot 7
|
||||
phys_chan_config <%= @phys_chan %>
|
||||
hopping enabled 0
|
||||
bts 3
|
||||
type sysmobts
|
||||
band GSM850
|
||||
cell_identity 3
|
||||
location_area_code <%= @lac %>
|
||||
base_station_id_code 63
|
||||
ms max power 33
|
||||
cell reselection hysteresis 14
|
||||
rxlev access min 0
|
||||
periodic location update 30
|
||||
channel allocator ascending
|
||||
rach tx integer 9
|
||||
rach max transmission 7
|
||||
channel-descrption attach 1
|
||||
channel-descrption bs-pa-mfrms 5
|
||||
channel-descrption bs-ag-blks-res 1
|
||||
rach emergency call allowed 1
|
||||
ip.access unit_id 1000 3
|
||||
oml ip.access stream_id 255 line 0
|
||||
neighbor-list mode automatic
|
||||
codec-support fr
|
||||
gprs mode none
|
||||
no force-combined-si
|
||||
depends-on-bts 2
|
||||
trx 0
|
||||
rf_locked 0
|
||||
arfcn <%= @arfcn_D %>
|
||||
nominal power 37
|
||||
max_power_red <%= @max_power_red %>
|
||||
rsl e1 tei 0
|
||||
timeslot 0
|
||||
phys_chan_config CCCH
|
||||
hopping enabled 0
|
||||
timeslot 1
|
||||
phys_chan_config SDCCH8
|
||||
hopping enabled 0
|
||||
timeslot 2
|
||||
phys_chan_config <%= @phys_chan %>
|
||||
hopping enabled 0
|
||||
timeslot 3
|
||||
phys_chan_config <%= @phys_chan %>
|
||||
hopping enabled 0
|
||||
timeslot 4
|
||||
phys_chan_config <%= @phys_chan %>
|
||||
hopping enabled 0
|
||||
timeslot 5
|
||||
phys_chan_config <%= @phys_chan %>
|
||||
hopping enabled 0
|
||||
timeslot 6
|
||||
phys_chan_config <%= @phys_chan %>
|
||||
hopping enabled 0
|
||||
timeslot 7
|
||||
phys_chan_config <%= @phys_chan %>
|
||||
hopping enabled 0
|
||||
<% end -%>
|
||||
<% if @bts3_ip_address -%>
|
||||
bts 4
|
||||
type sysmobts
|
||||
band GSM850
|
||||
cell_identity 4
|
||||
location_area_code <%= @lac %>
|
||||
base_station_id_code 63
|
||||
ms max power 33
|
||||
cell reselection hysteresis 14
|
||||
rxlev access min 0
|
||||
periodic location update 30
|
||||
channel allocator ascending
|
||||
rach tx integer 9
|
||||
rach max transmission 7
|
||||
channel-descrption attach 1
|
||||
channel-descrption bs-pa-mfrms 5
|
||||
channel-descrption bs-ag-blks-res 1
|
||||
rach emergency call allowed 1
|
||||
ip.access unit_id 1000 4
|
||||
oml ip.access stream_id 255 line 0
|
||||
neighbor-list mode automatic
|
||||
codec-support fr
|
||||
gprs mode none
|
||||
no force-combined-si
|
||||
trx 0
|
||||
rf_locked 0
|
||||
arfcn <%= @arfcn_E %>
|
||||
nominal power 37
|
||||
max_power_red <%= @max_power_red %>
|
||||
rsl e1 tei 0
|
||||
timeslot 0
|
||||
phys_chan_config CCCH
|
||||
hopping enabled 0
|
||||
timeslot 1
|
||||
phys_chan_config SDCCH8
|
||||
hopping enabled 0
|
||||
timeslot 2
|
||||
phys_chan_config <%= @phys_chan %>
|
||||
hopping enabled 0
|
||||
timeslot 3
|
||||
phys_chan_config <%= @phys_chan %>
|
||||
hopping enabled 0
|
||||
timeslot 4
|
||||
phys_chan_config <%= @phys_chan %>
|
||||
hopping enabled 0
|
||||
timeslot 5
|
||||
phys_chan_config <%= @phys_chan %>
|
||||
hopping enabled 0
|
||||
timeslot 6
|
||||
phys_chan_config <%= @phys_chan %>
|
||||
hopping enabled 0
|
||||
timeslot 7
|
||||
phys_chan_config <%= @phys_chan %>
|
||||
hopping enabled 0
|
||||
bts 5
|
||||
type sysmobts
|
||||
band GSM850
|
||||
cell_identity 5
|
||||
location_area_code <%= @lac %>
|
||||
base_station_id_code 63
|
||||
ms max power 33
|
||||
cell reselection hysteresis 14
|
||||
rxlev access min 0
|
||||
periodic location update 30
|
||||
channel allocator ascending
|
||||
rach tx integer 9
|
||||
rach max transmission 7
|
||||
channel-descrption attach 1
|
||||
channel-descrption bs-pa-mfrms 5
|
||||
channel-descrption bs-ag-blks-res 1
|
||||
rach emergency call allowed 1
|
||||
ip.access unit_id 1000 5
|
||||
oml ip.access stream_id 255 line 0
|
||||
neighbor-list mode automatic
|
||||
codec-support fr
|
||||
gprs mode none
|
||||
no force-combined-si
|
||||
depends-on-bts 4
|
||||
trx 0
|
||||
rf_locked 0
|
||||
arfcn <%= @arfcn_F %>
|
||||
nominal power 37
|
||||
max_power_red <%= @max_power_red %>
|
||||
rsl e1 tei 0
|
||||
timeslot 0
|
||||
phys_chan_config CCCH
|
||||
hopping enabled 0
|
||||
timeslot 1
|
||||
phys_chan_config SDCCH8
|
||||
hopping enabled 0
|
||||
timeslot 2
|
||||
phys_chan_config <%= @phys_chan %>
|
||||
hopping enabled 0
|
||||
timeslot 3
|
||||
phys_chan_config <%= @phys_chan %>
|
||||
hopping enabled 0
|
||||
timeslot 4
|
||||
phys_chan_config <%= @phys_chan %>
|
||||
hopping enabled 0
|
||||
timeslot 5
|
||||
phys_chan_config <%= @phys_chan %>
|
||||
hopping enabled 0
|
||||
timeslot 6
|
||||
phys_chan_config <%= @phys_chan %>
|
||||
hopping enabled 0
|
||||
timeslot 7
|
||||
phys_chan_config <%= @phys_chan %>
|
||||
hopping enabled 0
|
||||
<% end -%>
|
||||
mncc-int
|
||||
default-codec tch-f fr
|
||||
default-codec tch-h amr
|
||||
meas-feed destination 127.0.0.1 8888
|
||||
nitb
|
||||
subscriber-create-on-demand
|
||||
no assign-tmsi
|
||||
smpp
|
||||
local-tcp-port 2775
|
||||
policy closed
|
||||
smpp-first
|
||||
esme OSMPP
|
||||
no alert-notifications
|
||||
password <%= @smsc_password %>
|
||||
default-route
|
||||
esme ISMPP
|
||||
no alert-notifications
|
||||
password <%= @smsc_password %>
|
||||
esme NOTIFY
|
||||
password <%= @smpp_password %>
|
||||
no deliver-src-imsi
|
|
@ -10,6 +10,4 @@ pcu
|
|||
cs 4
|
||||
alloc-algorithm dynamic
|
||||
gamma 0
|
||||
<% if @osmo_stack == "split" -%>
|
||||
neighbor resolution 172.16.0.1 4248
|
||||
<% end -%>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Shell Functions for Rhizomatica Community Celular Network
|
||||
#
|
||||
|
||||
OSMO_STACK="<%= @osmo_stack %>"
|
||||
OSMO_STACK="split"
|
||||
OSMO_HLR_OLD="/var/lib/osmocom/hlr.sqlite3"
|
||||
OSMO_HLR="<%= @hlr_db %>"
|
||||
OSMO_SMS="<%= @sms_db %>"
|
||||
|
@ -45,11 +45,7 @@ topcalls () {
|
|||
sleep $1
|
||||
done
|
||||
}
|
||||
<% if @osmo_stack != "split" %>
|
||||
nitb() {
|
||||
/usr/bin/expect -c 'spawn telnet localhost 4242;send "enable\r";send "logging enable\r";send "logging level all everything\r";send "logging print category 1\r";send "logging level smpp fatal\r"; send "logging filter all 1\r"; interact'
|
||||
}
|
||||
<% end %>
|
||||
|
||||
hlr() {
|
||||
sudo /usr/bin/sqlite3 -column -header $OSMO_HLR
|
||||
}
|
||||
|
@ -288,19 +284,8 @@ smsq-max()
|
|||
echo "Set max-pending to what?";
|
||||
return;
|
||||
fi;
|
||||
expect -c 'set queue '$1'; set port <% if @osmo_stack != "split" -%>4242<% else -%>4254<% end -%>; spawn telnet localhost $port; expect ">"; send "enable\r"; expect "#"; send "sms-queue max-pending $queue\r"; expect "#";
|
||||
expect -c 'set queue '$1'; set port 4254; spawn telnet localhost $port; expect ">"; send "enable\r"; expect "#"; send "sms-queue max-pending $queue\r"; expect "#";
|
||||
send "sms-queue trigger\r"; expect "#";'
|
||||
}
|
||||
<% if @osmo_stack != "split" %>
|
||||
close-net () {
|
||||
expect -c 'spawn -noecho telnet 0 4242; expect >; send enable\r; expect #; send "configure terminal\r"; expect #; send network\r; expect #; send "auth policy closed\r"; expect #; send \r' ; echo -e " \r Closed Network"
|
||||
}
|
||||
|
||||
open-net () {
|
||||
expect -c 'spawn -noecho telnet 0 4242; expect >; send enable\r; expect #; send "configure terminal\r"; expect #; send network\r; expect #; send "auth policy accept-all \r";expect #; send \r' ; echo -e " \r Opened Network"
|
||||
}
|
||||
|
||||
p-net (){
|
||||
echo "show network" | nc -q1 localhost 4242 | grep "policy" | awk -F "," '{print $1 }'
|
||||
}
|
||||
<% end %>
|
||||
|
|
|
@ -74,11 +74,6 @@ PYTHONPATH=$PYTHONPATH:/var/rhizomatica/rccn
|
|||
#Restart osmo-nitb every 6 hours (This wasn't working anyway. If it is needed, do something more elegant!)
|
||||
# 0 */6 * * * root /usr/bin/sv restart osmo-nitb 2>&1 > /dev/null
|
||||
|
||||
<% if @osmo_stack != 'split' -%>
|
||||
# Rebuild ACL config and restart the SGSN (stopgap pre HLR solution, we loose all PDP contexts)
|
||||
55 2 * * * root /etc/osmocom/make_sgsn_acl_config > /etc/osmocom/osmo-sgsn.cfg ; systemctl restart osmo-sgsn
|
||||
<% end -%>
|
||||
|
||||
# It's a new day....
|
||||
30 5 * * * root /home/rhizomatica/bin/check_broken.sh
|
||||
31 5 * * * root /home/rhizomatica/bin/get_ip.sh
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue