ASCI: Check if codec mapping exists for given codec

Fixes: CID#322143
Change-Id: I65cdf2b7feaa72167c8002cd4d47183f99cab761
This commit is contained in:
Andreas Eversberg
2023-07-19 10:01:20 +02:00
committed by laforge
parent d63776051e
commit 33a433a561

View File

@@ -2347,6 +2347,11 @@ static void vgcs_cell_fsm_null(struct osmo_fsm_inst *fi, uint32_t event, void *d
}
/* Hard coded codec: GSM V1 */
cm = codec_mapping_by_gsm0808_speech_codec_type(GSM0808_SCT_FR1);
if (!cm) {
LOG_CELL(cell, LOGL_DEBUG, "Selected codec not supported, cannot continue.\n");
cell_clear(cell, GSM0808_CAUSE_PROTOCOL_ERROR_BETWEEN_BSS_AND_MSC);
break;
}
rtp_stream_set_one_codec(cell->rtps, &cm->sdp);
/* Set initial mode. */
rtp_stream_set_mode(cell->rtps, MGCP_CONN_RECV_ONLY);