diff options
author | Oliver Smith <osmith@sysmocom.de> | 2023-03-06 13:11:13 +0100 |
---|---|---|
committer | osmith <osmith@sysmocom.de> | 2023-03-08 11:52:12 +0000 |
commit | 2689ad73a88364cd5760f125cc63533c31e7305f (patch) | |
tree | daaa523a5dc400dc16be1a101498f898e8f13c2e /src/osmo-bsc/lchan_rtp_fsm.c | |
parent | 6d3da5401fb8f96cdfe56868caf737b807cf9ff6 (diff) |
abis_rsl: CSD: add RTP_CSD_FMT IE to CRCX/MDCX
Related: OS#4393
Change-Id: I4964b268124d29354e252c2ee509866ae75fab6d
Diffstat (limited to 'src/osmo-bsc/lchan_rtp_fsm.c')
-rw-r--r-- | src/osmo-bsc/lchan_rtp_fsm.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/osmo-bsc/lchan_rtp_fsm.c b/src/osmo-bsc/lchan_rtp_fsm.c index c5dab498b..c568a6625 100644 --- a/src/osmo-bsc/lchan_rtp_fsm.c +++ b/src/osmo-bsc/lchan_rtp_fsm.c @@ -307,7 +307,26 @@ static void lchan_rtp_fsm_wait_ipacc_crcx_ack_onenter(struct osmo_fsm_inst *fi, return; } - if (lchan->current_ch_indctr == GSM0808_CHAN_SPEECH) { + if (lchan->current_ch_indctr == GSM0808_CHAN_DATA) { + enum rsl_ipac_rtp_csd_format_d format_d = RSL_IPAC_RTP_CSD_TRAU_BTS; + + if (lchan->activate.ch_mode_rate.data_transparent) { + val = ipacc_rtp_csd_fmt_transp(&lchan->activate.ch_mode_rate, format_d); + if (val < 0) { + lchan_rtp_fail("Cannot determine Abis/IP RTP CSD format for rsl_cmod_csd_t=%d", + lchan->activate.ch_mode_rate.data_rate.t); + return; + } + } else { + val = ipacc_rtp_csd_fmt_non_transp(&lchan->activate.ch_mode_rate, format_d); + if (val < 0) { + lchan_rtp_fail("Cannot determine Abis/IP RTP CSD format for rsl_cmod_csd_nt=%d", + lchan->activate.ch_mode_rate.data_rate.nt); + return; + } + } + lchan->abis_ip.rtp_csd_fmt = val; + } else { val = ipacc_speech_mode(lchan->activate.ch_mode_rate.chan_mode, lchan->type); if (val < 0) { lchan_rtp_fail("Cannot determine Abis/IP speech mode for tch_mode=%s type=%s", |