aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debian/control12
-rw-r--r--debian/osmo-bsc-doc.install1
-rwxr-xr-xdebian/rules6
-rw-r--r--doc/examples/osmo-bsc/osmo-bsc-minimal.cfg2
-rw-r--r--doc/examples/osmo-bsc/osmo-bsc.cfg4
-rw-r--r--doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg4
-rw-r--r--doc/manuals/Makefile.am2
-rw-r--r--doc/manuals/chapters/bts-examples.adoc8
-rw-r--r--doc/manuals/chapters/counters_generated.adoc196
-rw-r--r--doc/manuals/osmobsc-vty-reference.xml8
-rwxr-xr-xdoc/manuals/regen_doc.sh17
-rw-r--r--doc/manuals/vty/bsc_vty_reference.xml175
-rw-r--r--doc/manuals/vty/libbsc_vty_additions.xml6
-rw-r--r--include/osmocom/bsc/bsc_msc_data.h31
-rw-r--r--include/osmocom/bsc/gsm_data.h3
-rw-r--r--include/osmocom/bsc/osmo_bsc_sigtran.h9
-rw-r--r--include/osmocom/bsc/vty.h3
-rw-r--r--src/osmo-bsc/Makefile.am1
-rw-r--r--src/osmo-bsc/abis_nm.c4
-rw-r--r--src/osmo-bsc/bsc_subscr_conn_fsm.c17
-rw-r--r--src/osmo-bsc/bsc_vty.c57
-rw-r--r--src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c2
-rw-r--r--src/osmo-bsc/gsm_data.c1
-rw-r--r--src/osmo-bsc/osmo_bsc_ctrl.c59
-rw-r--r--src/osmo-bsc/osmo_bsc_mgcp.c92
-rw-r--r--src/osmo-bsc/osmo_bsc_msc.c31
-rw-r--r--src/osmo-bsc/osmo_bsc_sigtran.c11
-rw-r--r--tests/handover/Makefile.am20
28 files changed, 621 insertions, 161 deletions
diff --git a/debian/control b/debian/control
index 141cb5e..7410193 100644
--- a/debian/control
+++ b/debian/control
@@ -17,7 +17,8 @@ Build-Depends: debhelper (>=9),
libosmo-sigtran-dev (>= 0.10.0),
libosmo-abis-dev (>= 0.5.1),
libosmo-netif-dev (>= 0.3.0),
- libosmo-mgcp-client-dev (>= 1.4.0)
+ libosmo-mgcp-client-dev (>= 1.4.0),
+ osmo-gsm-manuals-dev
Standards-Version: 3.9.8
Vcs-Git: git://git.osmocom.org/osmo-bsc.git
Vcs-Browser: https://git.osmocom.org/osmo-bsc/
@@ -64,3 +65,12 @@ Architecture: any
Multi-Arch: foreign
Depends: ${misc:Depends}, ${shlibs:Depends}
Description: Command line utilities to manage measurement reports.
+
+Package: osmo-bsc-doc
+Architecture: all
+Section: doc
+Priority: optional
+Depends: ${misc:Depends}
+Description: ${misc:Package} PDF documentation
+ Various manuals: user manual, VTY reference manual and/or
+ protocol/interface manuals.
diff --git a/debian/osmo-bsc-doc.install b/debian/osmo-bsc-doc.install
new file mode 100644
index 0000000..b0e2cc4
--- /dev/null
+++ b/debian/osmo-bsc-doc.install
@@ -0,0 +1 @@
+usr/share/doc/osmo-bsc-doc/*.pdf
diff --git a/debian/rules b/debian/rules
index ffc99db..a6646c1 100755
--- a/debian/rules
+++ b/debian/rules
@@ -45,7 +45,7 @@
dh $@ --with autoreconf
# debmake generated override targets
-CONFIGURE_FLAGS += --with-systemdsystemunitdir=/lib/systemd/system
+CONFIGURE_FLAGS += --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals
override_dh_auto_configure:
dh_auto_configure -- $(CONFIGURE_FLAGS)
#
@@ -60,3 +60,7 @@ override_dh_strip:
# Print test results in case of a failure
override_dh_auto_test:
dh_auto_test || (find . -name testsuite.log -exec cat {} \; ; false)
+
+# Don't create .pdf.gz files (barely saves space and they can't be opened directly by most pdf readers)
+override_dh_compress:
+ dh_compress -X.pdf
diff --git a/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg b/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg
index 850e29c..f2597b8 100644
--- a/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg
+++ b/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg
@@ -5,7 +5,7 @@ network
type sysmobts
band GSM-1800
location_area_code 23
- ip.access unit_id 1800 0
+ ipa unit-id 1800 0
trx 0
rf_locked 0
arfcn 868
diff --git a/doc/examples/osmo-bsc/osmo-bsc.cfg b/doc/examples/osmo-bsc/osmo-bsc.cfg
index eec154d..926951b 100644
--- a/doc/examples/osmo-bsc/osmo-bsc.cfg
+++ b/doc/examples/osmo-bsc/osmo-bsc.cfg
@@ -36,8 +36,8 @@ network
channel-descrption bs-pa-mfrms 5
channel-descrption bs-ag-blks-res 1
early-classmark-sending forbidden
- ip.access unit_id 0 0
- oml ip.access stream_id 255 line 0
+ ipa unit-id 0 0
+ oml ipa stream-id 255 line 0
codec-support fr
gprs mode none
trx 0
diff --git a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
index fd3a349..80a38ba 100644
--- a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
+++ b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
@@ -35,8 +35,8 @@ network
channel-descrption bs-pa-mfrms 5
channel-descrption bs-ag-blks-res 1
early-classmark-sending forbidden
- ip.access unit_id 0 0
- oml ip.access stream_id 255 line 0
+ ipa unit-id 0 0
+ oml ipa stream-id 255 line 0
codec-support fr
gprs mode none
trx 0
diff --git a/doc/manuals/Makefile.am b/doc/manuals/Makefile.am
index 482c1ab..6542393 100644
--- a/doc/manuals/Makefile.am
+++ b/doc/manuals/Makefile.am
@@ -9,6 +9,7 @@ EXTRA_DIST = aoip-mgw-options.adoc \
message-sequences \
mgw \
om2000 \
+ regen_doc.sh \
vty
if BUILD_MANUALS
@@ -20,5 +21,6 @@ if BUILD_MANUALS
VTY_REFERENCE = osmobsc-vty-reference.xml
include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.vty-reference.inc
+ OSMO_REPOSITORY = osmo-bsc
include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc
endif
diff --git a/doc/manuals/chapters/bts-examples.adoc b/doc/manuals/chapters/bts-examples.adoc
index 2dd8b37..58cb3ab 100644
--- a/doc/manuals/chapters/bts-examples.adoc
+++ b/doc/manuals/chapters/bts-examples.adoc
@@ -35,8 +35,8 @@ network
channel allocator ascending
rach tx integer 9
rach max transmission 7
- ip.access unit_id 1801 0 <4>
- oml ip.access stream_id 255 line 0
+ ipa unit-id 1801 0 <4>
+ oml ipa stream-id 255 line 0
gprs mode none
trx 0
rf_locked 0
@@ -113,8 +113,8 @@ network
channel allocator ascending
rach tx integer 9
rach max transmission 7
- ip.access unit_id 1800 0 <1>
- oml ip.access stream_id 255 line 0
+ ipa unit-id 1800 0 <1>
+ oml ipa stream-id 255 line 0
gprs mode none
trx 0
rf_locked 0
diff --git a/doc/manuals/chapters/counters_generated.adoc b/doc/manuals/chapters/counters_generated.adoc
index d55df07..65f4ca4 100644
--- a/doc/manuals/chapters/counters_generated.adoc
+++ b/doc/manuals/chapters/counters_generated.adoc
@@ -1,7 +1,88 @@
+
// autogenerated by show asciidoc counters
-These counters and their description based on OsmoBSC (OsmoBSC).
+These counters and their description based on OsmoBSC 1.4.0.84-3f1f8 (OsmoBSC).
+
+=== Rate Counters
// generating tables for rate_ctr_group
+// rate_ctr_group table base transceiver station
+.bts - base transceiver station
+[options="header"]
+|===
+| Name | Reference | Description
+| chreq:total | <<bts_chreq:total>> | Received channel requests.
+| chreq:no_channel | <<bts_chreq:no_channel>> | Sent to MS no channel available.
+| chan:rf_fail | <<bts_chan:rf_fail>> | Received a RF failure indication from BTS.
+| chan:rll_err | <<bts_chan:rll_err>> | Received a RLL failure with T200 cause from BTS.
+| oml_fail | <<bts_oml_fail>> | Received a TEI down on a OML link.
+| rsl_fail | <<bts_rsl_fail>> | Received a TEI down on a OML link.
+| codec:amr_f | <<bts_codec:amr_f>> | Count the usage of AMR/F codec by channel mode requested.
+| codec:amr_h | <<bts_codec:amr_h>> | Count the usage of AMR/H codec by channel mode requested.
+| codec:efr | <<bts_codec:efr>> | Count the usage of EFR codec by channel mode requested.
+| codec:fr | <<bts_codec:fr>> | Count the usage of FR codec by channel mode requested.
+| codec:hr | <<bts_codec:hr>> | Count the usage of HR codec by channel mode requested.
+| paging:attempted | <<bts_paging:attempted>> | Paging attempts for a subscriber.
+| paging:already | <<bts_paging:already>> | Paging attempts ignored as subsciber was already being paged.
+| paging:responded | <<bts_paging:responded>> | Paging attempts with successful paging response.
+| paging:expired | <<bts_paging:expired>> | Paging Request expired because of timeout T3113.
+| chan_act:total | <<bts_chan_act:total>> | Total number of Channel Activations.
+| chan_act:nack | <<bts_chan_act:nack>> | Number of Channel Activations that the BTS NACKed
+| rsl:unknown | <<bts_rsl:unknown>> | Number of unknown/unsupported RSL messages received from BTS
+| rsl:ipa_nack | <<bts_rsl:ipa_nack>> | Number of IPA (RTP/dyn-PDCH) related NACKs received from BTS
+| chan:mode_modify_nack | <<bts_chan:mode_modify_nack>> | Number of Channel Mode Modify NACKs received from BTS
+|===
+// rate_ctr_group table base transceiver station
+.bts - base transceiver station
+[options="header"]
+|===
+| Name | Reference | Description
+| chreq:total | <<bts_chreq:total>> | Received channel requests.
+| chreq:no_channel | <<bts_chreq:no_channel>> | Sent to MS no channel available.
+| chan:rf_fail | <<bts_chan:rf_fail>> | Received a RF failure indication from BTS.
+| chan:rll_err | <<bts_chan:rll_err>> | Received a RLL failure with T200 cause from BTS.
+| oml_fail | <<bts_oml_fail>> | Received a TEI down on a OML link.
+| rsl_fail | <<bts_rsl_fail>> | Received a TEI down on a OML link.
+| codec:amr_f | <<bts_codec:amr_f>> | Count the usage of AMR/F codec by channel mode requested.
+| codec:amr_h | <<bts_codec:amr_h>> | Count the usage of AMR/H codec by channel mode requested.
+| codec:efr | <<bts_codec:efr>> | Count the usage of EFR codec by channel mode requested.
+| codec:fr | <<bts_codec:fr>> | Count the usage of FR codec by channel mode requested.
+| codec:hr | <<bts_codec:hr>> | Count the usage of HR codec by channel mode requested.
+| paging:attempted | <<bts_paging:attempted>> | Paging attempts for a subscriber.
+| paging:already | <<bts_paging:already>> | Paging attempts ignored as subsciber was already being paged.
+| paging:responded | <<bts_paging:responded>> | Paging attempts with successful paging response.
+| paging:expired | <<bts_paging:expired>> | Paging Request expired because of timeout T3113.
+| chan_act:total | <<bts_chan_act:total>> | Total number of Channel Activations.
+| chan_act:nack | <<bts_chan_act:nack>> | Number of Channel Activations that the BTS NACKed
+| rsl:unknown | <<bts_rsl:unknown>> | Number of unknown/unsupported RSL messages received from BTS
+| rsl:ipa_nack | <<bts_rsl:ipa_nack>> | Number of IPA (RTP/dyn-PDCH) related NACKs received from BTS
+| chan:mode_modify_nack | <<bts_chan:mode_modify_nack>> | Number of Channel Mode Modify NACKs received from BTS
+|===
+// rate_ctr_group table base transceiver station
+.bts - base transceiver station
+[options="header"]
+|===
+| Name | Reference | Description
+| chreq:total | <<bts_chreq:total>> | Received channel requests.
+| chreq:no_channel | <<bts_chreq:no_channel>> | Sent to MS no channel available.
+| chan:rf_fail | <<bts_chan:rf_fail>> | Received a RF failure indication from BTS.
+| chan:rll_err | <<bts_chan:rll_err>> | Received a RLL failure with T200 cause from BTS.
+| oml_fail | <<bts_oml_fail>> | Received a TEI down on a OML link.
+| rsl_fail | <<bts_rsl_fail>> | Received a TEI down on a OML link.
+| codec:amr_f | <<bts_codec:amr_f>> | Count the usage of AMR/F codec by channel mode requested.
+| codec:amr_h | <<bts_codec:amr_h>> | Count the usage of AMR/H codec by channel mode requested.
+| codec:efr | <<bts_codec:efr>> | Count the usage of EFR codec by channel mode requested.
+| codec:fr | <<bts_codec:fr>> | Count the usage of FR codec by channel mode requested.
+| codec:hr | <<bts_codec:hr>> | Count the usage of HR codec by channel mode requested.
+| paging:attempted | <<bts_paging:attempted>> | Paging attempts for a subscriber.
+| paging:already | <<bts_paging:already>> | Paging attempts ignored as subsciber was already being paged.
+| paging:responded | <<bts_paging:responded>> | Paging attempts with successful paging response.
+| paging:expired | <<bts_paging:expired>> | Paging Request expired because of timeout T3113.
+| chan_act:total | <<bts_chan_act:total>> | Total number of Channel Activations.
+| chan_act:nack | <<bts_chan_act:nack>> | Number of Channel Activations that the BTS NACKed
+| rsl:unknown | <<bts_rsl:unknown>> | Number of unknown/unsupported RSL messages received from BTS
+| rsl:ipa_nack | <<bts_rsl:ipa_nack>> | Number of IPA (RTP/dyn-PDCH) related NACKs received from BTS
+| chan:mode_modify_nack | <<bts_chan:mode_modify_nack>> | Number of Channel Mode Modify NACKs received from BTS
+|===
// rate_ctr_group table E1 Input subsystem
.e1inp - E1 Input subsystem
[options="header"]
@@ -18,59 +99,74 @@ These counters and their description based on OsmoBSC (OsmoBSC).
[options="header"]
|===
| Name | Reference | Description
-| chreq:total | <<bsc_chreq:total>> | Received channel requests.
-| chreq:no_channel | <<bsc_chreq:no_channel>> | Sent to MS no channel available.
-| handover:attempted | <<bsc_handover:attempted>> | Received handover attempts.
-| handover:no_channel | <<bsc_handover:no_channel>> | Sent no channel available responses.
-| handover:timeout | <<bsc_handover:timeout>> | Count the amount of timeouts of timer T3103.
-| handover:completed | <<bsc_handover:completed>> | Received handover completed.
-| handover:failed | <<bsc_handover:failed>> | Receive HO FAIL messages.
-| paging:attempted | <<bsc_paging:attempted>> | Paging attempts for a MS.
-| paging:detached | <<bsc_paging:detached>> | Counts the amount of paging attempts which couldn't sent out any paging request because no responsible bts found.
-| paging:completed | <<bsc_paging:completed>> | Paging successful completed.
-| paging:expired | <<bsc_paging:expired>> | Paging Request expired because of timeout T3113.
-| chan:rf_fail | <<bsc_chan:rf_fail>> | Received a RF failure indication from BTS.
-| chan:rll_err | <<bsc_chan:rll_err>> | Received a RLL failure with T200 cause from BTS.
-| bts:oml_fail | <<bsc_bts:oml_fail>> | Received a TEI down on a OML link.
-| bts:rsl_fail | <<bsc_bts:rsl_fail>> | Received a TEI down on a OML link.
-| bts:codec_amr_f | <<bsc_bts:codec_amr_f>> | Count the usage of AMR/F codec by channel mode requested.
-| bts:codec_amr_h | <<bsc_bts:codec_amr_h>> | Count the usage of AMR/H codec by channel mode requested.
-| bts:codec_efr | <<bsc_bts:codec_efr>> | Count the usage of EFR codec by channel mode requested.
-| bts:codec_fr | <<bsc_bts:codec_fr>> | Count the usage of FR codec by channel mode requested.
-| bts:codec_hr | <<bsc_bts:codec_hr>> | Count the usage of HR codec by channel mode requested.
-|===
-// rate_ctr_group table mobile switching center
-.msc - mobile switching center
+| assignment:attempted | <<bsc_assignment:attempted>> | Assignment attempts.
+| assignment:completed | <<bsc_assignment:completed>> | Assignment completed.
+| assignment:stopped | <<bsc_assignment:stopped>> | Connection ended during Assignment.
+| assignment:no_channel | <<bsc_assignment:no_channel>> | Failure to allocate lchan for Assignment.
+| assignment:timeout | <<bsc_assignment:timeout>> | Assignment timed out.
+| assignment:failed | <<bsc_assignment:failed>> | Received Assignment Failure message.
+| assignment:error | <<bsc_assignment:error>> | Assigment failed for other reason.
+| handover:attempted | <<bsc_handover:attempted>> | Intra-BSC handover attempts.
+| handover:completed | <<bsc_handover:completed>> | Intra-BSC handover completed.
+| handover:stopped | <<bsc_handover:stopped>> | Connection ended during HO.
+| handover:no_channel | <<bsc_handover:no_channel>> | Failure to allocate lchan for HO.
+| handover:timeout | <<bsc_handover:timeout>> | Handover timed out.
+| handover:failed | <<bsc_handover:failed>> | Received Handover Fail messages.
+| handover:error | <<bsc_handover:error>> | Re-assigment failed for other reason.
+| interbsc_ho_out:attempted | <<bsc_interbsc_ho_out:attempted>> | Attempts to handover to remote BSS.
+| interbsc_ho_out:completed | <<bsc_interbsc_ho_out:completed>> | Handover to remote BSS completed.
+| interbsc_ho_out:stopped | <<bsc_interbsc_ho_out:stopped>> | Connection ended during HO.
+| interbsc_ho_out:timeout | <<bsc_interbsc_ho_out:timeout>> | Handover timed out.
+| interbsc_ho_out:error | <<bsc_interbsc_ho_out:error>> | Handover to remote BSS failed for other reason.
+| interbsc_ho_in:attempted | <<bsc_interbsc_ho_in:attempted>> | Attempts to handover from remote BSS.
+| interbsc_ho_in:completed | <<bsc_interbsc_ho_in:completed>> | Handover from remote BSS completed.
+| interbsc_ho_in:stopped | <<bsc_interbsc_ho_in:stopped>> | Connection ended during HO.
+| interbsc_ho_in:no_channel | <<bsc_interbsc_ho_in:no_channel>> | Failure to allocate lchan for HO.
+| interbsc_ho_in:failed | <<bsc_interbsc_ho_in:failed>> | Received Handover Fail message.
+| interbsc_ho_in:timeout | <<bsc_interbsc_ho_in:timeout>> | Handover from remote BSS timed out.
+| interbsc_ho_in:error | <<bsc_interbsc_ho_in:error>> | Handover from remote BSS failed for other reason.
+| paging:attempted | <<bsc_paging:attempted>> | Paging attempts for a subscriber.
+| paging:detached | <<bsc_paging:detached>> | Paging request send failures because no responsible BTS was found.
+| paging:responded | <<bsc_paging:responded>> | Paging attempts with successful response.
+| abis:unknown_unit_id | <<bsc_abis:unknown_unit_id>> | Connection attempts from unknown IPA CCM Unit ID.
+|===
+== Osmo Stat Items
+
+// generating tables for osmo_stat_items
+base transceiver station
+// osmo_stat_item_group table base transceiver station
+.bts - base transceiver station
[options="header"]
|===
-| Name | Reference | Description
-| loc_update_type:attach | <<msc_loc_update_type:attach>> | Received location update imsi attach requests.
-| loc_update_type:normal | <<msc_loc_update_type:normal>> | Received location update normal requests.
-| loc_update_type:periodic | <<msc_loc_update_type:periodic>> | Received location update periodic requests.
-| loc_update_type:detach | <<msc_loc_update_type:detach>> | Received location update detach indication.
-| loc_update_resp:failed | <<msc_loc_update_resp:failed>> | Rejected location updates.
-| loc_update_resp:completed | <<msc_loc_update_resp:completed>> | Successful location updates.
-| sms:submitted | <<msc_sms:submitted>> | Received a RPDU from a MS (MO).
-| sms:no_receiver | <<msc_sms:no_receiver>> | Counts SMS which couldn't routed because no receiver found.
-| sms:delivered | <<msc_sms:delivered>> | Global SMS Deliver attempts.
-| sms:rp_err_mem | <<msc_sms:rp_err_mem>> | CAUSE_MT_MEM_EXCEEDED errors of MS responses on a sms deliver attempt.
-| sms:rp_err_other | <<msc_sms:rp_err_other>> | Other error of MS responses on a sms delive attempt.
-| sms:deliver_unknown_error | <<msc_sms:deliver_unknown_error>> | Unknown error occured during sms delivery.
-| call:mo_setup | <<msc_call:mo_setup>> | Received setup requests from a MS to init a MO call.
-| call:mo_connect_ack | <<msc_call:mo_connect_ack>> | Received a connect ack from MS of a MO call. Call is now succesful connected up.
-| call:mt_setup | <<msc_call:mt_setup>> | Sent setup requests to the MS (MT).
-| call:mt_connect | <<msc_call:mt_connect>> | Sent a connect to the MS (MT).
-| call:active | <<msc_call:active>> | Count total amount of calls that ever reached active state.
-| call:complete | <<msc_call:complete>> | Count total amount of calls which got terminated by disconnect req or ind after reaching active state.
-| call:incomplete | <<msc_call:incomplete>> | Count total amount of call which got terminated by any other reason after reaching active state.
+| Name | Reference | Description | Unit
+| chanloadavg | <<bts_chanloadavg>> | Channel load average. | %
+| T3122 | <<bts_T3122>> | T3122 IMMEDIATE ASSIGNMENT REJECT wait indicator. | s
+| rach_busy | <<bts_rach_busy>> | RACH slots with signal above threshold | %
+| rach_access | <<bts_rach_access>> | RACH slots with access bursts in them | %
|===
-// generating tables for osmo_stat_items
-// generating tables for osmo_counters
-// ungrouped osmo_counters
-.ungrouped osmo counters
+base transceiver station
+// osmo_stat_item_group table base transceiver station
+.bts - base transceiver station
[options="header"]
|===
-| Name | Reference | Description
-| msc.active_calls | <<ungroup_counter_msc.active_calls>> |
+| Name | Reference | Description | Unit
+| chanloadavg | <<bts_chanloadavg>> | Channel load average. | %
+| T3122 | <<bts_T3122>> | T3122 IMMEDIATE ASSIGNMENT REJECT wait indicator. | s
+| rach_busy | <<bts_rach_busy>> | RACH slots with signal above threshold | %
+| rach_access | <<bts_rach_access>> | RACH slots with access bursts in them | %
+|===
+base transceiver station
+// osmo_stat_item_group table base transceiver station
+.bts - base transceiver station
+[options="header"]
+|===
+| Name | Reference | Description | Unit
+| chanloadavg | <<bts_chanloadavg>> | Channel load average. | %
+| T3122 | <<bts_T3122>> | T3122 IMMEDIATE ASSIGNMENT REJECT wait indicator. | s
+| rach_busy | <<bts_rach_busy>> | RACH slots with signal above threshold | %
+| rach_access | <<bts_rach_access>> | RACH slots with access bursts in them | %
|===
+== Osmo Counters
+// generating tables for osmo_counters
+// there are no ungrouped osmo_counters
diff --git a/doc/manuals/osmobsc-vty-reference.xml b/doc/manuals/osmobsc-vty-reference.xml
index f51e56e..ec3022c 100644
--- a/doc/manuals/osmobsc-vty-reference.xml
+++ b/doc/manuals/osmobsc-vty-reference.xml
@@ -24,12 +24,18 @@
<authorinitials>hf</authorinitials>
<revremark>Update to match osmo-bsc version 0.13.0-305</revremark>
</revision>
+ <revision>
+ <revnumber>v3</revnumber>
+ <date>6th June 2019</date>
+ <authorinitials>dw</authorinitials>
+ <revremark>Update to match osmo-bsc version 1.4.0.84-3f1f</revremark>
+ </revision>
</revhistory>
<title>OsmoBSC VTY Reference</title>
<copyright>
- <year>2012-2014</year>
+ <year>2012-2019</year>
</copyright>
<legalnotice>
diff --git a/doc/manuals/regen_doc.sh b/doc/manuals/regen_doc.sh
new file mode 100755
index 0000000..2f9ef74
--- /dev/null
+++ b/doc/manuals/regen_doc.sh
@@ -0,0 +1,17 @@
+#!/bin/sh -x
+
+if [ -z "$DOCKER_PLAYGROUND" ]; then
+ echo "You need to set DOCKER_PLAYGROUND"
+ exit 1
+fi
+
+SCRIPT=$(realpath "$0")
+MANUAL_DIR=$(dirname "$SCRIPT")
+
+COMMIT=${COMMIT:-$(git log -1 --format=format:%H)}
+
+cd "$DOCKER_PLAYGROUND/scripts" || exit 1
+
+OSMO_BSC_BRANCH=$COMMIT ./regen_doc.sh osmo-bsc 4242 \
+ "$MANUAL_DIR/chapters/counters_generated.adoc" \
+ "$MANUAL_DIR/vty/bsc_vty_reference.xml"
diff --git a/doc/manuals/vty/bsc_vty_reference.xml b/doc/manuals/vty/bsc_vty_reference.xml
index f56b951..4d25e69 100644
--- a/doc/manuals/vty/bsc_vty_reference.xml
+++ b/doc/manuals/vty/bsc_vty_reference.xml
@@ -152,6 +152,14 @@
<param name='[&lt;0-255&gt;]' doc='TRX Number' />
</params>
</command>
+ <command id='show trx (connected|disconnected)'>
+ <params>
+ <param name='show' doc='Show running system information' />
+ <param name='trx' doc='Display information about a TRX' />
+ <param name='connected' doc='Show TRX with RSL connected' />
+ <param name='disconnected' doc='Show TRX with RSL disconnected' />
+ </params>
+ </command>
<command id='show timeslot [&lt;0-255&gt;] [&lt;0-255&gt;] [&lt;0-7&gt;]'>
<params>
<param name='show' doc='Show running system information' />
@@ -175,13 +183,31 @@
<params>
<param name='show' doc='Show running system information' />
<param name='lchan' doc='Display information about a logical channel' />
- <param name='summary' doc='Short summary' />
+ <param name='summary' doc='Short summary (used lchans)' />
+ <param name='[&lt;0-255&gt;]' doc='BTS Number' />
+ <param name='[&lt;0-255&gt;]' doc='TRX Number' />
+ <param name='[&lt;0-7&gt;]' doc='Timeslot Number' />
+ <param name='[&lt;0-7&gt;]' doc='Logical Channel Number' />
+ </params>
+ </command>
+ <command id='show lchan summary-all [&lt;0-255&gt;] [&lt;0-255&gt;] [&lt;0-7&gt;] [&lt;0-7&gt;]'>
+ <params>
+ <param name='show' doc='Show running system information' />
+ <param name='lchan' doc='Display information about a logical channel' />
+ <param name='summary-all' doc='Short summary (all lchans)' />
<param name='[&lt;0-255&gt;]' doc='BTS Number' />
<param name='[&lt;0-255&gt;]' doc='TRX Number' />
<param name='[&lt;0-7&gt;]' doc='Timeslot Number' />
<param name='[&lt;0-7&gt;]' doc='Logical Channel Number' />
</params>
</command>
+ <command id='show timer [TNNNN]'>
+ <params>
+ <param name='show' doc='Show running system information' />
+ <param name='timer' doc='Show timers' />
+ <param name='[TNNNN]' doc='T- or X-timer-number -- 3GPP compliant timer number of the format &apos;1234&apos; or &apos;T1234&apos; or &apos;t1234&apos;; Osmocom-specific timer number of the format: &apos;X1234&apos; or &apos;x1234&apos;.' />
+ </params>
+ </command>
<command id='show conns'>
<params>
<param name='show' doc='Show running system information' />
@@ -294,7 +320,7 @@
<param name='MASK' doc='List of logging categories to log, e.g. &apos;abc:mno:xyz&apos;. Available log categories depend on the specific application, refer to the &apos;logging level&apos; command. Optionally add individual log levels like &apos;abc,1:mno,3:xyz,5&apos;, where the level numbers are LOGL_DEBUG=1 LOGL_INFO=3 LOGL_NOTICE=5 LOGL_ERROR=7 LOGL_FATAL=8' />
</params>
</command>
- <command id='logging level (rll|mm|rr|rsl|nm|pag|meas|msc|ho|hodec|ref|nat|ctrl|filter|pcu|lcls|chan|ts|as|lglobal|llapd|linp|lmux|lmi|lmib|lsms|lctrl|lgtp|lstats|lgsup|loap|lss7|lsccp|lsua|lm3ua|lmgcp|ljibuf) (debug|info|notice|error|fatal)'>
+ <command id='logging level (rll|mm|rr|rsl|nm|pag|meas|msc|ho|hodec|ref|nat|ctrl|filter|pcu|lcls|chan|ts|as|lglobal|llapd|linp|lmux|lmi|lmib|lsms|lctrl|lgtp|lstats|lgsup|loap|lss7|lsccp|lsua|lm3ua|lmgcp|ljibuf|lrspro) (debug|info|notice|error|fatal)'>
<params>
<param name='logging' doc='Configure logging' />
<param name='level' doc='Set the log level for a specified category' />
@@ -335,6 +361,7 @@
<param name='lm3ua' doc='libosmo-sigtran MTP3 User Adaptation' />
<param name='lmgcp' doc='libosmo-mgcp Media Gateway Control Protocol' />
<param name='ljibuf' doc='libosmo-netif Jitter Buffer' />
+ <param name='lrspro' doc='Remote SIM protocol' />
<param name='debug' doc='Log debug messages and higher levels' />
<param name='info' doc='Log informational messages and higher levels' />
<param name='notice' doc='Log noticeable messages and higher levels' />
@@ -424,13 +451,6 @@
<param name='REGEXP' doc='Regular expression' />
</params>
</command>
- <command id='show timer [TNNNN]'>
- <params>
- <param name='show' doc='Show running system information' />
- <param name='timer' doc='GSM Timers' />
- <param name='[TNNNN]' doc='Specific timer to show, or all timers if omitted.' />
- </params>
- </command>
<command id='show bts &lt;0-255&gt; neighbor arfcn &lt;0-1023&gt; bsic (&lt;0-63&gt;|any)'>
<params>
<param name='show' doc='Show running system information' />
@@ -759,6 +779,14 @@
<param name='[&lt;0-255&gt;]' doc='TRX Number' />
</params>
</command>
+ <command id='show trx (connected|disconnected)'>
+ <params>
+ <param name='show' doc='Show running system information' />
+ <param name='trx' doc='Display information about a TRX' />
+ <param name='connected' doc='Show TRX with RSL connected' />
+ <param name='disconnected' doc='Show TRX with RSL disconnected' />
+ </params>
+ </command>
<command id='show timeslot [&lt;0-255&gt;] [&lt;0-255&gt;] [&lt;0-7&gt;]'>
<params>
<param name='show' doc='Show running system information' />
@@ -782,13 +810,31 @@
<params>
<param name='show' doc='Show running system information' />
<param name='lchan' doc='Display information about a logical channel' />
- <param name='summary' doc='Short summary' />
+ <param name='summary' doc='Short summary (used lchans)' />
<param name='[&lt;0-255&gt;]' doc='BTS Number' />
<param name='[&lt;0-255&gt;]' doc='TRX Number' />
<param name='[&lt;0-7&gt;]' doc='Timeslot Number' />
<param name='[&lt;0-7&gt;]' doc='Logical Channel Number' />
</params>
</command>
+ <command id='show lchan summary-all [&lt;0-255&gt;] [&lt;0-255&gt;] [&lt;0-7&gt;] [&lt;0-7&gt;]'>
+ <params>
+ <param name='show' doc='Show running system information' />
+ <param name='lchan' doc='Display information about a logical channel' />
+ <param name='summary-all' doc='Short summary (all lchans)' />
+ <param name='[&lt;0-255&gt;]' doc='BTS Number' />
+ <param name='[&lt;0-255&gt;]' doc='TRX Number' />
+ <param name='[&lt;0-7&gt;]' doc='Timeslot Number' />
+ <param name='[&lt;0-7&gt;]' doc='Logical Channel Number' />
+ </params>
+ </command>
+ <command id='show timer [TNNNN]'>
+ <params>
+ <param name='show' doc='Show running system information' />
+ <param name='timer' doc='Show timers' />
+ <param name='[TNNNN]' doc='T- or X-timer-number -- 3GPP compliant timer number of the format &apos;1234&apos; or &apos;T1234&apos; or &apos;t1234&apos;; Osmocom-specific timer number of the format: &apos;X1234&apos; or &apos;x1234&apos;.' />
+ </params>
+ </command>
<command id='show conns'>
<params>
<param name='show' doc='Show running system information' />
@@ -925,7 +971,7 @@
<param name='MASK' doc='List of logging categories to log, e.g. &apos;abc:mno:xyz&apos;. Available log categories depend on the specific application, refer to the &apos;logging level&apos; command. Optionally add individual log levels like &apos;abc,1:mno,3:xyz,5&apos;, where the level numbers are LOGL_DEBUG=1 LOGL_INFO=3 LOGL_NOTICE=5 LOGL_ERROR=7 LOGL_FATAL=8' />
</params>
</command>
- <command id='logging level (rll|mm|rr|rsl|nm|pag|meas|msc|ho|hodec|ref|nat|ctrl|filter|pcu|lcls|chan|ts|as|lglobal|llapd|linp|lmux|lmi|lmib|lsms|lctrl|lgtp|lstats|lgsup|loap|lss7|lsccp|lsua|lm3ua|lmgcp|ljibuf) (debug|info|notice|error|fatal)'>
+ <command id='logging level (rll|mm|rr|rsl|nm|pag|meas|msc|ho|hodec|ref|nat|ctrl|filter|pcu|lcls|chan|ts|as|lglobal|llapd|linp|lmux|lmi|lmib|lsms|lctrl|lgtp|lstats|lgsup|loap|lss7|lsccp|lsua|lm3ua|lmgcp|ljibuf|lrspro) (debug|info|notice|error|fatal)'>
<params>
<param name='logging' doc='Configure logging' />
<param name='level' doc='Set the log level for a specified category' />
@@ -966,6 +1012,7 @@
<param name='lm3ua' doc='libosmo-sigtran MTP3 User Adaptation' />
<param name='lmgcp' doc='libosmo-mgcp Media Gateway Control Protocol' />
<param name='ljibuf' doc='libosmo-netif Jitter Buffer' />
+ <param name='lrspro' doc='Remote SIM protocol' />
<param name='debug' doc='Log debug messages and higher levels' />
<param name='info' doc='Log informational messages and higher levels' />
<param name='notice' doc='Log noticeable messages and higher levels' />
@@ -1055,13 +1102,6 @@
<param name='REGEXP' doc='Regular expression' />
</params>
</command>
- <command id='show timer [TNNNN]'>
- <params>
- <param name='show' doc='Show running system information' />
- <param name='timer' doc='GSM Timers' />
- <param name='[TNNNN]' doc='Specific timer to show, or all timers if omitted.' />
- </params>
- </command>
<command id='show bts &lt;0-255&gt; neighbor arfcn &lt;0-1023&gt; bsic (&lt;0-63&gt;|any)'>
<params>
<param name='show' doc='Show running system information' />
@@ -1172,11 +1212,14 @@
<param name='assignment' doc='Manually trigger assignment (for debugging)' />
</params>
</command>
- <command id='bts &lt;0-255&gt; smscb-command &lt;1-4&gt; HEXSTRING'>
+ <command id='bts &lt;0-255&gt; smscb-command (normal|schedule|default) &lt;1-4&gt; HEXSTRING'>
<params>
<param name='bts' doc='BTS related commands' />
<param name='&lt;0-255&gt;' doc='BTS Number' />
<param name='smscb-command' doc='SMS Cell Broadcast' />
+ <param name='normal' doc='Normal (one-shot) SMSCB Message; sent once over Abis+Um' />
+ <param name='schedule' doc='Schedule (one-shot) SMSCB Messag; sent once over Abis+Um' />
+ <param name='default' doc='Default (repeating) SMSCB Message; sent once over Abis, unlimited ovrer Um' />
<param name='&lt;1-4&gt;' doc='Last Valid Block' />
<param name='HEXSTRING' doc='Hex Encoded SMSCB message (up to 88 octets)' />
</params>
@@ -1790,7 +1833,7 @@
<param name='[last]' doc='Log source file info at the end of a log line. If omitted, log source file info just before the log text.' />
</params>
</command>
- <command id='logging level (rll|mm|rr|rsl|nm|pag|meas|msc|ho|hodec|ref|nat|ctrl|filter|pcu|lcls|chan|ts|as|lglobal|llapd|linp|lmux|lmi|lmib|lsms|lctrl|lgtp|lstats|lgsup|loap|lss7|lsccp|lsua|lm3ua|lmgcp|ljibuf) (debug|info|notice|error|fatal)'>
+ <command id='logging level (rll|mm|rr|rsl|nm|pag|meas|msc|ho|hodec|ref|nat|ctrl|filter|pcu|lcls|chan|ts|as|lglobal|llapd|linp|lmux|lmi|lmib|lsms|lctrl|lgtp|lstats|lgsup|loap|lss7|lsccp|lsua|lm3ua|lmgcp|ljibuf|lrspro) (debug|info|notice|error|fatal)'>
<params>
<param name='logging' doc='Configure logging' />
<param name='level' doc='Set the log level for a specified category' />
@@ -1831,6 +1874,7 @@
<param name='lm3ua' doc='libosmo-sigtran MTP3 User Adaptation' />
<param name='lmgcp' doc='libosmo-mgcp Media Gateway Control Protocol' />
<param name='ljibuf' doc='libosmo-netif Jitter Buffer' />
+ <param name='lrspro' doc='Remote SIM protocol' />
<param name='debug' doc='Log debug messages and higher levels' />
<param name='info' doc='Log informational messages and higher levels' />
<param name='notice' doc='Log noticeable messages and higher levels' />
@@ -1961,10 +2005,11 @@
<param name='login' doc='Enable password checking' />
</params>
</command>
- <command id='bind A.B.C.D'>
+ <command id='bind A.B.C.D [&lt;0-65535&gt;]'>
<params>
<param name='bind' doc='Accept VTY telnet connections on local interface' />
<param name='A.B.C.D' doc='Local interface IP address (default: 127.0.0.1)' />
+ <param name='[&lt;0-65535&gt;]' doc='Local TCP port number' />
</params>
</command>
</node>
@@ -2470,12 +2515,12 @@
<param name='NAME' doc='Name string, up to 31 characters' />
</params>
</command>
- <command id='timer TNNNN (default|&lt;1-65535&gt;)'>
+ <command id='timer [TNNNN] [(&lt;0-2147483647&gt;|default)]'>
<params>
- <param name='timer' doc='Configure GSM Timers' />
- <param name='TNNNN' doc='T-number, optionally preceded by &apos;t&apos; or &apos;T&apos;.See also &apos;show timer&apos; for a list of available timers.' />
- <param name='default' doc='Set to default timer value' />
- <param name='&lt;1-65535&gt;' doc='Timer value' />
+ <param name='timer' doc='Configure or show timers' />
+ <param name='[TNNNN]' doc='T- or X-timer-number -- 3GPP compliant timer number of the format &apos;1234&apos; or &apos;T1234&apos; or &apos;t1234&apos;; Osmocom-specific timer number of the format: &apos;X1234&apos; or &apos;x1234&apos;.' />
+ <param name='[&lt;0-2147483647&gt;]' doc='New timer value' />
+ <param name='[default]' doc='Set to default timer value' />
</params>
</command>
<command id='neci (0|1)'>
@@ -2839,7 +2884,7 @@
<param name='&lt;0-63&gt;' doc='BSIC of this BTS' />
</params>
</command>
- <command id='ip.access unit_id &lt;0-65534&gt; &lt;0-255&gt;'>
+ <command id='ipa unit-id &lt;0-65534&gt; &lt;0-255&gt;'>
<params>
<param name='ip.access' doc='Abis/IP specific options' />
<param name='unit_id' doc='Set the IPA BTS Unit ID' />
@@ -2847,7 +2892,7 @@
<param name='&lt;0-255&gt;' doc='Unit ID (BTS)' />
</params>
</command>
- <command id='ip.access rsl-ip A.B.C.D'>
+ <command id='ipa rsl-ip A.B.C.D'>
<params>
<param name='ip.access' doc='Abis/IP specific options' />
<param name='rsl-ip' doc='Set the IPA RSL IP Address of the BSC' />
@@ -2877,7 +2922,7 @@
<param name='&lt;15-100&gt;' doc='and the BTS is being bootstrapped.' />
</params>
</command>
- <command id='oml ip.access stream_id &lt;0-255&gt; line E1_LINE'>
+ <command id='oml ipa stream-id &lt;0-255&gt; line E1_LINE'>
<params>
<param name='oml' doc='Organization &amp; Maintenance Link' />
<param name='ip.access' doc='A-bis/IP Specific Options' />
@@ -2960,6 +3005,13 @@
<param name='&lt;0-7&gt;' doc='Number of blocks reserved for access grant' />
</params>
</command>
+ <command id='ccch load-indication-threshold &lt;0-100&gt;'>
+ <params>
+ <param name='ccch' doc='Common Control Channel' />
+ <param name='load-indication-threshold' doc='Percentage of CCCH load at which BTS sends RSL CCCH LOAD IND' />
+ <param name='&lt;0-100&gt;' doc='CCCH Load Threshold in percent (Default: 10)' />
+ </params>
+ </command>
<command id='rach nm busy threshold &lt;0-255&gt;'>
<params>
<param name='rach' doc='Random Access Control Channel' />
@@ -3117,7 +3169,7 @@
<param name='1' doc='Enable 11 bit RACH for EGPRS' />
</params>
</command>
- <command id='gprs ns timer (tns-block|tns-block-retries|tns-reset|tns-reset-retries|tns-test|tns-alive|tns-alive-retries) &lt;0-255&gt;'>
+ <command id='gprs ns timer (tns-block|tns-block-retries|tns-reset|tns-reset-retries|tns-test|tns-alive|tns-alive-retries|tsns-prov) &lt;0-255&gt;'>
<params>
<param name='gprs' doc='GPRS Packet Network' />
<param name='ns' doc='Network Service' />
@@ -3129,6 +3181,7 @@
<param name='tns-test' doc='Test Timer (Tns-test) timeout' />
<param name='tns-alive' doc='Alive Timer (Tns-alive) timeout' />
<param name='tns-alive-retries' doc='Alive Timer (Tns-alive) number of retries' />
+ <param name='tsns-prov' doc='SNS Provision Timer (Tsns-prov) timeout' />
<param name='&lt;0-255&gt;' doc='Timer Value' />
</params>
</command>
@@ -3301,6 +3354,19 @@
<param name='HEXSTRING' doc='Static user-specified SI content in HEX notation' />
</params>
</command>
+ <command id='system-information unused-send-empty'>
+ <params>
+ <param name='system-information' doc='System Information Messages' />
+ <param name='unused-send-empty' doc='Send BCCH Info with empty &apos;Full BCCH Info&apos; TLV to notify disabled SI. Some nanoBTS fw versions are known to fail upon receival of these messages.' />
+ </params>
+ </command>
+ <command id='no system-information unused-send-empty'>
+ <params>
+ <param name='no' doc='Negate a command or set its defaults' />
+ <param name='system-information' doc='System Information Messages' />
+ <param name='unused-send-empty' doc='Avoid sending BCCH Info with empty &apos;Full BCCH Info&apos; TLV to notify disabled SI. Some nanoBTS fw versions are known to fail upon receival of these messages.' />
+ </params>
+ </command>
<command id='early-classmark-sending (allowed|forbidden)'>
<params>
<param name='early-classmark-sending' doc='Early Classmark Sending' />
@@ -3319,7 +3385,7 @@
<params>
<param name='neighbor-list' doc='Neighbor List' />
<param name='mode' doc='Mode of Neighbor List generation' />
- <param name='automatic' doc='Automatically from all BTS in this OpenBSC' />
+ <param name='automatic' doc='Automatically from all BTS in this BSC' />
<param name='manual' doc='Manual' />
<param name='manual-si5' doc='Manual with different lists for SI2 and SI5' />
</params>
@@ -3868,6 +3934,19 @@
<param name='&lt;1-10&gt;' doc='Set the number of Access Control Classes to enable per ramping step' />
</params>
</command>
+ <command id='timer-dynamic TNNNN'>
+ <params>
+ <param name='timer-dynamic' doc='Calculate T3113 dynamically based on channel config and load' />
+ <param name='TNNNN' doc='T-number, optionally preceded by &apos;t&apos; or &apos;T&apos;' />
+ </params>
+ </command>
+ <command id='no timer-dynamic TNNNN'>
+ <params>
+ <param name='no' doc='Negate a command or set its defaults' />
+ <param name='timer-dynamic' doc='Set given timer to non-dynamic and use the default or user provided fixed value' />
+ <param name='TNNNN' doc='T-number, optionally preceded by &apos;t&apos; or &apos;T&apos;' />
+ </params>
+ </command>
<command id='neighbor bts &lt;0-255&gt;'>
<params>
<param name='neighbor' doc='Manage local and remote-BSS neighbor cells' />
@@ -4573,11 +4652,19 @@
<param name='forbidden' doc='Forbidden' />
</params>
</command>
- <command id='lcls-mode (disabled|mgw-loop)'>
+ <command id='amr-payload (octet-aligned|bandwith-efficient'>
+ <params>
+ <param name='amr-payload' doc='Set AMR payload framing mode' />
+ <param name='octet-aligned' doc='payload fields aligned on octet boundaries' />
+ <param name='bandwith-efficient' doc='payload fields packed (AoIP)' />
+ </params>
+ </command>
+ <command id='lcls-mode (disabled|mgw-loop|bts-loop)'>
<params>
<param name='lcls-mode' doc='Configure 3GPP LCLS (Local Call, Local Switch)' />
<param name='disabled' doc='Disable LCLS for all calls of this MSC' />
- <param name='mgw-loop' doc='Enable LCLS with loopping traffic in MGW' />
+ <param name='mgw-loop' doc='Enable LCLS with looping traffic in MGW' />
+ <param name='bts-loop' doc='Enable LCLS with looping traffic between BTS' />
</params>
</command>
<command id='lcls-codec-mismatch (allowed|forbidden)'>
@@ -4647,19 +4734,11 @@
<param name='&lt;0-65535&gt;' doc='remote port' />
</params>
</command>
- <command id='mgw endpoint-range &lt;1-65534&gt; &lt;1-65534&gt;'>
+ <command id='mgw endpoint-domain NAME'>
<params>
<param name='mgw' doc='Configure MGCP connection to Media Gateway' />
- <param name='endpoint-range' doc='usable range of endpoint identifiers' />
- <param name='&lt;1-65534&gt;' doc='set first usable endpoint identifier' />
- <param name='&lt;1-65534&gt;' doc='set last usable endpoint identifier' />
- </params>
- </command>
- <command id='mgw bts-base &lt;0-65534&gt;'>
- <params>
- <param name='mgw' doc='Configure MGCP connection to Media Gateway' />
- <param name='bts-base' doc='First UDP port allocated for the BTS side' />
- <param name='&lt;0-65534&gt;' doc='UDP Port number' />
+ <param name='endpoint-domain' doc='Set the domain name to send in MGCP messages, e.g. the part &apos;foo&apos; in &apos;rtpbridge/*@foo&apos;.' />
+ <param name='NAME' doc='Domain name, should be alphanumeric.' />
</params>
</command>
<command id='mgw x-osmo-ign call-id'>
@@ -4676,6 +4755,14 @@
<param name='x-osmo-ign' doc='Do not send X-Osmo-IGN MGCP header to this MSC' />
</params>
</command>
+ <command id='osmux (on|off|only)'>
+ <params>
+ <param name='osmux' doc='RTP multiplexing' />
+ <param name='on' doc='Enable OSMUX' />
+ <param name='off' doc='Disable OSMUX' />
+ <param name='only' doc='Only use OSMUX' />
+ </params>
+ </command>
</node>
<node id='om2k'>
<name>om2k</name>
diff --git a/doc/manuals/vty/libbsc_vty_additions.xml b/doc/manuals/vty/libbsc_vty_additions.xml
index 8685398..cf61961 100644
--- a/doc/manuals/vty/libbsc_vty_additions.xml
+++ b/doc/manuals/vty/libbsc_vty_additions.xml
@@ -11,7 +11,7 @@
<child_of nodeid='14' />
<name>BTS Configuration</name>
<description>This is the configuration of a single BTS.</description>
- <command id='oml ip.access stream_id &lt;0-255&gt; line E1_LINE'>
+ <command id='oml ipa stream-id &lt;0-255&gt; line E1_LINE'>
<description>
Set the IPA stream identifier for the OML link within the IPA
multiplex. Must be the same as on the BTS side. The default
@@ -40,7 +40,7 @@
shall be used by MS in this cell. The default should be enabled.
</description>
</command>
- <command id='ip.access rsl-ip A.B.C.D'>
+ <command id='ipa rsl-ip A.B.C.D'>
<description>
Configure the IP address of the BSC used for RSL. Abis/IP
BTSs, including OsmoBTS and the nanoBTS will be instructed to
@@ -96,7 +96,7 @@
re-selection.
</description>
</command>
- <command id='ip.access unit_id &lt;0-65534&gt; &lt;0-255&gt;'>
+ <command id='ipa unit-id &lt;0-65534&gt; &lt;0-255&gt;'>
<description>
The ip.access unit ID is a parameter of the IPA
Signalling-over-IP multiplex. It is administratively
diff --git a/include/osmocom/bsc/bsc_msc_data.h b/include/osmocom/bsc/bsc_msc_data.h
index 4720845..2ad7c68 100644
--- a/include/osmocom/bsc/bsc_msc_data.h
+++ b/include/osmocom/bsc/bsc_msc_data.h
@@ -33,6 +33,7 @@
#include "osmux.h"
#include <osmocom/core/timer.h>
+#include <osmocom/core/select.h>
#include <osmocom/gsm/protocol/gsm_04_08.h>
@@ -135,6 +136,16 @@ struct bsc_msc_data {
enum osmux_usage use_osmux;
/* Whether we detected the MSC supports Osmux (during BSSMAP_RESET) */
bool remote_supports_osmux;
+
+ /* Proxy between IPA/SCCPlite encapsulated MGCP and UDP */
+ struct {
+ /* local (BSC) IP address to be used */
+ char *local_addr;
+ /* local (BSC) UDP port to be used to talk with MGW */
+ uint16_t local_port;
+ /* UDP socket for proxying MGCP via SCCPlite/IPA */
+ struct osmo_fd ofd;
+ } mgcp_ipa;
};
/*
@@ -191,5 +202,25 @@ static inline int mgcp_port_to_cic(uint16_t port, uint16_t base)
return (port - base) / 2;
}
+static inline bool msc_is_aoip(const struct bsc_msc_data *msc)
+{
+ switch (msc->a.asp_proto) {
+ case OSMO_SS7_ASP_PROT_SUA:
+ case OSMO_SS7_ASP_PROT_M3UA:
+ return true;
+ default:
+ return false;
+ }
+}
+
+static inline bool msc_is_sccplite(const struct bsc_msc_data *msc)
+{
+ switch (msc->a.asp_proto) {
+ case OSMO_SS7_ASP_PROT_IPA:
+ return true;
+ default:
+ return false;
+ }
+}
#endif
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 82bd238..a464001 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -1115,6 +1115,9 @@ struct gsm_bts {
bool ctrl_ack_type_use_block;
} gprs;
+ /* threshold (in percent) when BTS shall send CCCH LOAD IND */
+ int ccch_load_ind_thresh;
+
/* RACH NM values */
int rach_b_thresh;
int rach_ldavg_slots;
diff --git a/include/osmocom/bsc/osmo_bsc_sigtran.h b/include/osmocom/bsc/osmo_bsc_sigtran.h
index bd8b063..b934d51 100644
--- a/include/osmocom/bsc/osmo_bsc_sigtran.h
+++ b/include/osmocom/bsc/osmo_bsc_sigtran.h
@@ -44,3 +44,12 @@ void osmo_bsc_sigtran_tx_reset_ack(const struct bsc_msc_data *msc);
/* receive + process a CTRL command from the piggy-back on the IPA/SCCPlite link */
int bsc_sccplite_rx_ctrl(struct osmo_ss7_asp *asp, struct msgb *msg);
+
+/* receive + process a MGCP message from the piggy-back on the IPA/SCCPlite link */
+int bsc_sccplite_rx_mgcp(struct osmo_ss7_asp *asp, struct msgb *msg);
+
+/* send a message via SCCPLite to given MSC */
+int bsc_sccplite_msc_send(struct bsc_msc_data *msc, struct msgb *msg);
+
+/* we received some data on the UDP proxy socket from the MGW. Pass it to MSC via IPA */
+int bsc_sccplite_mgcp_proxy_cb(struct osmo_fd *ofd, unsigned int what);
diff --git a/include/osmocom/bsc/vty.h b/include/osmocom/bsc/vty.h
index e632755..7e3c505 100644
--- a/include/osmocom/bsc/vty.h
+++ b/include/osmocom/bsc/vty.h
@@ -12,9 +12,6 @@ void openbsc_vty_print_statistics(struct vty *vty, struct gsm_network *);
struct buffer *vty_argv_to_buffer(int argc, const char *argv[], int base);
-extern struct cmd_element cfg_description_cmd;
-extern struct cmd_element cfg_no_description_cmd;
-
enum bsc_vty_node {
GSMNET_NODE = _LAST_OSMOVTY_NODE + 1,
BTS_NODE,
diff --git a/src/osmo-bsc/Makefile.am b/src/osmo-bsc/Makefile.am
index e88e614..d50515b 100644
--- a/src/osmo-bsc/Makefile.am
+++ b/src/osmo-bsc/Makefile.am
@@ -78,6 +78,7 @@ osmo_bsc_SOURCES = \
osmo_bsc_grace.c \
osmo_bsc_lcls.c \
osmo_bsc_main.c \
+ osmo_bsc_mgcp.c \
osmo_bsc_msc.c \
osmo_bsc_sigtran.c \
osmo_bsc_vty.c \
diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c
index 240517b..bff6c12 100644
--- a/src/osmo-bsc/abis_nm.c
+++ b/src/osmo-bsc/abis_nm.c
@@ -368,8 +368,8 @@ static int rx_fail_evt_rep(struct msgb *mb, struct gsm_bts *bts)
oh->length-sizeof(*foh));
if (TLVP_PRESENT(&tp, NM_ATT_ADD_TEXT)) {
- p_val = TLVP_VAL(&tp, NM_ATT_ADD_TEXT);
- p_text = talloc_strndup(tall_bsc_ctx, (const char *) p_val,
+ const uint8_t *val = TLVP_VAL(&tp, NM_ATT_ADD_TEXT);
+ p_text = talloc_strndup(tall_bsc_ctx, (const char *) val,
TLVP_LEN(&tp, NM_ATT_ADD_TEXT));
}
diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c b/src/osmo-bsc/bsc_subscr_conn_fsm.c
index 87ad567..7b9f912 100644
--- a/src/osmo-bsc/bsc_subscr_conn_fsm.c
+++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c
@@ -1058,14 +1058,7 @@ bool gscon_is_aoip(struct gsm_subscriber_connection *conn)
if (!conn || !conn->sccp.msc)
return false;
- switch (conn->sccp.msc->a.asp_proto) {
- case OSMO_SS7_ASP_PROT_SUA:
- case OSMO_SS7_ASP_PROT_M3UA:
- return true;
-
- default:
- return false;
- }
+ return msc_is_aoip(conn->sccp.msc);
}
bool gscon_is_sccplite(struct gsm_subscriber_connection *conn)
@@ -1073,11 +1066,5 @@ bool gscon_is_sccplite(struct gsm_subscriber_connection *conn)
if (!conn || !conn->sccp.msc)
return false;
- switch (conn->sccp.msc->a.asp_proto) {
- case OSMO_SS7_ASP_PROT_IPA:
- return true;
-
- default:
- return false;
- }
+ return msc_is_sccplite(conn->sccp.msc);
}
diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c
index af25cab..c4e091c 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -848,6 +848,9 @@ static void config_write_bts_single(struct vty *vty, struct gsm_bts *bts)
vty_out(vty, " channel-descrption bs-ag-blks-res %u%s",
bts->si_common.chan_desc.bs_ag_blks_res, VTY_NEWLINE);
+ if (bts->ccch_load_ind_thresh != 10)
+ vty_out(vty, " ccch load-indication-threshold %u%s",
+ bts->ccch_load_ind_thresh, VTY_NEWLINE);
if (bts->rach_b_thresh != -1)
vty_out(vty, " rach nm busy threshold %u%s",
bts->rach_b_thresh, VTY_NEWLINE);
@@ -894,15 +897,15 @@ static void config_write_bts_single(struct vty *vty, struct gsm_bts *bts)
switch (bts->type) {
case GSM_BTS_TYPE_NANOBTS:
case GSM_BTS_TYPE_OSMOBTS:
- vty_out(vty, " ip.access unit_id %u %u%s",
+ vty_out(vty, " ipa unit-id %u %u%s",
bts->ip_access.site_id, bts->ip_access.bts_id, VTY_NEWLINE);
if (bts->ip_access.rsl_ip) {
struct in_addr ia;
ia.s_addr = htonl(bts->ip_access.rsl_ip);
- vty_out(vty, " ip.access rsl-ip %s%s", inet_ntoa(ia),
+ vty_out(vty, " ipa rsl-ip %s%s", inet_ntoa(ia),
VTY_NEWLINE);
}
- vty_out(vty, " oml ip.access stream_id %u line %u%s",
+ vty_out(vty, " oml ipa stream-id %u line %u%s",
bts->oml_tei, bts->oml_e1_link.e1_nr, VTY_NEWLINE);
break;
case GSM_BTS_TYPE_NOKIA_SITE:
@@ -2177,7 +2180,7 @@ DEFUN(cfg_bts_bsic,
DEFUN(cfg_bts_unit_id,
cfg_bts_unit_id_cmd,
- "ip.access unit_id <0-65534> <0-255>",
+ "ipa unit-id <0-65534> <0-255>",
"Abis/IP specific options\n"
"Set the IPA BTS Unit ID\n"
"Unit ID (Site)\n"
@@ -2198,9 +2201,17 @@ DEFUN(cfg_bts_unit_id,
return CMD_SUCCESS;
}
+DEFUN_DEPRECATED(cfg_bts_unit_id,
+ cfg_bts_deprecated_unit_id_cmd,
+ "ip.access unit_id <0-65534> <0-255>",
+ "Abis/IP specific options\n"
+ "Set the IPA BTS Unit ID\n"
+ "Unit ID (Site)\n"
+ "Unit ID (BTS)\n");
+
DEFUN(cfg_bts_rsl_ip,
cfg_bts_rsl_ip_cmd,
- "ip.access rsl-ip A.B.C.D",
+ "ipa rsl-ip A.B.C.D",
"Abis/IP specific options\n"
"Set the IPA RSL IP Address of the BSC\n"
"Destination IP address for RSL connection\n")
@@ -2219,6 +2230,13 @@ DEFUN(cfg_bts_rsl_ip,
return CMD_SUCCESS;
}
+DEFUN_DEPRECATED(cfg_bts_rsl_ip,
+ cfg_bts_deprecated_rsl_ip_cmd,
+ "ip.access rsl-ip A.B.C.D",
+ "Abis/IP specific options\n"
+ "Set the IPA RSL IP Address of the BSC\n"
+ "Destination IP address for RSL connection\n");
+
#define NOKIA_STR "Nokia *Site related commands\n"
DEFUN(cfg_bts_nokia_site_skip_reset,
@@ -2284,9 +2302,9 @@ DEFUN(cfg_bts_nokia_site_bts_reset_timer_cnf,
DEFUN(cfg_bts_stream_id,
cfg_bts_stream_id_cmd,
- "oml ip.access stream_id <0-255> line E1_LINE",
+ "oml ipa stream-id <0-255> line E1_LINE",
OML_STR IPA_STR
- "Set the ip.access Stream ID of the OML link of this BTS\n"
+ "Set the ipa Stream ID of the OML link of this BTS\n"
"Stream Identifier\n" "Virtual E1 Line Number\n" "Virtual E1 Line Number\n")
{
struct gsm_bts *bts = vty->index;
@@ -2304,6 +2322,13 @@ DEFUN(cfg_bts_stream_id,
return CMD_SUCCESS;
}
+DEFUN_DEPRECATED(cfg_bts_stream_id,
+ cfg_bts_deprecated_stream_id_cmd,
+ "oml ip.access stream_id <0-255> line E1_LINE",
+ OML_STR IPA_STR
+ "Set the ip.access Stream ID of the OML link of this BTS\n"
+ "Stream Identifier\n" "Virtual E1 Line Number\n" "Virtual E1 Line Number\n");
+
#define OML_E1_STR OML_STR "OML E1/T1 Configuration\n"
DEFUN(cfg_bts_oml_e1,
@@ -2434,6 +2459,20 @@ DEFUN(cfg_bts_chan_desc_bs_ag_blks_res,
return CMD_SUCCESS;
}
+#define CCCH_STR "Common Control Channel\n"
+
+DEFUN(cfg_bts_ccch_load_ind_thresh,
+ cfg_bts_ccch_load_ind_thresh_cmd,
+ "ccch load-indication-threshold <0-100>",
+ CCCH_STR
+ "Percentage of CCCH load at which BTS sends RSL CCCH LOAD IND\n"
+ "CCCH Load Threshold in percent (Default: 10)")
+{
+ struct gsm_bts *bts = vty->index;
+ bts->ccch_load_ind_thresh = atoi(argv[0]);
+ return CMD_SUCCESS;
+}
+
#define NM_STR "Network Management\n"
DEFUN(cfg_bts_rach_nm_b_thresh,
@@ -5220,11 +5259,14 @@ int bsc_vty_init(struct gsm_network *network)
install_element(BTS_NODE, &cfg_bts_tsc_cmd);
install_element(BTS_NODE, &cfg_bts_bsic_cmd);
install_element(BTS_NODE, &cfg_bts_unit_id_cmd);
+ install_element(BTS_NODE, &cfg_bts_deprecated_unit_id_cmd);
install_element(BTS_NODE, &cfg_bts_rsl_ip_cmd);
+ install_element(BTS_NODE, &cfg_bts_deprecated_rsl_ip_cmd);
install_element(BTS_NODE, &cfg_bts_nokia_site_skip_reset_cmd);
install_element(BTS_NODE, &cfg_bts_nokia_site_no_loc_rel_cnf_cmd);
install_element(BTS_NODE, &cfg_bts_nokia_site_bts_reset_timer_cnf_cmd);
install_element(BTS_NODE, &cfg_bts_stream_id_cmd);
+ install_element(BTS_NODE, &cfg_bts_deprecated_stream_id_cmd);
install_element(BTS_NODE, &cfg_bts_oml_e1_cmd);
install_element(BTS_NODE, &cfg_bts_oml_e1_tei_cmd);
install_element(BTS_NODE, &cfg_bts_challoc_cmd);
@@ -5233,6 +5275,7 @@ int bsc_vty_init(struct gsm_network *network)
install_element(BTS_NODE, &cfg_bts_chan_desc_att_cmd);
install_element(BTS_NODE, &cfg_bts_chan_desc_bs_pa_mfrms_cmd);
install_element(BTS_NODE, &cfg_bts_chan_desc_bs_ag_blks_res_cmd);
+ install_element(BTS_NODE, &cfg_bts_ccch_load_ind_thresh_cmd);
install_element(BTS_NODE, &cfg_bts_rach_nm_b_thresh_cmd);
install_element(BTS_NODE, &cfg_bts_rach_nm_ldavg_cmd);
install_element(BTS_NODE, &cfg_bts_cell_barred_cmd);
diff --git a/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c b/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c
index 8a370da..be823ae 100644
--- a/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c
+++ b/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c
@@ -60,7 +60,7 @@ struct msgb *nanobts_attr_bts_get(struct gsm_bts *bts)
msgb_tv_fixed_put(msgb, NM_ATT_OVERL_PERIOD, 3, buf);
/* percent */
- msgb_tv_put(msgb, NM_ATT_CCCH_L_T, 10);
+ msgb_tv_put(msgb, NM_ATT_CCCH_L_T, bts->ccch_load_ind_thresh);
/* seconds */
msgb_tv_put(msgb, NM_ATT_CCCH_L_I_P, 1);
diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c
index 5942fba..ea33817 100644
--- a/src/osmo-bsc/gsm_data.c
+++ b/src/osmo-bsc/gsm_data.c
@@ -827,6 +827,7 @@ struct gsm_bts *gsm_bts_alloc(struct gsm_network *net, uint8_t bts_num)
}
bts->c0->ts[0].pchan_from_config = GSM_PCHAN_CCCH_SDCCH4; /* TODO: really?? */
+ bts->ccch_load_ind_thresh = 10; /* 10% of Load: Start sending CCCH LOAD IND */
bts->rach_b_thresh = -1;
bts->rach_ldavg_slots = -1;
diff --git a/src/osmo-bsc/osmo_bsc_ctrl.c b/src/osmo-bsc/osmo_bsc_ctrl.c
index 80699f8..afe061e 100644
--- a/src/osmo-bsc/osmo_bsc_ctrl.c
+++ b/src/osmo-bsc/osmo_bsc_ctrl.c
@@ -52,6 +52,39 @@ static struct osmo_ss7_as *msc_get_ss7_as(struct bsc_msc_data *msc)
return rt->dest.as;
}
+static int _ss7_as_send(struct osmo_ss7_as *as, struct msgb *msg)
+{
+ struct osmo_ss7_asp *asp;
+ unsigned int i;
+
+ /* FIXME: unify with xua_as_transmit_msg() and perform proper ASP lookup */
+ for (i = 0; i < ARRAY_SIZE(as->cfg.asps); i++) {
+ asp = as->cfg.asps[i];
+ if (!asp)
+ continue;
+ /* FIXME: deal with multiple ASPs per AS */
+ return osmo_ss7_asp_send(asp, msg);
+ }
+ msgb_free(msg);
+ return -1;
+}
+
+int bsc_sccplite_msc_send(struct bsc_msc_data *msc, struct msgb *msg)
+{
+ struct osmo_ss7_as *as;
+
+ as = msc_get_ss7_as(msc);
+ if (!as) {
+ msgb_free(msg);
+ return -1;
+ }
+
+ /* don't attempt to send CTRL on a non-SCCPlite AS */
+ if (as->cfg.proto != OSMO_SS7_ASP_PROT_IPA)
+ return 0;
+
+ return _ss7_as_send(as, msg);
+}
/* Encode a CTRL command and send it to the given ASP
* \param[in] asp ASP through which we shall send the encoded message
@@ -83,30 +116,20 @@ static int sccplite_asp_ctrl_cmd_send(struct osmo_ss7_asp *asp, struct ctrl_cmd
* Caller must hence free 'cmd' itself. */
static int sccplite_msc_ctrl_cmd_send(struct bsc_msc_data *msc, struct ctrl_cmd *cmd)
{
- struct osmo_ss7_as *as;
- struct osmo_ss7_asp *asp;
- unsigned int i;
+ struct msgb *msg;
- as = msc_get_ss7_as(msc);
- if (!as)
+ msg = ctrl_cmd_make(cmd);
+ if (!msg)
return -1;
- /* don't attempt to send CTRL on a non-SCCPlite AS */
- if (as->cfg.proto != OSMO_SS7_ASP_PROT_IPA)
- return 0;
+ ipa_prepend_header_ext(msg, IPAC_PROTO_EXT_CTRL);
+ ipa_prepend_header(msg, IPAC_PROTO_OSMO);
- /* FIXME: unify with xua_as_transmit_msg() and perform proper ASP lookup */
- for (i = 0; i < ARRAY_SIZE(as->cfg.asps); i++) {
- asp = as->cfg.asps[i];
- if (!asp)
- continue;
- /* FIXME: deal with multiple ASPs per AS */
- return sccplite_asp_ctrl_cmd_send(asp, cmd);
- }
- return -1;
+ return bsc_sccplite_msc_send(msc, msg);
}
-/* receive + process a CTRL command from the piggy-back on the IPA/SCCPlite link */
+/* receive + process a CTRL command from the piggy-back on the IPA/SCCPlite link.
+ * Transfers msg ownership. */
int bsc_sccplite_rx_ctrl(struct osmo_ss7_asp *asp, struct msgb *msg)
{
struct ctrl_cmd *cmd;
diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c
new file mode 100644
index 0000000..bec7930
--- /dev/null
+++ b/src/osmo-bsc/osmo_bsc_mgcp.c
@@ -0,0 +1,92 @@
+/*
+ * SCCPlite MGCP handling
+ *
+ * (C) 2018 by Harald Welte <laforge@gnumonks.org>
+ * All Rights Reserved
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <osmocom/bsc/bsc_msc_data.h>
+#include <osmocom/bsc/osmo_bsc.h>
+#include <osmocom/bsc/gsm_data.h>
+#include <osmocom/bsc/debug.h>
+#include <osmocom/gsm/ipa.h>
+#include <osmocom/gsm/protocol/ipaccess.h>
+#include <osmocom/bsc/osmo_bsc_sigtran.h>
+
+#include <arpa/inet.h>
+
+/* Determine MSC based on the ASP over which the message was received */
+static struct bsc_msc_data *msc_from_asp(struct osmo_ss7_asp *asp)
+{
+ int msc_nr;
+ /* this is rather ugly, as we of course have MTP-level routing between
+ * the local SCCP user (BSC) and the AS/ASPs. However, for the most simple
+ * SCCPlite case, there is a 1:1 mapping between ASP and AS, and using
+ * the libosmo-sigtran "simple client", the names are "as[p]-clnt-msc-%u",
+ * as set in osmo_bsc_sigtran_init() */
+ if (sscanf(asp->cfg.name, "asp-clnt-msc-%u", &msc_nr) != 1) {
+ LOGP(DMSC, LOGL_ERROR, "Cannot find to which MSC the ASP %s belongs\n", asp->cfg.name);
+ return NULL;
+ }
+ return osmo_msc_data_find(bsc_gsmnet, msc_nr);
+}
+
+/* We received an IPA-encapsulated MGCP message from a MSC. Transfers msg ownership. */
+int bsc_sccplite_rx_mgcp(struct osmo_ss7_asp *asp, struct msgb *msg)
+{
+ struct bsc_msc_data *msc;
+ int rc;
+
+ LOGP(DMSC, LOGL_NOTICE, "%s: Received IPA-encapsulated MGCP: %s\n", asp->cfg.name, msg->l2h);
+ msc = msc_from_asp(asp);
+ if (msc) {
+ /* we don't have a write queue here as we simply expect the socket buffers
+ * to be large enough to deal with whatever small/infrequent MGCP messages */
+ rc = send(msc->mgcp_ipa.ofd.fd, msgb_l2(msg), msgb_l2len(msg), 0);
+ } else
+ rc = 0;
+
+ msgb_free(msg);
+ return rc;
+}
+
+/* we received some data on the UDP proxy socket from the MGW. Pass it to MSC via IPA */
+int bsc_sccplite_mgcp_proxy_cb(struct osmo_fd *ofd, unsigned int what)
+{
+ struct bsc_msc_data *msc = ofd->data;
+ struct msgb *msg;
+ int rc;
+
+ if (!(what & BSC_FD_READ))
+ return 0;
+
+ msg = msgb_alloc_headroom(1024, 16, "MGCP->IPA");
+ OSMO_ASSERT(msg);
+ rc = recv(ofd->fd, msg->data, msgb_tailroom(msg), 0);
+ if (rc <= 0) {
+ LOGP(DMSC, LOGL_ERROR, "error receiving data from MGCP<->IPA proxy UDP socket: "
+ "%s\n", strerror(errno));
+ msgb_free(msg);
+ return rc;
+ }
+ msg->l2h = msgb_put(msg, rc);
+ msg->l2h[rc] = '\0';
+ LOGP(DMSC, LOGL_NOTICE, "Received MGCP on UDP proxy socket: %s\n", msg->l2h);
+
+ ipa_prepend_header(msg, IPAC_PROTO_MGCP_OLD);
+ return bsc_sccplite_msc_send(msc, msg);
+}
diff --git a/src/osmo-bsc/osmo_bsc_msc.c b/src/osmo-bsc/osmo_bsc_msc.c
index 6a6b1a9..7e78d94 100644
--- a/src/osmo-bsc/osmo_bsc_msc.c
+++ b/src/osmo-bsc/osmo_bsc_msc.c
@@ -27,26 +27,49 @@
#include <osmocom/bsc/gsm_data.h>
#include <osmocom/bsc/ipaccess.h>
#include <osmocom/bsc/bsc_msc_data.h>
+#include <osmocom/bsc/osmo_bsc_sigtran.h>
#include <osmocom/bsc/signal.h>
#include <osmocom/core/talloc.h>
+#include <osmocom/core/socket.h>
#include <osmocom/gsm/gsm0808.h>
#include <osmocom/abis/ipa.h>
+#include <osmocom/mgcp_client/mgcp_client.h>
+
#include <sys/socket.h>
#include <netinet/tcp.h>
#include <unistd.h>
-int osmo_bsc_msc_init(struct bsc_msc_data *data)
+int osmo_bsc_msc_init(struct bsc_msc_data *msc)
{
+ struct gsm_network *net = msc->network;
+ uint16_t mgw_port;
+ int rc;
+
/* FIXME: This is a leftover from the old architecture that used
* sccp-lite with osmocom specific authentication. Since we now
* changed to AoIP the connected status and the authentication
* status is managed differently. However osmo_bsc_filter.c still
* needs the flags to be set to one. See also: OS#3112 */
- data->is_authenticated = 1;
+ msc->is_authenticated = 1;
+
+ if (net->mgw.conf->remote_port >= 0)
+ mgw_port = net->mgw.conf->remote_port;
+ else
+ mgw_port = MGCP_CLIENT_REMOTE_PORT_DEFAULT;
+
+ rc = osmo_sock_init2_ofd(&msc->mgcp_ipa.ofd, AF_INET, SOCK_DGRAM, IPPROTO_UDP,
+ msc->mgcp_ipa.local_addr, msc->mgcp_ipa.local_port,
+ net->mgw.conf->remote_addr, mgw_port,
+ OSMO_SOCK_F_BIND | OSMO_SOCK_F_CONNECT);
+ if (rc < 0) {
+ LOGP(DMSC, LOGL_ERROR, "msc %u: Could not create/connect/bind MGCP proxy socket: %d\n",
+ msc->nr, rc);
+ return rc;
+ }
return 0;
}
@@ -117,6 +140,10 @@ struct bsc_msc_data *osmo_msc_data_alloc(struct gsm_network *net, int nr)
msc_data->audio_support[4]->ver = 3;
msc_data->audio_support[4]->hr = 1;
+ osmo_fd_setup(&msc_data->mgcp_ipa.ofd, -1, BSC_FD_READ, &bsc_sccplite_mgcp_proxy_cb, msc_data, 0);
+ msc_data->mgcp_ipa.local_addr = talloc_strdup(msc_data, "0.0.0.0");
+ msc_data->mgcp_ipa.local_port = 0; /* dynamic */
+
return msc_data;
}
diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c
index 5d61c32..763e1e1 100644
--- a/src/osmo-bsc/osmo_bsc_sigtran.c
+++ b/src/osmo-bsc/osmo_bsc_sigtran.c
@@ -101,7 +101,7 @@ static void osmo_bsc_sigtran_tx_reset(const struct bsc_msc_data *msc)
LOGP(DMSC, LOGL_NOTICE, "Sending RESET to MSC: %s\n", osmo_sccp_addr_name(ss7, &msc->a.msc_addr));
msg = gsm0808_create_reset();
- if (msc->use_osmux != OSMUX_USAGE_OFF)
+ if (msc_is_aoip(msc) && msc->use_osmux != OSMUX_USAGE_OFF)
_gsm0808_extend_announce_osmux(msg);
osmo_sccp_tx_unitdata_msg(msc->a.sccp_user, &msc->a.bsc_addr,
@@ -120,7 +120,7 @@ void osmo_bsc_sigtran_tx_reset_ack(const struct bsc_msc_data *msc)
LOGP(DMSC, LOGL_NOTICE, "Sending RESET ACK to MSC: %s\n", osmo_sccp_addr_name(ss7, &msc->a.msc_addr));
msg = gsm0808_create_reset_ack();
- if (msc->use_osmux != OSMUX_USAGE_OFF)
+ if (msc_is_aoip(msc) && msc->use_osmux != OSMUX_USAGE_OFF)
_gsm0808_extend_announce_osmux(msg);
osmo_sccp_tx_unitdata_msg(msc->a.sccp_user, &msc->a.bsc_addr,
@@ -523,8 +523,7 @@ int osmo_bsc_sigtran_init(struct llist_head *mscs)
* an X-Osmo-IGN flag telling osmo-mgw to ignore CallID mismatches for this endpoint.
* If an explicit VTY command has already indicated whether or not to send X-Osmo-IGN, do
* not overwrite that setting. */
- if (msc->a.asp_proto == OSMO_SS7_ASP_PROT_IPA
- && !msc->x_osmo_ign_configured)
+ if (msc_is_sccplite(msc) && !msc->x_osmo_ign_configured)
msc->x_osmo_ign |= MGCP_X_OSMO_IGN_CALLID;
/* If unset, use default local SCCP address */
@@ -612,8 +611,12 @@ static int asp_rx_unknown(struct osmo_ss7_asp *asp, int ppid_mux, struct msgb *m
switch (iph_ext->proto) {
case IPAC_PROTO_EXT_CTRL:
return bsc_sccplite_rx_ctrl(asp, msg);
+ case IPAC_PROTO_EXT_MGCP:
+ return bsc_sccplite_rx_mgcp(asp, msg);
}
break;
+ case IPAC_PROTO_MGCP_OLD:
+ return bsc_sccplite_rx_mgcp(asp, msg);
default:
break;
}
diff --git a/tests/handover/Makefile.am b/tests/handover/Makefile.am
index 56aea50..84c341e 100644
--- a/tests/handover/Makefile.am
+++ b/tests/handover/Makefile.am
@@ -8,6 +8,8 @@ AM_CFLAGS = \
-ggdb3 \
$(LIBOSMOCORE_CFLAGS) \
$(LIBOSMOGSM_CFLAGS) \
+ $(LIBOSMOCTRL_CFLAGS) \
+ $(LIBOSMOVTY_CFLAGS) \
$(LIBOSMOABIS_CFLAGS) \
$(LIBOSMOSIGTRAN_CFLAGS) \
$(LIBOSMOMGCPCLIENT_CFLAGS) \
@@ -38,15 +40,24 @@ handover_test_LDFLAGS = \
$(NULL)
handover_test_LDADD = \
+ $(top_builddir)/src/libfilter/bsc_msg_acc.o \
+ $(top_builddir)/src/libfilter/bsc_msg_vty.o \
$(top_builddir)/src/osmo-bsc/a_reset.o \
$(top_builddir)/src/osmo-bsc/abis_nm.o \
+ $(top_builddir)/src/osmo-bsc/abis_nm_vty.o \
+ $(top_builddir)/src/osmo-bsc/abis_om2000.o \
+ $(top_builddir)/src/osmo-bsc/abis_om2000_vty.o \
$(top_builddir)/src/osmo-bsc/abis_rsl.o \
+ $(top_builddir)/src/osmo-bsc/acc_ramp.o \
$(top_builddir)/src/osmo-bsc/arfcn_range_encode.o \
$(top_builddir)/src/osmo-bsc/assignment_fsm.o \
+ $(top_builddir)/src/osmo-bsc/bsc_ctrl_commands.o \
$(top_builddir)/src/osmo-bsc/bsc_init.o \
+ $(top_builddir)/src/osmo-bsc/bsc_rf_ctrl.o \
$(top_builddir)/src/osmo-bsc/bsc_rll.o \
$(top_builddir)/src/osmo-bsc/bsc_subscr_conn_fsm.o \
$(top_builddir)/src/osmo-bsc/bsc_subscriber.o \
+ $(top_builddir)/src/osmo-bsc/bsc_vty.o \
$(top_builddir)/src/osmo-bsc/bts_ipaccess_nanobts.o \
$(top_builddir)/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.o \
$(top_builddir)/src/osmo-bsc/bts_sysmobts.o \
@@ -60,14 +71,20 @@ handover_test_LDADD = \
$(top_builddir)/src/osmo-bsc/handover_decision_2.o \
$(top_builddir)/src/osmo-bsc/handover_fsm.o \
$(top_builddir)/src/osmo-bsc/handover_logic.o \
+ $(top_builddir)/src/osmo-bsc/handover_vty.o \
$(top_builddir)/src/osmo-bsc/lchan_fsm.o \
$(top_builddir)/src/osmo-bsc/lchan_rtp_fsm.o \
$(top_builddir)/src/osmo-bsc/lchan_select.o \
+ $(top_builddir)/src/osmo-bsc/meas_feed.o \
$(top_builddir)/src/osmo-bsc/meas_rep.o \
$(top_builddir)/src/osmo-bsc/neighbor_ident.o \
+ $(top_builddir)/src/osmo-bsc/neighbor_ident_vty.o \
$(top_builddir)/src/osmo-bsc/net_init.o \
+ $(top_builddir)/src/osmo-bsc/osmo_bsc_ctrl.o \
$(top_builddir)/src/osmo-bsc/osmo_bsc_lcls.o \
+ $(top_builddir)/src/osmo-bsc/osmo_bsc_mgcp.o \
$(top_builddir)/src/osmo-bsc/osmo_bsc_msc.o \
+ $(top_builddir)/src/osmo-bsc/osmo_bsc_vty.o \
$(top_builddir)/src/osmo-bsc/paging.o \
$(top_builddir)/src/osmo-bsc/pcu_sock.o \
$(top_builddir)/src/osmo-bsc/penalty_timers.o \
@@ -76,6 +93,8 @@ handover_test_LDADD = \
$(top_builddir)/src/osmo-bsc/timeslot_fsm.o \
$(LIBOSMOCORE_LIBS) \
$(LIBOSMOGSM_LIBS) \
+ $(LIBOSMOCTRL_LIBS) \
+ $(LIBOSMOVTY_LIBS) \
$(LIBOSMOABIS_LIBS) \
$(LIBOSMOSIGTRAN_LIBS) \
$(LIBOSMOMGCPCLIENT_LIBS) \
@@ -89,6 +108,7 @@ neighbor_ident_test_LDADD = \
$(top_builddir)/src/osmo-bsc/neighbor_ident.o \
$(LIBOSMOCORE_LIBS) \
$(LIBOSMOGSM_LIBS) \
+ $(LIBOSMOCTRL_LIBS) \
$(NULL)
.PHONY: update_exp