aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2023-07-05 15:47:04 +0200
committerOliver Smith <osmith@sysmocom.de>2023-07-06 14:52:06 +0200
commit412cf92d3ca15670b317e08d43335c581c06d862 (patch)
treec34c96f16d168808ace1e02c6e865f245187f635
parent8d0aa2616673f31e2d2304983dc6e1ccb4a34cd6 (diff)
gsm48_cc_tx_setup: use MNCC bcaps for CSD
Use the MNCC bearer capabilities in CC setup for CSD, if available. Note that in the MNCC_F_BEARER_CAP code path sdp_audio_codecs_set_csd() also gets called by trans_cc_set_remote_from_bc(). Related: OS#4394 Change-Id: I56e49ebc41696912a81b8f4f63fbc36d0b605e9e
-rw-r--r--src/libmsc/gsm_04_08_cc.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/libmsc/gsm_04_08_cc.c b/src/libmsc/gsm_04_08_cc.c
index 5664f4cf3..8773db768 100644
--- a/src/libmsc/gsm_04_08_cc.c
+++ b/src/libmsc/gsm_04_08_cc.c
@@ -826,7 +826,16 @@ static int gsm48_cc_tx_setup(struct gsm_trans *trans, void *arg)
"Got no information of remote audio codecs: neither SDP nor Bearer Capability. Trying anyway.\n");
break;
case GSM48_BCAP_ITCAP_UNR_DIG_INF:
- sdp_audio_codecs_set_csd(&trans->cc.codecs.ms);
+ if (setup->fields & MNCC_F_BEARER_CAP) {
+ trans->cc.remote = (struct sdp_msg){};
+ trans_cc_set_remote_from_bc(trans, &setup->bearer_cap);
+ LOG_TRANS_CAT(trans, DMNCC, LOGL_DEBUG, "rx %s Bearer Cap: remote=%s\n",
+ get_mncc_name(setup->msg_type), sdp_msg_to_str(&trans->cc.remote));
+ } else {
+ LOG_TRANS(trans, LOGL_INFO,
+ "Got no information of remote Bearer Capability. Trying anyway.\n");
+ sdp_audio_codecs_set_csd(&trans->cc.codecs.ms);
+ }
break;
default:
LOG_TRANS(trans, LOGL_ERROR, "Handling of information transfer capability %d not implemented\n",