libmsc: add 3k1_AUDIO and FAX_G3 bearer cap

Bearer capability 3k1_AUDIO and FAX_G3 are only important
for the interworking function, the MSC should handle
these calls the same as CSD calls with unrestricted digital
bearer capability.

Change-Id: I198aa867a8f236b8ddd05d3b2356f64b876fd4c1
This commit is contained in:
Manawyrm 2023-10-14 17:23:04 +02:00
parent 1792ba92c1
commit 1ed12eac93
5 changed files with 16 additions and 0 deletions

View File

@ -825,6 +825,8 @@ static int gsm48_cc_tx_setup(struct gsm_trans *trans, void *arg)
LOG_TRANS(trans, LOGL_INFO,
"Got no information of remote audio codecs: neither SDP nor Bearer Capability. Trying anyway.\n");
break;
case GSM48_BCAP_ITCAP_3k1_AUDIO:
case GSM48_BCAP_ITCAP_FAX_G3:
case GSM48_BCAP_ITCAP_UNR_DIG_INF:
if (setup->fields & MNCC_F_BEARER_CAP) {
trans->cc.remote = (struct sdp_msg){};
@ -878,6 +880,8 @@ static int gsm48_cc_tx_setup(struct gsm_trans *trans, void *arg)
return rc;
}
break;
case GSM48_BCAP_ITCAP_3k1_AUDIO:
case GSM48_BCAP_ITCAP_FAX_G3:
case GSM48_BCAP_ITCAP_UNR_DIG_INF:
if (csd_bs_list_to_bearer_cap(&bearer_cap, &trans->cc.local.bearer_services) == 0) {
LOG_TRANS(trans, LOGL_ERROR, "Error composing Bearer Capability for CC Setup\n");

View File

@ -88,6 +88,8 @@ static int mncc_setup_ind(struct gsm_call *call,
/* we currently only do speech and CSD */
switch (setup->bearer_cap.transfer) {
case GSM_MNCC_BCAP_SPEECH:
case GSM_MNCC_BCAP_AUDIO:
case GSM_MNCC_BCAP_FAX_G3:
case GSM_MNCC_BCAP_UNR_DIG:
break;
default:

View File

@ -669,6 +669,8 @@ static void msc_a_call_leg_ran_local_addr_available(struct msc_a *msc_a)
return;
}
break;
case GSM48_BCAP_ITCAP_3k1_AUDIO:
case GSM48_BCAP_ITCAP_FAX_G3:
case GSM48_BCAP_ITCAP_UNR_DIG_INF:
if (!cc_trans->cc.local.bearer_services.count) {
LOG_TRANS(cc_trans, LOGL_ERROR, "Assignment not possible, no matching bearer service: %s\n",

View File

@ -422,6 +422,8 @@ static void msc_ho_send_handover_request(struct msc_a *msc_a)
return;
}
break;
case GSM48_BCAP_ITCAP_3k1_AUDIO:
case GSM48_BCAP_ITCAP_FAX_G3:
case GSM48_BCAP_ITCAP_UNR_DIG_INF:
if (csd_bs_list_to_gsm0808_channel_type(&channel_type, &cc_trans->cc.local.bearer_services)) {
msc_ho_failed(msc_a, GSM0808_CAUSE_EQUIPMENT_FAILURE,

View File

@ -54,6 +54,8 @@ void trans_cc_filter_run(struct gsm_trans *trans)
LOG_TRANS(trans, LOGL_DEBUG, "codecs: %s\n",
codec_filter_to_str(&trans->cc.codecs, &trans->cc.local, &trans->cc.remote));
break;
case GSM48_BCAP_ITCAP_3k1_AUDIO:
case GSM48_BCAP_ITCAP_FAX_G3:
case GSM48_BCAP_ITCAP_UNR_DIG_INF:
csd_filter_run(&trans->cc.csd, &trans->cc.local, &trans->cc.remote);
LOG_TRANS(trans, LOGL_DEBUG, "codec/BS: %s\n",
@ -78,6 +80,8 @@ void trans_cc_filter_set_ms_from_bc(struct gsm_trans *trans, const struct gsm_mn
case GSM48_BCAP_ITCAP_SPEECH:
sdp_audio_codecs_from_bearer_cap(&trans->cc.codecs.ms, bcap);
break;
case GSM48_BCAP_ITCAP_3k1_AUDIO:
case GSM48_BCAP_ITCAP_FAX_G3:
case GSM48_BCAP_ITCAP_UNR_DIG_INF:
sdp_audio_codecs_set_csd(&trans->cc.codecs.ms);
csd_bs_list_from_bearer_cap(&trans->cc.csd.ms, bcap);
@ -101,6 +105,8 @@ void trans_cc_set_remote_from_bc(struct gsm_trans *trans, const struct gsm_mncc_
case GSM48_BCAP_ITCAP_SPEECH:
sdp_audio_codecs_from_bearer_cap(&trans->cc.remote.audio_codecs, bcap);
break;
case GSM48_BCAP_ITCAP_3k1_AUDIO:
case GSM48_BCAP_ITCAP_FAX_G3:
case GSM48_BCAP_ITCAP_UNR_DIG_INF:
sdp_audio_codecs_set_csd(&trans->cc.remote.audio_codecs);
csd_bs_list_from_bearer_cap(&trans->cc.remote.bearer_services, bcap);