aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2018-10-16 16:55:03 +0200
committerHarald Welte <laforge@gnumonks.org>2018-10-21 12:15:03 +0000
commitb1f66fe1069daf5b394cf0814550c90a6eab5d1e (patch)
tree13d6f9a6bb0e2481534199de5e9c1ff6560c24c1
parent298da0aeecaaa2be163950ed013407be173a6876 (diff)
gsm_08_08: do not include zero length speech codec list.
When COMPLETE LAYER 3 INFORMATION is generated, it may include a speech codec list that contains 0 elements (which is legal). The specification requires the speech to be include if the network supports an IP based user plane interface. It could be argumented that if no codecs are available, the ip based user plane interface is not supported and therefore the spec does not require the speech codec list IE to be included for those cases. Lets check if the speech codec list has 0 elements and if its zero length, lets omit it completely. - check for zero length speech codec list. - omit speech codec list if it has zero elements Change-Id: I07339322a71376e986a2d75b7bc1f552eafd02b5 Related: OS#3657
-rw-r--r--src/osmo-bsc/gsm_08_08.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/osmo-bsc/gsm_08_08.c b/src/osmo-bsc/gsm_08_08.c
index 807eb8c44..19c259844 100644
--- a/src/osmo-bsc/gsm_08_08.c
+++ b/src/osmo-bsc/gsm_08_08.c
@@ -495,7 +495,17 @@ static bool complete_layer3(struct gsm_subscriber_connection *conn,
if (gscon_is_aoip(conn)) {
gen_bss_supported_codec_list(&scl, msc, conn_get_bts(conn));
- resp = gsm0808_create_layer3_2(msg, cgi_for_msc(conn->sccp.msc, conn_get_bts(conn)), &scl);
+ if (scl.len > 0)
+ resp = gsm0808_create_layer3_2(msg, cgi_for_msc(conn->sccp.msc, conn_get_bts(conn)), &scl);
+ else {
+ /* Note: 3GPP TS 48.008 3.2.1.32, COMPLETE LAYER 3 INFORMATION clearly states that
+ * Codec List (BSS Supported) shall be included, if the radio access network
+ * supports an IP based user plane interface. It may be intentional that the
+ * current configuration does not support any voice codecs, in those cases the
+ * network does not support an IP based user plane interface, and therefore the
+ * Codec List (BSS Supported) IE can be left out in those situations. */
+ resp = gsm0808_create_layer3_2(msg, cgi_for_msc(conn->sccp.msc, conn_get_bts(conn)), NULL);
+ }
} else
resp = gsm0808_create_layer3_2(msg, cgi_for_msc(conn->sccp.msc, conn_get_bts(conn)), NULL);