BSSAP: HO Request Ack: add missing Codec List (BSS Supported)

Related: SYS#5839
Related: I3c0576505a3ceb3cd5cc31dc69c5bc4a86a4ea08 (osmo-bsc)
Change-Id: Iab0a7b4d81592157fc111d1adb9e9f4cb53a94e9
diff --git a/TODO-RELEASE b/TODO-RELEASE
index 3855145..8902371 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -8,3 +8,4 @@
 # If any interfaces have been removed or changed since the last public release: c:r:0.
 #library	what			description / commit summary line
 libosmogsm      ABI BREAKAGE            CELL_IDENT_WHOLE_GLOBAL_PS changed enum number
+libosmogsm	add struct member	Add codec_list_bss_supported to gsm0808_handover_request_ack (more_items flag ensures ABI compat)
diff --git a/include/osmocom/gsm/gsm0808.h b/include/osmocom/gsm/gsm0808.h
index c79da6a..b4c7803 100644
--- a/include/osmocom/gsm/gsm0808.h
+++ b/include/osmocom/gsm/gsm0808.h
@@ -246,8 +246,12 @@
 
 	const struct sockaddr_storage *aoip_transport_layer;
 
+	bool more_items; /*!< set this to true iff any fields below are used */
+
+	struct gsm0808_speech_codec_list codec_list_bss_supported; /*< omit when .len == 0 */
+
 	/* more items are defined in the spec and may be added later */
-	bool more_items; /*!< always set this to false */
+	bool more_items2; /*!< always set this to false */
 };
 struct msgb *gsm0808_create_handover_request_ack2(const struct gsm0808_handover_request_ack *params);
 
diff --git a/src/gsm/gsm0808.c b/src/gsm/gsm0808.c
index 4f9c687..7013d8d 100644
--- a/src/gsm/gsm0808.c
+++ b/src/gsm/gsm0808.c
@@ -1045,6 +1045,12 @@
 	if (params->aoip_transport_layer)
 		gsm0808_enc_aoip_trasp_addr(msg, params->aoip_transport_layer);
 
+	/* AoIP: add Codec List (BSS Supported) 3.2.2.103.
+	 * (codec_list_bss_supported was added to struct gsm0808_handover_request_ack later than speech_codec_chosen
+	 * below, but it needs to come before it in the message coding). */
+	if (params->more_items && params->codec_list_bss_supported.len)
+		gsm0808_enc_speech_codec_list(msg, &params->codec_list_bss_supported);
+
 	/* AoIP: Speech Codec (Chosen) 3.2.2.104 */
 	if (params->speech_codec_chosen_present)
 		gsm0808_enc_speech_codec(msg, &params->speech_codec_chosen);