From fcda7401f44436dd908c36f35a85e68f3366a848 Mon Sep 17 00:00:00 2001 From: Keith Whyte Date: Fri, 26 Feb 2021 04:58:45 +0100 Subject: [PATCH] Updates to Osmo Split Stack Config --- modules/rhizo_base/manifests/osmocom.pp | 10 ++++++++++ modules/rhizo_base/templates/osmo-bsc-bts.erb | 12 ++++++------ modules/rhizo_base/templates/osmo-hlr.cfg.erb | 12 +++++++++++- modules/rhizo_base/templates/osmo-msc.cfg.erb | 6 +++--- modules/rhizo_base/templates/osmo-sgsn.cfg.erb | 7 ++++--- .../rhizo_base/templates/osmo-sip-connector.cfg.erb | 2 +- 6 files changed, 35 insertions(+), 14 deletions(-) diff --git a/modules/rhizo_base/manifests/osmocom.pp b/modules/rhizo_base/manifests/osmocom.pp index 79ab3fb..e04c7c5 100644 --- a/modules/rhizo_base/manifests/osmocom.pp +++ b/modules/rhizo_base/manifests/osmocom.pp @@ -18,6 +18,7 @@ class rhizo_base::osmocom { $smsc_password = $rhizo_base::smsc_password $smpp_password = $rhizo_base::smpp_password + $hlr_db = hiera('rhizo::hlr_db', '/var/lib/osmocom/hlr.db') $sms_db = $rhizo_base::sms_db $mncc_codec = $rhizo_base::mncc_codec @@ -26,6 +27,7 @@ class rhizo_base::osmocom { $sgsn_ip_address = hiera('rhizo::sgsn_ip_address') $ggsn_ip_address = hiera('rhizo::ggsn_ip_address') $repo = hiera('rhizo::osmo_repo', 'latest') + $hlr_name = hiera('rhizo::hlr_name', $network_name) package { [ 'osmo-stp', 'osmo-mgw', 'osmo-sgsn' ]: ensure => 'installed', @@ -85,6 +87,9 @@ class rhizo_base::osmocom { ensure => 'installed', } + $ts0_phys_chan = "CCCH" + $ts1_phys_chan = "SDCCH8" + if $mncc_codec == "AMR" { $phys_chan = "TCH/H" } else { @@ -136,6 +141,11 @@ class rhizo_base::osmocom { require => Package['osmo-sip-connector'], } + file { '/etc/osmocom/osmo-sgsn.cfg': + content => template('rhizo_base/osmo-sgsn.cfg.erb'), + require => Package['osmo-sgsn'], + } + systemd::dropin_file { 'override.conf': unit => 'osmo-msc.service', source => 'puppet:///modules/rhizo_base/systemd/osmo-msc.override' diff --git a/modules/rhizo_base/templates/osmo-bsc-bts.erb b/modules/rhizo_base/templates/osmo-bsc-bts.erb index 6b9b4c5..ebcdfce 100644 --- a/modules/rhizo_base/templates/osmo-bsc-bts.erb +++ b/modules/rhizo_base/templates/osmo-bsc-bts.erb @@ -79,25 +79,25 @@ max_power_red <%= bts["red"] %> rsl e1 tei 0 timeslot 0 - phys_chan_config CCCH+SDCCH4 + phys_chan_config <%= @ts0_phys_chan %> hopping enabled 0 timeslot 1 - phys_chan_config <%= @phys_chan %> + phys_chan_config <%= @ts1_phys_chan %> hopping enabled 0 timeslot 2 phys_chan_config <%= @phys_chan %> hopping enabled 0 timeslot 3 - phys_chan_config <%= @phys_chan %> + phys_chan_config TCH/F_TCH/H_PDCH hopping enabled 0 timeslot 4 - phys_chan_config <%= @phys_chan %> + phys_chan_config TCH/F_TCH/H_PDCH hopping enabled 0 timeslot 5 - phys_chan_config <%= @phys_chan %> + phys_chan_config TCH/F_TCH/H_PDCH hopping enabled 0 timeslot 6 - phys_chan_config <%= @phys_chan %> + phys_chan_config TCH/F_TCH/H_PDCH hopping enabled 0 timeslot 7 phys_chan_config PDCH diff --git a/modules/rhizo_base/templates/osmo-hlr.cfg.erb b/modules/rhizo_base/templates/osmo-hlr.cfg.erb index 42acd39..df3f9af 100644 --- a/modules/rhizo_base/templates/osmo-hlr.cfg.erb +++ b/modules/rhizo_base/templates/osmo-hlr.cfg.erb @@ -44,7 +44,17 @@ ctrl hlr subscriber-create-on-demand 5 cs store-imei + database <%= @hlr_db %> gsup - bind ip 127.0.0.1 + bind ip <%= @vpn_ip_address %> + ipa-name <%= @hlr_name %> ussd route prefix *#100# internal own-msisdn ussd route prefix *#101# internal own-imsi +mslookup + server + mdns bind 239.192.23.42 4266 + service sip.voice at <%= @vpn_ip_address %> 5060 + service smpp.sms at <%= @vpn_ip_address %> 2775 + client + mdns bind 239.192.23.42 4266 +end diff --git a/modules/rhizo_base/templates/osmo-msc.cfg.erb b/modules/rhizo_base/templates/osmo-msc.cfg.erb index 2b43d06..a5492e2 100644 --- a/modules/rhizo_base/templates/osmo-msc.cfg.erb +++ b/modules/rhizo_base/templates/osmo-msc.cfg.erb @@ -77,8 +77,8 @@ msc auth-tuple-reuse-on-error 1 check-imei-rqd early mgw local-port 2728 - mgw remote-ip 127.0.0.2 - mgw remote-port 2428 + mgw remote-ip 127.0.0.1 + mgw remote-port 2427 mncc-int default-codec tch-f amr default-codec tch-h amr @@ -96,7 +96,7 @@ smpp esme NOTIFY password <%= @smpp_password %> hlr - remote-ip 127.0.0.1 + remote-ip <%= @vpn_ip_address %> remote-port 4222 sgs local-port 29118 diff --git a/modules/rhizo_base/templates/osmo-sgsn.cfg.erb b/modules/rhizo_base/templates/osmo-sgsn.cfg.erb index ef63285..b5c509e 100644 --- a/modules/rhizo_base/templates/osmo-sgsn.cfg.erb +++ b/modules/rhizo_base/templates/osmo-sgsn.cfg.erb @@ -20,7 +20,7 @@ sgsn ggsn 0 gtp-version 1 ggsn 0 echo-interval 60 auth-policy accept-all - gsup remote-ip 127.0.0.1 + gsup remote-ip <%= @vpn_ip_address %> gsup remote-port 4222 authentication optional ! @@ -32,8 +32,9 @@ ns timer tns-test 30 timer tns-alive 3 timer tns-alive-retries 10 - encapsulation udp local-port 23000 - encapsulation framerelay-gre enabled 0 + bind udp local + listen 172.16.0.1 23000 + accept-ipaccess ! bssgp ! diff --git a/modules/rhizo_base/templates/osmo-sip-connector.cfg.erb b/modules/rhizo_base/templates/osmo-sip-connector.cfg.erb index dbb24f3..a62b9ea 100644 --- a/modules/rhizo_base/templates/osmo-sip-connector.cfg.erb +++ b/modules/rhizo_base/templates/osmo-sip-connector.cfg.erb @@ -10,7 +10,6 @@ log stderr logging timestamp 1 logging print level 1 logging print file 1 - logging level set-all notice logging level sip info logging level mncc info logging level app notice @@ -33,6 +32,7 @@ log stderr logging level lm3ua notice logging level lmgcp notice logging level ljibuf notice + logging level set-all notice ! stats interval 5 !