osmith has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-msc/+/41043?usp=email )
Change subject: gsm48_cc_tx_setup: fix speech bearer capabilities
......................................................................
gsm48_cc_tx_setup: fix speech bearer capabilities
Send the bearer capability IE from 3GPP TS 24.008 § D.1.2 for speech
instead of the result from gsm48_cc_tx_setup_set_bearer_cap() for the
network to MS direction. This is needed, because:
- We shall send spares for radio (which happens to be the same as
GSM48_BCAP_RRQ_FR_ONLY in the MS to network direction, see 3GPP TS
24.008 § D.1.1 and Table 10.5.102).
- We could send a speech version list in theory that MS are then
supposed to ignore (end of Table 10.5.103), but this causes bugs in
some MS so it is better to not send it (OS#6656).
Related: OS#6657, OS#6655, OS#6656
Related: osmo-ttcn3-hacks I8fd33cf2f7fb8a1c34851ecf54fccddd2efd0536
Change-Id: I7046e9244fd9d4301ee2c4df1147a619f753739c
---
M src/libmsc/gsm_04_08_cc.c
1 file changed, 20 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/43/41043/1
diff --git a/src/libmsc/gsm_04_08_cc.c b/src/libmsc/gsm_04_08_cc.c
index 63a9018..198d9d5 100644
--- a/src/libmsc/gsm_04_08_cc.c
+++ b/src/libmsc/gsm_04_08_cc.c
@@ -913,8 +913,7 @@
/* Compose Bearer Capability information that reflects only the codecs (Speech
* Versions) / CSD bearer services remaining after intersecting MS, BSS and
- * remote call leg restrictions. To store in trans for later use, and to
- * include in the outgoing CC Setup message. */
+ * remote call leg restrictions. To store in trans for later use. */
static int gsm48_cc_tx_setup_set_bearer_cap(struct gsm_trans *trans, const struct
gsm_mncc *setup)
{
int rc;
@@ -981,14 +980,31 @@
}
static struct msgb *gsm48_cc_tx_setup_encode_msg(const struct gsm_mncc *setup,
- const struct gsm_mncc_bearer_cap *bearer_cap)
+ const struct gsm_mncc_bearer_cap *bearer_cap_orig)
{
struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 CC SETUP");
struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh));
+ struct gsm_mncc_bearer_cap bearer_cap = *bearer_cap_orig;
gh->msg_type = GSM48_MT_CC_SETUP;
- gsm48_encode_bearer_cap(msg, 0, bearer_cap);
+ /* Send the bearer capability IE from 3GPP TS 24.008 § D.1.2 for speech
+ * instead of the result from gsm48_cc_tx_setup_set_bearer_cap() for
+ * the network to MS direction. This is needed, because:
+ * - We shall send spares for radio (which happens to be the same as
+ * GSM48_BCAP_RRQ_FR_ONLY in the MS to network direction, see 3GPP
+ * TS 24.008 § D.1.1 and Table 10.5.102).
+ * - We could send a speech version list in theory that MS are then
+ * supposed to ignore (end of Table 10.5.103), but this causes bugs
+ * in some MS so it is better to not send it (OS#6656). */
+ if (bearer_cap.transfer == GSM48_BCAP_ITCAP_SPEECH)
+ bearer_cap = (struct gsm_mncc_bearer_cap){
+ .transfer = GSM48_BCAP_ITCAP_SPEECH,
+ .radio = GSM48_BCAP_RRQ_FR_ONLY, /* spare */
+ .speech_ver = { -1 },
+ };
+
+ gsm48_encode_bearer_cap(msg, 0, &bearer_cap);
/* Facility */
if (setup->fields & MNCC_F_FACILITY)
--
To view, visit
https://gerrit.osmocom.org/c/osmo-msc/+/41043?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I7046e9244fd9d4301ee2c4df1147a619f753739c
Gerrit-Change-Number: 41043
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>