Implement IuCS (large refactoring and addition)

osmo-nitb becomes osmo-msc
add DIUCS debug log constant
add iucs.[hc]
add msc vty, remove nitb vty
add libiudummy, to avoid linking Iu deps in tests
Use new msc_tx_dtap() instead of gsm0808_submit_dtap()
libmgcp: add mgcpgw client API
bridge calls via mgcpgw

Enable MSC specific CTRL commands, bsc_base_ctrl_cmds_install() still needs to
be split up.

Change-Id: I5b5b6a9678b458affa86800afb1ec726e66eed88
changes/47/3347/6
Neels Hofmeyr 7 years ago committed by Neels Hofmeyr
parent 4283675311
commit 84da6b1edb
  1. 1
      .gitignore
  2. 4
      configure.ac
  3. 8
      doc/examples/osmo-bsc_mgcp/mgcp.cfg
  4. 19
      doc/examples/osmo-msc/osmo-msc.cfg
  5. 164
      doc/examples/osmo-nitb/bs11/openbsc-1bts-2trx-hopping.cfg
  6. 84
      doc/examples/osmo-nitb/bs11/openbsc-1bts-2trx.cfg
  7. 148
      doc/examples/osmo-nitb/bs11/openbsc-2bts-2trx.cfg
  8. 56
      doc/examples/osmo-nitb/bs11/openbsc.cfg
  9. 99
      doc/examples/osmo-nitb/nanobts/openbsc-multitrx.cfg
  10. 77
      doc/examples/osmo-nitb/nanobts/openbsc.cfg
  11. 117
      doc/examples/osmo-nitb/nokia/openbsc_nokia_3trx.cfg
  12. 219
      doc/examples/osmo-nitb/rbs2308/openbsc.cfg
  13. 77
      doc/examples/osmo-nitb/sysmobts/openbsc.cfg
  14. 4
      include/openbsc/Makefile.am
  15. 6
      include/openbsc/common.h
  16. 1
      include/openbsc/debug.h
  17. 2
      include/openbsc/gprs_gmm.h
  18. 25
      include/openbsc/gsm_data.h
  19. 12
      include/openbsc/gsm_subscriber.h
  20. 20
      include/openbsc/iu.h
  21. 7
      include/openbsc/iucs.h
  22. 7
      include/openbsc/iucs_ranap.h
  23. 15
      include/openbsc/mgcp.h
  24. 10
      include/openbsc/mgcp_internal.h
  25. 87
      include/openbsc/mgcpgw_client.h
  26. 13
      include/openbsc/msc_ifaces.h
  27. 11
      include/openbsc/osmo_msc.h
  28. 5
      include/openbsc/sgsn.h
  29. 15
      include/openbsc/transaction.h
  30. 7
      include/openbsc/vlr.h
  31. 2
      include/openbsc/vty.h
  32. 9
      osmoappdesc.py
  33. 2
      src/Makefile.am
  34. 10
      src/gprs/gprs_gmm.c
  35. 1
      src/gprs/gprs_sgsn.c
  36. 2
      src/gprs/sgsn_libgtp.c
  37. 9
      src/gprs/sgsn_main.c
  38. 14
      src/gprs/sgsn_vty.c
  39. 6
      src/libbsc/bsc_init.c
  40. 6
      src/libbsc/paging.c
  41. 5
      src/libcommon/debug.c
  42. 7
      src/libcommon/gsm_data.c
  43. 53
      src/libiu/iu.c
  44. 72
      src/libiu/iu_vty.c
  45. 3
      src/libmgcp/Makefile.am
  46. 54
      src/libmgcp/mgcp_common.c
  47. 101
      src/libmgcp/mgcp_network.c
  48. 23
      src/libmgcp/mgcp_protocol.c
  49. 549
      src/libmgcp/mgcpgw_client.c
  50. 116
      src/libmgcp/mgcpgw_client_vty.c
  51. 9
      src/libmsc/Makefile.am
  52. 8
      src/libmsc/a_iface.c
  53. 152
      src/libmsc/gsm_04_08.c
  54. 7
      src/libmsc/gsm_04_11.c
  55. 10
      src/libmsc/gsm_04_80.c
  56. 91
      src/libmsc/gsm_subscriber.c
  57. 93
      src/libmsc/iu_dummy.c
  58. 191
      src/libmsc/iucs.c
  59. 104
      src/libmsc/iucs_ranap.c
  60. 238
      src/libmsc/msc_ifaces.c
  61. 130
      src/libmsc/msc_vty.c
  62. 73
      src/libmsc/osmo_msc.c
  63. 3
      src/libmsc/silent_call.c
  64. 56
      src/libmsc/subscr_conn.c
  65. 6
      src/libmsc/transaction.c
  66. 156
      src/libmsc/vty_interface_layer3.c
  67. 4
      src/libvlr/vlr.c
  68. 12
      src/libvlr/vlr_access_req_fsm.c
  69. 12
      src/libvlr/vlr_lu_fsm.c
  70. 2
      src/osmo-bsc/osmo_bsc_api.c
  71. 23
      src/osmo-msc/Makefile.am
  72. 306
      src/osmo-msc/msc_main.c
  73. 68
      tests/ctrl_test_runner.py
  74. 1
      tests/db/Makefile.am
  75. 23
      tests/db/db_test.c
  76. 21
      tests/mgcp/Makefile.am
  77. 165
      tests/mgcp/mgcpgw_client_test.c
  78. 1
      tests/mgcp/mgcpgw_client_test.err
  79. 31
      tests/mgcp/mgcpgw_client_test.ok
  80. 24
      tests/msc_vlr/Makefile.am
  81. 468
      tests/msc_vlr/msc_vlr_test_gsm_authen.err
  82. 341
      tests/msc_vlr/msc_vlr_test_gsm_ciph.err
  83. 271
      tests/msc_vlr/msc_vlr_test_hlr_reject.err
  84. 58
      tests/msc_vlr/msc_vlr_test_hlr_timeout.err
  85. 84
      tests/msc_vlr/msc_vlr_test_ms_timeout.err
  86. 10
      tests/msc_vlr/msc_vlr_test_no_authen.c
  87. 335
      tests/msc_vlr/msc_vlr_test_no_authen.err
  88. 578
      tests/msc_vlr/msc_vlr_test_reject_concurrency.err
  89. 130
      tests/msc_vlr/msc_vlr_test_rest.err
  90. 178
      tests/msc_vlr/msc_vlr_test_umts_authen.c
  91. 585
      tests/msc_vlr/msc_vlr_test_umts_authen.err
  92. 140
      tests/msc_vlr/msc_vlr_tests.c
  93. 6
      tests/msc_vlr/msc_vlr_tests.h
  94. 12
      tests/smpp_test_runner.py
  95. 17
      tests/sms_queue/Makefile.am
  96. 7
      tests/testsuite.at
  97. 147
      tests/vty_test_runner.py

1
.gitignore vendored

@ -58,6 +58,7 @@ src/gprs/osmo-gbproxy
src/gprs/osmo-gtphub
src/osmo-bsc_nat/osmo-bsc_nat
src/libcommon/gsup_test_client
src/osmo-msc/osmo-msc
#tests
tests/testsuite.dir

@ -62,7 +62,7 @@ fi
AM_CONDITIONAL(BUILD_BSC, test "x$osmo_ac_build_bsc" = "xyes")
AC_SUBST(osmo_ac_build_bsc)
# Enable/disable smpp support in the nitb?
# Enable/disable smpp support in the msc?
AC_ARG_ENABLE([smpp], [AS_HELP_STRING([--enable-smpp], [Build the SMPP interface])],
[osmo_ac_build_smpp="$enableval"],[osmo_ac_build_smpp="no"])
if test "$osmo_ac_build_smpp" = "yes" ; then
@ -231,7 +231,7 @@ AC_OUTPUT(
src/libfilter/Makefile
src/libiu/Makefile
src/libcommon-cs/Makefile
src/osmo-nitb/Makefile
src/osmo-msc/Makefile
src/osmo-bsc/Makefile
src/osmo-bsc_nat/Makefile
src/osmo-bsc_mgcp/Makefile

@ -7,13 +7,13 @@ line vty
no login
!
mgcp
! local ip 213.167.134.14
bts ip 172.16.252.43
bind ip 127.0.0.1
!local ip 192.168.0.132
!bts ip 192.168.0.124
!bind ip 192.168.0.132
bind port 2427
rtp base 4000
rtp force-ptime 20
sdp audio payload number 98
sdp audio payload name AMR/8000
number endpoints 31
loop 1
no rtcp-omit

@ -0,0 +1,19 @@
!
! OsmoMSC configuration saved from vty
!
line vty
no login
!
network
network country code 1
mobile network code 1
short name OsmoMSC
long name OsmoMSC
auth policy closed
location updating reject cause 13
encryption a5 0
rrlp mode none
mm info 1
msc
mgcpgw remote-ip 192.168.0.132
assign-tmsi

@ -1,164 +0,0 @@
!
! OpenBSC (0.9.0.845-57c4) configuration saved from vty
!!
password foo
!
line vty
no login
!
e1_input
e1_line 0 driver misdn
network
network country code 1
mobile network code 1
short name OpenBSC
long name OpenBSC
auth policy closed
location updating reject cause 13
encryption a5 0
neci 1
rrlp mode none
mm info 0
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 t3101 10
timer t3103 0
timer t3105 0
timer t3107 0
timer t3109 4
timer t3111 0
timer t3113 60
timer t3115 0
timer t3117 0
timer t3119 0
timer t3141 0
bts 0
type bs11
band GSM900
cell_identity 0
location_area_code 1
training_sequence_code 7
base_station_id_code 63
ms max power 15
cell reselection hysteresis 4
rxlev access min 0
channel allocator descending
rach tx integer 9
rach max transmission 7
oml e1 line 0 timeslot 1 sub-slot full
oml e1 tei 25
gprs mode none
trx 0
rf_locked 0
arfcn 121
nominal power 24
max_power_red 12
rsl e1 line 0 timeslot 1 sub-slot full
rsl e1 tei 1
timeslot 0
phys_chan_config CCCH
hopping enabled 0
e1 line 0 timeslot 1 sub-slot full
timeslot 1
phys_chan_config TCH/F
hopping enabled 0
e1 line 0 timeslot 2 sub-slot 1
timeslot 2
phys_chan_config TCH/F
hopping enabled 0
e1 line 0 timeslot 2 sub-slot 2
timeslot 3
phys_chan_config TCH/F
hopping enabled 0
e1 line 0 timeslot 2 sub-slot 3
timeslot 4
phys_chan_config TCH/F
hopping enabled 0
e1 line 0 timeslot 3 sub-slot 0
timeslot 5
phys_chan_config TCH/F
hopping enabled 0
e1 line 0 timeslot 3 sub-slot 1
timeslot 6
phys_chan_config TCH/F
hopping enabled 0
e1 line 0 timeslot 3 sub-slot 2
timeslot 7
phys_chan_config TCH/F
hopping enabled 0
e1 line 0 timeslot 3 sub-slot 3
trx 1
rf_locked 0
arfcn 119
nominal power 24
max_power_red 12
rsl e1 line 0 timeslot 1 sub-slot full
rsl e1 tei 2
timeslot 0
phys_chan_config SDCCH8
hopping enabled 1
hopping sequence-number 0
hopping maio 0
hopping arfcn add 117
hopping arfcn add 119
timeslot 1
phys_chan_config TCH/F
hopping enabled 1
hopping sequence-number 0
hopping maio 0
hopping arfcn add 117
hopping arfcn add 119
e1 line 0 timeslot 4 sub-slot 1
timeslot 2
phys_chan_config TCH/F
hopping enabled 1
hopping sequence-number 0
hopping maio 0
hopping arfcn add 117
hopping arfcn add 119
e1 line 0 timeslot 4 sub-slot 2
timeslot 3
phys_chan_config TCH/F
hopping enabled 1
hopping sequence-number 0
hopping maio 0
hopping arfcn add 117
hopping arfcn add 119
e1 line 0 timeslot 4 sub-slot 3
timeslot 4
phys_chan_config TCH/F
hopping enabled 1
hopping sequence-number 0
hopping maio 0
hopping arfcn add 117
hopping arfcn add 119
e1 line 0 timeslot 5 sub-slot 0
timeslot 5
phys_chan_config TCH/F
hopping enabled 1
hopping sequence-number 0
hopping maio 0
hopping arfcn add 117
hopping arfcn add 119
e1 line 0 timeslot 5 sub-slot 1
timeslot 6
phys_chan_config TCH/F
hopping enabled 1
hopping sequence-number 0
hopping maio 0
hopping arfcn add 117
hopping arfcn add 119
e1 line 0 timeslot 5 sub-slot 2
timeslot 7
phys_chan_config TCH/F
hopping enabled 1
hopping sequence-number 0
hopping maio 0
hopping arfcn add 117
hopping arfcn add 119
e1 line 0 timeslot 5 sub-slot 3

@ -1,84 +0,0 @@
!
! OpenBSC configuration saved from vty
! !
password foo
!
line vty
no login
!
e1_input
e1_line 0 driver misdn
network
network country code 1
mobile network code 1
short name OpenBSC
long name OpenBSC
timer t3101 10
timer t3113 60
bts 0
type bs11
band GSM900
cell_identity 1
location_area_code 1
training_sequence_code 7
base_station_id_code 63
oml e1 line 0 timeslot 1 sub-slot full
oml e1 tei 25
trx 0
arfcn 121
max_power_red 0
rsl e1 line 0 timeslot 1 sub-slot full
rsl e1 tei 1
timeslot 0
phys_chan_config CCCH+SDCCH4
e1 line 0 timeslot 1 sub-slot full
timeslot 1
phys_chan_config SDCCH8
e1 line 0 timeslot 2 sub-slot 1
timeslot 2
phys_chan_config TCH/F
e1 line 0 timeslot 2 sub-slot 2
timeslot 3
phys_chan_config TCH/F
e1 line 0 timeslot 2 sub-slot 3
timeslot 4
phys_chan_config TCH/F
e1 line 0 timeslot 3 sub-slot 0
timeslot 5
phys_chan_config TCH/F
e1 line 0 timeslot 3 sub-slot 1
timeslot 6
phys_chan_config TCH/F
e1 line 0 timeslot 3 sub-slot 2
timeslot 7
phys_chan_config TCH/F
e1 line 0 timeslot 3 sub-slot 3
trx 1
arfcn 123
max_power_red 0
rsl e1 line 0 timeslot 1 sub-slot full
rsl e1 tei 2
timeslot 0
phys_chan_config TCH/F
e1 line 0 timeslot 4 sub-slot 0
timeslot 1
phys_chan_config TCH/F
e1 line 0 timeslot 4 sub-slot 1
timeslot 2
phys_chan_config TCH/F
e1 line 0 timeslot 4 sub-slot 2
timeslot 3
phys_chan_config TCH/F
e1 line 0 timeslot 4 sub-slot 3
timeslot 4
phys_chan_config TCH/F
e1 line 0 timeslot 5 sub-slot 0
timeslot 5
phys_chan_config TCH/F
e1 line 0 timeslot 5 sub-slot 1
timeslot 6
phys_chan_config TCH/F
e1 line 0 timeslot 5 sub-slot 2
timeslot 7
phys_chan_config TCH/F
e1 line 0 timeslot 5 sub-slot 3

@ -1,148 +0,0 @@
!
! OpenBSC configuration saved from vty
! !
password foo
!
line vty
no login
!
network
network country code 1
mobile network code 1
short name OpenBSC
long name OpenBSC
timer t3101 10
timer t3113 60
bts 0
type bs11
band GSM900
cell_identity 1
location_area_code 1
training_sequence_code 7
base_station_id_code 63
oml e1 line 0 timeslot 1 sub-slot full
oml e1 tei 25
trx 0
arfcn 121
max_power_red 0
rsl e1 line 0 timeslot 1 sub-slot full
rsl e1 tei 1
timeslot 0
phys_chan_config CCCH+SDCCH4
e1 line 0 timeslot 1 sub-slot full
timeslot 1
phys_chan_config TCH/F
e1 line 0 timeslot 2 sub-slot 1
timeslot 2
phys_chan_config TCH/F
e1 line 0 timeslot 2 sub-slot 2
timeslot 3
phys_chan_config TCH/F
e1 line 0 timeslot 2 sub-slot 3
timeslot 4
phys_chan_config TCH/F
e1 line 0 timeslot 3 sub-slot 0
timeslot 5
phys_chan_config TCH/F
e1 line 0 timeslot 3 sub-slot 1
timeslot 6
phys_chan_config TCH/F
e1 line 0 timeslot 3 sub-slot 2
timeslot 7
phys_chan_config TCH/F
e1 line 0 timeslot 3 sub-slot 3
trx 1
arfcn 123
max_power_red 0
rsl e1 line 0 timeslot 1 sub-slot full
rsl e1 tei 2
timeslot 0
phys_chan_config TCH/F
e1 line 0 timeslot 4 sub-slot 0
timeslot 1
phys_chan_config TCH/F
e1 line 0 timeslot 4 sub-slot 1
timeslot 2
phys_chan_config TCH/F
e1 line 0 timeslot 4 sub-slot 2
timeslot 3
phys_chan_config TCH/F
e1 line 0 timeslot 4 sub-slot 3
timeslot 4
phys_chan_config TCH/F
e1 line 0 timeslot 5 sub-slot 0
timeslot 5
phys_chan_config TCH/F
e1 line 0 timeslot 5 sub-slot 1
timeslot 6
phys_chan_config TCH/F
e1 line 0 timeslot 5 sub-slot 2
timeslot 7
phys_chan_config TCH/F
e1 line 0 timeslot 5 sub-slot 3
bts 1
type bs11
band GSM900
location_area_code 2
training_sequence_code 7
base_station_id_code 63
oml e1 line 1 timeslot 6 sub-slot full
oml e1 tei 25
trx 0
arfcn 122
max_power_red 0
rsl e1 line 1 timeslot 6 sub-slot full
rsl e1 tei 1
timeslot 0
phys_chan_config CCCH+SDCCH4
e1 line 1 timeslot 7 sub-slot 0
timeslot 1
phys_chan_config SDCCH8
e1 line 1 timeslot 7 sub-slot 1
timeslot 2
phys_chan_config TCH/F
e1 line 1 timeslot 7 sub-slot 2
timeslot 3
phys_chan_config TCH/F
e1 line 1 timeslot 7 sub-slot 3
timeslot 4
phys_chan_config TCH/F
e1 line 1 timeslot 8 sub-slot 0
timeslot 5
phys_chan_config TCH/F
e1 line 1 timeslot 8 sub-slot 1
timeslot 6
phys_chan_config TCH/F
e1 line 1 timeslot 8 sub-slot 2
timeslot 7
phys_chan_config TCH/F
e1 line 1 timeslot 8 sub-slot 3
trx 1
arfcn 124
max_power_red 0
rsl e1 line 1 timeslot 6 sub-slot full
rsl e1 tei 2
timeslot 0
phys_chan_config TCH/F
e1 line 1 timeslot 9 sub-slot 0
timeslot 1
phys_chan_config TCH/F
e1 line 1 timeslot 9 sub-slot 1
timeslot 2
phys_chan_config TCH/F
e1 line 1 timeslot 9 sub-slot 2
timeslot 3
phys_chan_config TCH/F
e1 line 1 timeslot 9 sub-slot 3
timeslot 4
phys_chan_config TCH/F
e1 line 1 timeslot 10 sub-slot 0
timeslot 5
phys_chan_config TCH/F
e1 line 1 timeslot 10 sub-slot 1
timeslot 6
phys_chan_config TCH/F
e1 line 1 timeslot 10 sub-slot 2
timeslot 7
phys_chan_config TCH/F
e1 line 1 timeslot 10 sub-slot 3

@ -1,56 +0,0 @@
!
! OpenBSC configuration saved from vty
! !
password foo
!
line vty
no login
!
e1_input
e1_line 0 driver misdn
network
network country code 1
mobile network code 1
short name OpenBSC
long name OpenBSC
timer t3101 10
timer t3113 60
bts 0
type bs11
band GSM900
cell_identity 1
location_area_code 1
training_sequence_code 7
base_station_id_code 63
oml e1 line 0 timeslot 1 sub-slot full
oml e1 tei 25
trx 0
arfcn 121
max_power_red 0
rsl e1 line 0 timeslot 1 sub-slot full
rsl e1 tei 1
timeslot 0
phys_chan_config CCCH+SDCCH4
e1 line 0 timeslot 1 sub-slot full
timeslot 1
phys_chan_config TCH/F
e1 line 0 timeslot 2 sub-slot 1
timeslot 2
phys_chan_config TCH/F
e1 line 0 timeslot 2 sub-slot 2
timeslot 3
phys_chan_config TCH/F
e1 line 0 timeslot 2 sub-slot 3
timeslot 4
phys_chan_config TCH/F
e1 line 0 timeslot 3 sub-slot 0
timeslot 5
phys_chan_config TCH/F
e1 line 0 timeslot 3 sub-slot 1
timeslot 6
phys_chan_config TCH/F
e1 line 0 timeslot 3 sub-slot 2
timeslot 7
phys_chan_config TCH/F
e1 line 0 timeslot 3 sub-slot 3

@ -1,99 +0,0 @@
!
! OpenBSC configuration saved from vty
! !
password foo
!
line vty
no login
!
e1_input
e1_line 0 driver ipa
network
network country code 1
mobile network code 1
short name OpenBSC
long name OpenBSC
auth policy closed
location updating reject cause 13
encryption a5 0
neci 1
rrlp mode none
mm info 0
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 t3101 10
timer t3103 0
timer t3105 0
timer t3107 0
timer t3109 4
timer t3111 0
timer t3113 60
timer t3115 0
timer t3117 0
timer t3119 0
timer t3141 0
bts 0
type nanobts
band DCS1800
cell_identity 0
location_area_code 1
training_sequence_code 7
base_station_id_code 63
ms max power 15
cell reselection hysteresis 4
rxlev access min 0
channel allocator ascending
rach tx integer 9
rach max transmission 7
ip.access unit_id 1800 0
oml ip.access stream_id 255 line 0
gprs mode none
trx 0
rf_locked 0
arfcn 871
nominal power 23
max_power_red 0
rsl e1 tei 0
timeslot 0
phys_chan_config CCCH+SDCCH4
timeslot 1
phys_chan_config SDCCH8
timeslot 2
phys_chan_config TCH/F
timeslot 3
phys_chan_config TCH/F
timeslot 4
phys_chan_config TCH/F
timeslot 5
phys_chan_config TCH/F
timeslot 6
phys_chan_config TCH/F
timeslot 7
phys_chan_config TCH/F
trx 1
rf_locked 0
arfcn 873
nominal power 23
max_power_red 0
rsl e1 tei 0
timeslot 0
phys_chan_config SDCCH8
timeslot 1
phys_chan_config TCH/F
timeslot 2
phys_chan_config TCH/F
timeslot 3
phys_chan_config TCH/F
timeslot 4
phys_chan_config TCH/F
timeslot 5
phys_chan_config TCH/F
timeslot 6
phys_chan_config TCH/F
timeslot 7
phys_chan_config TCH/F

@ -1,77 +0,0 @@
!
! OpenBSC configuration saved from vty
! !
password foo
!
line vty
no login
!
e1_input
e1_line 0 driver ipa
network
network country code 1
mobile network code 1
short name OpenBSC
long name OpenBSC
auth policy closed
location updating reject cause 13
encryption a5 0
neci 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 t3101 10
timer t3103 0
timer t3105 0
timer t3107 0
timer t3109 4
timer t3111 0
timer t3113 60
timer t3115 0
timer t3117 0
timer t3119 0
timer t3141 0
bts 0
type nanobts
band DCS1800
cell_identity 0
location_area_code 1
training_sequence_code 7
base_station_id_code 63
ms max power 15
cell reselection hysteresis 4
rxlev access min 0
channel allocator ascending
rach tx integer 9
rach max transmission 7
ip.access unit_id 1801 0
oml ip.access stream_id 255 line 0
gprs mode none
trx 0
rf_locked 0
arfcn 514
nominal power 23
max_power_red 20
rsl e1 tei 0
timeslot 0
phys_chan_config CCCH+SDCCH4
timeslot 1
phys_chan_config SDCCH8
timeslot 2
phys_chan_config TCH/F
timeslot 3
phys_chan_config TCH/F
timeslot 4
phys_chan_config TCH/F
timeslot 5
phys_chan_config TCH/F
timeslot 6
phys_chan_config TCH/F
timeslot 7
phys_chan_config TCH/F

@ -1,117 +0,0 @@
!
! OpenBSC configuration saved from vty
! !
password foo
!
line vty
no login
!
e1_input
e1_line 0 driver misdn
network
network country code 1
mobile network code 1
short name OpenBSC
long name OpenBSC
timer t3101 10
timer t3113 60
bts 0
type nokia_site
band GSM1800
cell_identity 1
location_area_code 1
base_station_id_code 63
training_sequence_code 7
oml e1 line 0 timeslot 1 sub-slot full
oml e1 tei 1
trx 0
arfcn 866
max_power_red 24
rsl e1 line 0 timeslot 2 sub-slot full
rsl e1 tei 1
timeslot 0
phys_chan_config CCCH+SDCCH4
e1 line 0 timeslot 6 sub-slot full
timeslot 1
phys_chan_config SDCCH8
e1 line 0 timeslot 6 sub-slot 1
timeslot 2
phys_chan_config TCH/F
e1 line 0 timeslot 6 sub-slot 2
timeslot 3
phys_chan_config TCH/F
e1 line 0 timeslot 6 sub-slot 3
timeslot 4
phys_chan_config TCH/F
e1 line 0 timeslot 7 sub-slot 0
timeslot 5
phys_chan_config TCH/F
e1 line 0 timeslot 7 sub-slot 1
timeslot 6
phys_chan_config TCH/F
e1 line 0 timeslot 7 sub-slot 2
timeslot 7
phys_chan_config TCH/F
e1 line 0 timeslot 7 sub-slot 3
trx 1
arfcn 870
max_power_red 24
rsl e1 line 0 timeslot 3 sub-slot full
rsl e1 tei 2
timeslot 0
phys_chan_config TCH/F
e1 line 0 timeslot 8 sub-slot 0
timeslot 1
phys_chan_config TCH/F
e1 line 0 timeslot 8 sub-slot 1
timeslot 2
phys_chan_config TCH/F
e1 line 0 timeslot 8 sub-slot 2
timeslot 3
phys_chan_config TCH/F
e1 line 0 timeslot 8 sub-slot 3
timeslot 4
phys_chan_config TCH/F
e1 line 0 timeslot 9 sub-slot 0
timeslot 5
phys_chan_config TCH/F
e1 line 0 timeslot 9 sub-slot 1
timeslot 6
phys_chan_config TCH/F
e1 line 0 timeslot 9 sub-slot 2
timeslot 7
phys_chan_config TCH/F
e1 line 0 timeslot 9 sub-slot 3
trx 2
arfcn 874
max_power_red 24
rsl e1 line 0 timeslot 4 sub-slot full
rsl e1 tei 3
timeslot 0
phys_chan_config TCH/F
e1 line 0 timeslot 10 sub-slot 0
timeslot 1
phys_chan_config TCH/F
e1 line 0 timeslot 10 sub-slot 1
timeslot 2
phys_chan_config TCH/F
e1 line 0 timeslot 10 sub-slot 2
timeslot 3
phys_chan_config TCH/F
e1 line 0 timeslot 10 sub-slot 3
timeslot 4
phys_chan_config TCH/F
e1 line 0 timeslot 11 sub-slot 0
timeslot 5
phys_chan_config TCH/F
e1 line 0 timeslot 11 sub-slot 1
timeslot 6
phys_chan_config TCH/F
e1 line 0 timeslot 11 sub-slot 2
timeslot 7
phys_chan_config TCH/F
e1 line 0 timeslot 11 sub-slot 3

@ -1,219 +0,0 @@
!
! OpenBSC (0.9.11.308-62d46) configuration saved from vty
!!
password foo
!
line vty
no login
!
network
network country code 262
mobile network code 42
short name OpenBSC
long name OpenBSC
auth policy closed
location updating reject cause 13
encryption a5 0
neci 0
paging any use tch 0
rrlp mode none
mm info 0
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 t3101 10
timer t3103 0
timer t3105 0
timer t3107 0
timer t3109 4
timer t3111 0
timer t3113 60
timer t3115 0
timer t3117 0
timer t3119 0
timer t3122 0
timer t3141 0
bts 0
type rbs2000
band GSM900
cell_identity 0
location_area_code 1
training_sequence_code 7
base_station_id_code 63
ms max power 15
cell reselection hysteresis 4
rxlev access min 0
channel allocator descending
rach tx integer 9
rach max transmission 7
oml e1 line 0 timeslot 1 sub-slot full
oml e1 tei 62
neighbor-list mode automatic
gprs mode none
is-connection-list add 4 512 12
is-connection-list add 16 524 12
is-connection-list add 28 536 12
is-connection-list add 40 548 12
trx 0
rf_locked 0
arfcn 55
nominal power 24
max_power_red 12
rsl e1 line 0 timeslot 1 sub-slot full
rsl e1 tei 0
timeslot 0
phys_chan_config CCCH+SDCCH4
hopping enabled 0
e1 line 0 timeslot 1 sub-slot full
timeslot 1
phys_chan_config TCH/F
hopping enabled 0
e1 line 0 timeslot 2 sub-slot 1
timeslot 2
phys_chan_config TCH/F
hopping enabled 0
e1 line 0 timeslot 2 sub-slot 2
timeslot 3
phys_chan_config TCH/F
hopping enabled 0
e1 line 0 timeslot 2 sub-slot 3
timeslot 4
phys_chan_config TCH/F
hopping enabled 0
e1 line 0 timeslot 3 sub-slot 0
timeslot 5
phys_chan_config TCH/F
hopping enabled 0
e1 line 0 timeslot 3 sub-slot 1
timeslot 6
phys_chan_config TCH/F
hopping enabled 0
e1 line 0 timeslot 3 sub-slot 2
timeslot 7
phys_chan_config TCH/F
hopping enabled 0
e1 line 0 timeslot 3 sub-slot 3
trx 1
rf_locked 0
arfcn 57
nominal power 24
max_power_red 12
rsl e1 line 0 timeslot 4 sub-slot full
rsl e1 tei 1
timeslot 0
phys_chan_config TCH/F
hopping enabled 0
e1 line 0 timeslot 5 sub-slot 0
timeslot 1
phys_chan_config TCH/F
hopping enabled 0
e1 line 0 timeslot 5 sub-slot 1
timeslot 2
phys_chan_config TCH/F
hopping enabled 0
e1 line 0 timeslot 5 sub-slot 2
timeslot 3
phys_chan_config TCH/F
hopping enabled 0
e1 line 0 timeslot 5 sub-slot 3
timeslot 4
phys_chan_config TCH/F
hopping enabled 0
e1 line 0 timeslot 6 sub-slot 0
timeslot 5
phys_chan_config TCH/F
hopping enabled 0
e1 line 0 timeslot 6 sub-slot 1
timeslot 6
phys_chan_config TCH/F
hopping enabled 0
e1 line 0 timeslot 6 sub-slot 2
timeslot 7
phys_chan_config TCH/F
hopping enabled 0
e1 line 0 timeslot 6 sub-slot 3
trx 2
rf_locked 0
arfcn 59
nominal power 24
max_power_red 12
rsl e1 line 0 timeslot 7 sub-slot full
rsl e1 tei 2
timeslot 0
phys_chan_config TCH/F
hopping enabled 0
e1 line 0 timeslot 8 sub-slot 0
timeslot 1
phys_chan_config TCH/F
hopping enabled 0
e1 line 0 timeslot 8 sub-slot 1
timeslot 2
phys_chan_config TCH/F
hopping enabled 0
e1 line 0 timeslot 8 sub-slot 2
timeslot 3
phys_chan_config TCH/F
hopping enabled 0
e1 line 0 timeslot 8 sub-slot 3
timeslot 4
phys_chan_config TCH/F
hopping enabled 0
e1 line 0 timeslot 9 sub-slot 0
timeslot 5
phys_chan_config TCH/F
hopping enabled 0
e1 line 0 timeslot 9 sub-slot 1
timeslot 6
phys_chan_config TCH/F
hopping enabled 0
e1 line 0 timeslot 9 sub-slot 2
timeslot 7
phys_chan_config TCH/F
hopping enabled 0
e1 line 0 timeslot 9 sub-slot 3
trx 3
rf_locked 0
arfcn 61
nominal power 24
max_power_red 12
rsl e1 line 0 timeslot 10 sub-slot full
rsl e1 tei 3
timeslot 0
phys_chan_config TCH/F
hopping enabled 0
e1 line 0 timeslot 11 sub-slot 0
timeslot 1
phys_chan_config TCH/F
hopping enabled 0
e1 line 0 timeslot 11 sub-slot 1
timeslot 2
phys_chan_config TCH/F
hopping enabled 0
e1 line 0 timeslot 11 sub-slot 2
timeslot 3
phys_chan_config TCH/F
hopping enabled 0
e1 line 0 timeslot 11 sub-slot 3
timeslot 4
phys_chan_config TCH/F
hopping enabled 0
e1 line 0 timeslot 12 sub-slot 0
timeslot 5
phys_chan_config TCH/F
hopping enabled 0
e1 line 0 timeslot 12 sub-slot 1
timeslot 6
phys_chan_config TCH/F
hopping enabled 0
e1 line 0 timeslot 12 sub-slot 2
timeslot 7
phys_chan_config TCH/F
hopping enabled 0
e1 line 0 timeslot 12 sub-slot 3
e1_input
e1_line 0 driver dahdi

@ -1,77 +0,0 @@
!
! OpenBSC configuration saved from vty
! !
password foo
!
line vty
no login
!
e1_input
e1_line 0 driver ipa
network
network country code 1
mobile network code 1
short name OpenBSC
long name OpenBSC
auth policy closed
location updating reject cause 13
encryption a5 0
neci 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 t3101 10
timer t3103 0
timer t3105 0
timer t3107 0
timer t3109 4
timer t3111 0
timer t3113 60
timer t3115 0
timer t3117 0
timer t3119 0
timer t3141 0
bts 0
type sysmobts
band DCS1800
cell_identity 0
location_area_code 1
training_sequence_code 7
base_station_id_code 63
ms max power 15
cell reselection hysteresis 4
rxlev access min 0
channel allocator ascending
rach tx integer 9
rach max transmission 7
ip.access unit_id 1801 0
oml ip.access stream_id 255 line 0
gprs mode none
trx 0
rf_locked 0
arfcn 514
nominal power 23
max_power_red 20
rsl e1 tei 0
timeslot 0
phys_chan_config CCCH+SDCCH4
timeslot 1
phys_chan_config SDCCH8
timeslot 2
phys_chan_config TCH/F
timeslot 3
phys_chan_config TCH/F
timeslot 4
phys_chan_config TCH/F
timeslot 5
phys_chan_config TCH/F
timeslot 6
phys_chan_config TCH/F
timeslot 7
phys_chan_config TCH/F

@ -14,6 +14,7 @@ noinst_HEADERS = \
bss.h \
bts_ipaccess_nanobts_omlattr.h \
chan_alloc.h \
common.h \
common_bsc.h \
common_cs.h \
crc24.h \
@ -46,11 +47,14 @@ noinst_HEADERS = \
handover_decision.h \
ipaccess.h \
iu.h \
iucs.h \
iucs_ranap.h \
meas_feed.h \
meas_rep.h \
mgcp.h \
mgcp_internal.h \
mgcp_transcode.h \
mgcpgw_client.h \
misdn.h \
mncc.h \
mncc_int.h \

@ -0,0 +1,6 @@
#pragma once
enum nsap_addr_enc {
NSAP_ADDR_ENC_X213,
NSAP_ADDR_ENC_V4RAW,
};

@ -39,6 +39,7 @@ enum {
DV42BIS,
DPCU,
DVLR,
DIUCS,
Debug_LastEntry,
};

@ -30,6 +30,6 @@ int gprs_gmm_rx_resume(struct gprs_ra_id *raid, uint32_t tlli,
time_t gprs_max_time_to_idle(void);
int iu_rab_act_ps(uint8_t rab_id, struct sgsn_pdp_ctx *pdp, bool use_x213_nsap);
int iu_rab_act_ps(uint8_t rab_id, struct sgsn_pdp_ctx *pdp);
#endif /* _GPRS_GMM_H */

@ -13,8 +13,10 @@
#include <osmocom/crypt/auth.h>
#include <openbsc/common.h>
#include <openbsc/rest_octets.h>
#include <openbsc/common_cs.h>
#include <openbsc/mgcpgw_client.h>
/** annotations for msgb ownership */
#define __uses
@ -109,6 +111,10 @@ enum ran_type {
RAN_UTRAN_IU, /* 3G / Iu-interface (IuCS or IuPS) */
};
extern const struct value_string ran_type_names[];
static inline const char *ran_type_name(enum ran_type val)
{ return get_value_string(ran_type_names, val); }
struct gsm_classmark {
bool classmark1_set;
struct gsm48_classmark1 classmark1;
@ -190,7 +196,10 @@ struct gsm_subscriber_connection {
/* which Iu-CS connection, if any. */
struct {
struct ue_conn_ctx *ue_ctx;
int integrity_protection;
unsigned int mgcp_rtp_endpoint;
uint16_t mgcp_rtp_port_ue;
uint16_t mgcp_rtp_port_cn;
uint8_t rab_id;
} iu;
};
@ -371,6 +380,11 @@ struct gsm_network {
struct mncc_sock_state *mncc_state;
mncc_recv_cb_t mncc_recv;
struct llist_head upqueue;
/*
* TODO: Move the trans_list into the subscriber connection and
* create a pending list for MT transactions. These exist before
* we have a subscriber connection.
*/
struct llist_head trans_list;
struct bsc_api *bsc_api;
@ -441,6 +455,15 @@ struct gsm_network {
/* Periodic location update default value */
uint8_t t3212;
struct {
struct mgcpgw_client_conf conf;
struct mgcpgw_client *client;
} mgcpgw;
struct {
enum nsap_addr_enc rab_assign_addr_enc;
} iu;
};
struct osmo_esme;

@ -41,6 +41,9 @@ enum gsm_subscriber_update_reason {
struct subscr_request {
struct llist_head entry;
/* human readable label to be able to log pending request kinds */
const char *label;
/* the callback data */
gsm_cbfn *cbfn;
void *param;
@ -52,15 +55,14 @@ int subscr_update(struct vlr_subscr *vsub, int reason);
* Paging handling with authentication
*/
struct subscr_request *subscr_request_conn(struct vlr_subscr *vsub,
int channel_type,
gsm_cbfn *cbfn, void *param);
gsm_cbfn *cbfn, void *param,
const char *label);
void subscr_remove_request(struct subscr_request *req);
int subscr_rx_paging_response(struct msgb *msg,
struct gsm_subscriber_connection *conn);
int subscr_paging_dispatch(unsigned int hooknum, unsigned int event,
struct msgb *msg, void *data, void *param);
int msc_fake_paging_request(struct vlr_subscr *vsub);
void msc_fake_paging_request_stop(struct vlr_subscr *vsub);
#endif /* _GSM_SUBSCR_H */

@ -1,13 +1,25 @@
#pragma once
#include <stdbool.h>
#include <stdint.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/gsm/gsm48.h>
#include <openbsc/common.h>
struct sgsn_pdp_ctx;
struct msgb;
struct gprs_ra_id;
struct osmo_sccp_link;
struct gsm_auth_tuple;
struct RANAP_RAB_SetupOrModifiedItemIEs_s;
struct RANAP_GlobalRNC_ID;
struct RANAP_Cause;
/* Debugging switches from asn1c and osmo-iuh */
extern int asn_debug;
extern int asn1_xer_print;
struct ue_conn_ctx {
struct llist_head list;
@ -15,6 +27,7 @@ struct ue_conn_ctx {
uint32_t conn_id;
int integrity_active;
struct gprs_ra_id ra_id;
enum nsap_addr_enc rab_assign_addr_enc;
};
enum iu_event_type {
@ -54,5 +67,8 @@ int iu_rab_act(struct ue_conn_ctx *ue_ctx, struct msgb *msg);
int iu_rab_deact(struct ue_conn_ctx *ue_ctx, uint8_t rab_id);
int iu_tx_sec_mode_cmd(struct ue_conn_ctx *uectx, struct gsm_auth_tuple *tp,
int send_ck, int new_key);
int iu_tx_common_id(struct ue_conn_ctx *ue_ctx, const char *imsi);
int iu_tx_release(struct ue_conn_ctx *ctx, const struct RANAP_Cause *cause);
void iu_vty_init(int *asn_debug_p);
void iu_vty_init(int iu_parent_node, enum nsap_addr_enc *rab_assign_addr_enc);
int iu_vty_config_write(struct vty *vty, const char *indent);

@ -0,0 +1,7 @@
#pragma once
int gsm0408_rcvmsg_iucs(struct gsm_network *network, struct msgb *msg,
uint16_t *lac);
struct gsm_subscriber_connection *subscr_conn_lookup_iu(struct gsm_network *network,
struct ue_conn_ctx *ue);

@ -0,0 +1,7 @@
#pragma once
struct gsm_network;
struct ue_conn_ctx;
int iucs_rx_ranap_event(struct gsm_network *network,
struct ue_conn_ctx *ue_ctx, int type, void *data);

@ -170,6 +170,21 @@ enum mgcp_role {
MGCP_BSC_NAT,
};
enum mgcp_connection_mode {
MGCP_CONN_NONE = 0,
MGCP_CONN_RECV_ONLY = 1,
MGCP_CONN_SEND_ONLY = 2,
MGCP_CONN_RECV_SEND = MGCP_CONN_RECV_ONLY | MGCP_CONN_SEND_ONLY,
MGCP_CONN_LOOPBACK = 4 | MGCP_CONN_RECV_SEND,
};
extern const struct value_string mgcp_connection_mode_strs[];
static inline const char *mgcp_cmode_name(enum mgcp_connection_mode mode)
{
return get_value_string(mgcp_connection_mode_strs, mode);
}
struct mgcp_config {
int source_port;
char *local_ip;

@ -28,14 +28,6 @@
#define CI_UNUSED 0
enum mgcp_connection_mode {
MGCP_CONN_NONE = 0,
MGCP_CONN_RECV_ONLY = 1,
MGCP_CONN_SEND_ONLY = 2,
MGCP_CONN_RECV_SEND = MGCP_CONN_RECV_ONLY | MGCP_CONN_SEND_ONLY,
MGCP_CONN_LOOPBACK = 4 | MGCP_CONN_RECV_SEND,
};
enum mgcp_trunk_type {
MGCP_TRUNK_VIRTUAL,
MGCP_TRUNK_E1,
@ -340,3 +332,5 @@ static inline const char *mgcp_bts_src_addr(struct mgcp_endpoint *endp)
return endp->cfg->bts_ports.bind_addr;
return endp->cfg->source_addr;
}
int mgcp_msg_terminate_nul(struct msgb *msg);

@ -0,0 +1,87 @@
#pragma once
#include <stdint.h>
#include <osmocom/core/linuxlist.h>
enum mgcp_connection_mode;
struct msgb;
struct mgcpgw_client;
struct vty;
#define MGCPGW_CLIENT_LOCAL_ADDR_DEFAULT "0.0.0.0"
#define MGCPGW_CLIENT_LOCAL_PORT_DEFAULT 0
#define MGCPGW_CLIENT_REMOTE_ADDR_DEFAULT "127.0.0.1"
#define MGCPGW_CLIENT_REMOTE_PORT_DEFAULT 2427
#define MSGB_CB_MGCP_TRANS_ID 0
typedef unsigned int mgcp_trans_id_t;
struct mgcpgw_client_conf {
const char *local_addr;
int local_port;
const char *remote_addr;
int remote_port;
};
struct mgcp_response_head {
int response_code;
mgcp_trans_id_t trans_id;
const char *comment;
};
struct mgcp_response {
char *body;
struct mgcp_response_head head;
uint16_t audio_port;
};
/* Invoked when an MGCP response is received or sending failed. When the
* response is passed as NULL, this indicates failure during transmission. */
typedef void (* mgcp_response_cb_t )(struct mgcp_response *response, void *priv);
struct mgcp_response_pending {
struct llist_head entry;
mgcp_trans_id_t trans_id;
mgcp_response_cb_t response_cb;
void *priv;
};
void mgcpgw_client_conf_init(struct mgcpgw_client_conf *conf);