This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
neels gerrit-no-reply at lists.osmocom.orgneels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/15946 )
Change subject: BSSMAP: decode Codec List (BSS Supported)
......................................................................
BSSMAP: decode Codec List (BSS Supported)
Actually decode the Codec List (BSS Supported) in BSSMAP, in both the Complete
Layer 3 Information and the Assignment Complete messages.
An upcoming patch improves codec negotiation and requires the BSS supported
codecs, which are so far ignored (which is/was a pity as osmo-bsc goes at great
lengths to compose those IEs).
Change-Id: I66c735c79e982388f06b5de783aa584c9d13569e
---
M include/osmocom/msc/ran_msg.h
M src/libmsc/ran_msg_a.c
2 files changed, 33 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/46/15946/1
diff --git a/include/osmocom/msc/ran_msg.h b/include/osmocom/msc/ran_msg.h
index 081c7ad..1b0e2e8 100644
--- a/include/osmocom/msc/ran_msg.h
+++ b/include/osmocom/msc/ran_msg.h
@@ -192,6 +192,7 @@
union {
struct {
const struct gsm0808_cell_id *cell_id;
+ const struct gsm0808_speech_codec_list *codec_list_bss_supported;
struct msgb *msg;
} compl_l3;
struct msgb *dtap;
@@ -226,6 +227,7 @@
struct osmo_sockaddr_str remote_rtp;
bool codec_present;
enum mgcp_codecs codec;
+ const struct gsm0808_speech_codec_list *codec_list_bss_supported;
bool osmux_present;
uint8_t osmux_cid;
} assignment_complete;
diff --git a/src/libmsc/ran_msg_a.c b/src/libmsc/ran_msg_a.c
index fc9a9d7..2307fa6 100644
--- a/src/libmsc/ran_msg_a.c
+++ b/src/libmsc/ran_msg_a.c
@@ -52,6 +52,8 @@
struct gsm0808_cell_id cell_id;
struct tlv_p_entry *ie_cell_id = TLVP_GET(tp, GSM0808_IE_CELL_IDENTIFIER);
struct tlv_p_entry *ie_l3_info = TLVP_GET(tp, GSM0808_IE_LAYER_3_INFORMATION);
+ struct tlv_p_entry *ie_codec_list_bss_supported = TLVP_GET(tp, GSM0808_IE_SPEECH_CODEC_LIST);
+ struct gsm0808_speech_codec_list codec_list_bss_supported;
struct ran_msg ran_dec_msg = {
.msg_type = RAN_MSG_COMPL_L3,
.msg_name = "BSSMAP Complete Layer 3 Information",
@@ -114,6 +116,20 @@
return -ENODATA;
}
+ /* Decode Codec List (BSS Supported) */
+ if (ie_codec_list_bss_supported) {
+ rc = gsm0808_dec_speech_codec_list(&codec_list_bss_supported,
+ ie_codec_list_bss_supported->val, ie_codec_list_bss_supported->len);
+ if (rc < 0) {
+ LOG_RAN_A_DEC_MSG(LOGL_ERROR,
+ "Complete Layer 3 Information: unable to decode IE Codec List (BSS Supported)"
+ " (rc=%d), continuing anyway\n", rc);
+ /* This IE is not critical, do not abort with error. */
+ } else
+ ran_dec_msg.compl_l3.codec_list_bss_supported = &codec_list_bss_supported;
+ }
+
+
return ran_decoded(ran_dec, &ran_dec_msg);
}
@@ -261,10 +277,12 @@
{
struct tlv_p_entry *ie_aoip_transp_addr = TLVP_GET(tp, GSM0808_IE_AOIP_TRASP_ADDR);
struct tlv_p_entry *ie_speech_codec = TLVP_GET(tp, GSM0808_IE_SPEECH_CODEC);
+ struct tlv_p_entry *ie_codec_list_bss_supported = TLVP_GET(tp, GSM0808_IE_SPEECH_CODEC_LIST);
struct tlv_p_entry *ie_osmux_cid = TLVP_GET(tp, GSM0808_IE_OSMO_OSMUX_CID);
struct sockaddr_storage rtp_addr;
struct sockaddr_in *rtp_addr_in;
struct gsm0808_speech_codec sc;
+ struct gsm0808_speech_codec_list codec_list_bss_supported;
int rc;
struct ran_msg ran_dec_msg = {
.msg_type = RAN_MSG_ASSIGNMENT_COMPLETE,
@@ -314,6 +332,19 @@
ran_dec_msg.assignment_complete.codec = ran_a_mgcp_codec_from_sc(&sc);
}
+ if (ie_codec_list_bss_supported) {
+ /* Decode Codec List (BSS Supported) */
+ rc = gsm0808_dec_speech_codec_list(&codec_list_bss_supported,
+ ie_codec_list_bss_supported->val, ie_codec_list_bss_supported->len);
+ if (rc < 0) {
+ LOG_RAN_A_DEC_MSG(LOGL_ERROR,
+ "Assignment Complete: unable to decode IE Codec List (BSS Supported)"
+ " (rc=%d), continuing anyway\n", rc);
+ /* This IE is not critical, do not abort with error. */
+ } else
+ ran_dec_msg.assignment_complete.codec_list_bss_supported = &codec_list_bss_supported;
+ }
+
return ran_decoded(ran_dec, &ran_dec_msg);
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15946
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I66c735c79e982388f06b5de783aa584c9d13569e
Gerrit-Change-Number: 15946
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191103/f4a6c459/attachment.htm>