aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bsc/osmo_bsc_bssap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/osmo-bsc/osmo_bsc_bssap.c')
-rw-r--r--src/osmo-bsc/osmo_bsc_bssap.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c
index e79a34469..9dee2658a 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -51,6 +51,25 @@
* helpers for the assignment command
*/
+/* We expect MSC to provide use with an Osmocom extension TLV in BSSMAP_RESET to
+ * announce Osmux support */
+static void update_msc_osmux_support(struct bsc_msc_data *msc,
+ struct msgb *msg, unsigned int length)
+{
+ struct tlv_parsed tp;
+ int rc;
+ bool old_value = msc->remote_supports_osmux;
+
+ rc = tlv_parse(&tp, gsm0808_att_tlvdef(), msg->l4h + 1, length - 1, 0, 0);
+ if (rc < 0)
+ LOGP(DMSC, LOGL_NOTICE, "Failed parsing TLV looking for Osmux support\n");
+
+ msc->remote_supports_osmux = !!TLVP_PRESENT(&tp, GSM0808_IE_OSMO_OSMUX_SUPPORT);
+
+ if (old_value != msc->remote_supports_osmux)
+ LOGP(DMSC, LOGL_INFO, "MSC detected AoIP Osmux support changed: %d->%d\n",
+ old_value, msc->remote_supports_osmux);
+}
static int bssmap_handle_reset_ack(struct bsc_msc_data *msc,
struct msgb *msg, unsigned int length)
@@ -63,6 +82,8 @@ static int bssmap_handle_reset_ack(struct bsc_msc_data *msc,
* that we have successfully received the reset-ack message */
a_reset_ack_confirm(msc);
+ update_msc_osmux_support(msc, msg, length);
+
return 0;
}
@@ -81,6 +102,8 @@ static int bssmap_handle_reset(struct bsc_msc_data *msc,
/* Drop all ongoing paging requests that this MSC has created on any BTS */
paging_flush_network(msc->network, msc);
+ update_msc_osmux_support(msc, msg, length);
+
/* Inform the MSC that we have received the reset request and
* that we acted accordingly */
osmo_bsc_sigtran_tx_reset_ack(msc);