osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31549 )
Change subject: rsl_tx_ipacc_crcx/mdcx: omit speech mode for CSD ...................................................................... rsl_tx_ipacc_crcx/mdcx: omit speech mode for CSD Omit the A-bis/IP specific RSL_IE_IPAC_SPEECH_MODE, as it doesn't make sense for circuit switched data. Related: OS#4393 Change-Id: I6641b713177276bcf798f08123e1dd2e88ffdce6 --- M src/osmo-bsc/abis_rsl.c M src/osmo-bsc/lchan_rtp_fsm.c 2 files changed, 56 insertions(+), 22 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve Jenkins Builder: Verified osmith: Looks good to me, approved diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c index 20c90f8..5d60119 100644 --- a/src/osmo-bsc/abis_rsl.c +++ b/src/osmo-bsc/abis_rsl.c @@ -2755,16 +2755,25 @@ dh->c.msg_discr = ABIS_RSL_MDISC_IPACCESS; dh->chan_nr = chan_nr; - /* 0x1- == receive-only, 0x-1 == EFR codec */ - msgb_tv_put(msg, RSL_IE_IPAC_SPEECH_MODE, lchan->abis_ip.speech_mode); + if (lchan->current_ch_indctr == GSM0808_CHAN_DATA) { + LOG_LCHAN(lchan, LOGL_DEBUG, + "Sending IPACC CRCX to BTS: RTP_PAYLOAD=%d (CSD) osmux_use=%d osmux_loc_cid=%d\n", + lchan->abis_ip.rtp_payload, + lchan->abis_ip.osmux.use, lchan->abis_ip.osmux.local_cid); + } else { + /* 0x1- == receive-only, 0x-1 == EFR codec */ + msgb_tv_put(msg, RSL_IE_IPAC_SPEECH_MODE, lchan->abis_ip.speech_mode); + + LOG_LCHAN(lchan, LOGL_DEBUG, + "Sending IPACC CRCX to BTS: speech_mode=0x%02x RTP_PAYLOAD=%d osmux_use=%d osmux_loc_cid=%d\n", + lchan->abis_ip.speech_mode, lchan->abis_ip.rtp_payload, + lchan->abis_ip.osmux.use, lchan->abis_ip.osmux.local_cid); + } + msgb_tv_put(msg, RSL_IE_IPAC_RTP_PAYLOAD, lchan->abis_ip.rtp_payload); if (lchan->abis_ip.osmux.use) msgb_tlv_put(msg, RSL_IE_OSMO_OSMUX_CID, 1, &lchan->abis_ip.osmux.local_cid); - LOG_LCHAN(lchan, LOGL_DEBUG, - "Sending IPACC CRCX to BTS: speech_mode=0x%02x RTP_PAYLOAD=%d osmux_use=%d osmux_loc_cid=%d\n", - lchan->abis_ip.speech_mode, lchan->abis_ip.rtp_payload, - lchan->abis_ip.osmux.use, lchan->abis_ip.osmux.local_cid); msg->dst = rsl_chan_link(lchan); @@ -2798,7 +2807,8 @@ att_ip = (uint32_t *)msgb_put(msg, sizeof(uint32_t)); *att_ip = htonl(dest_ip); msgb_tv16_put(msg, RSL_IE_IPAC_REMOTE_PORT, dest_port); - msgb_tv_put(msg, RSL_IE_IPAC_SPEECH_MODE, lchan->abis_ip.speech_mode); + if (lchan->current_ch_indctr == GSM0808_CHAN_SPEECH) + msgb_tv_put(msg, RSL_IE_IPAC_SPEECH_MODE, lchan->abis_ip.speech_mode); msgb_tv_put(msg, RSL_IE_IPAC_RTP_PAYLOAD, lchan->abis_ip.rtp_payload); if (lchan->abis_ip.rtp_payload2) msgb_tv_put(msg, RSL_IE_IPAC_RTP_PAYLOAD2, lchan->abis_ip.rtp_payload2); @@ -2821,14 +2831,23 @@ if (!msg) return -EINVAL; - LOG_LCHAN(lchan, LOGL_DEBUG, "Sending IPACC MDCX to BTS:" - " %s:%u rtp_payload=%u rtp_payload2=%u conn_id=%u speech_mode=0x%02x\n", - ip_to_a(lchan->abis_ip.connect_ip), - lchan->abis_ip.connect_port, - lchan->abis_ip.rtp_payload, - lchan->abis_ip.rtp_payload2, - lchan->abis_ip.conn_id, - lchan->abis_ip.speech_mode); + if (lchan->current_ch_indctr == GSM0808_CHAN_DATA) + LOG_LCHAN(lchan, LOGL_DEBUG, "Sending IPACC MDCX to BTS:" + " %s:%u rtp_payload=%u (CSD) rtp_payload2=%u conn_id=%u\n", + ip_to_a(lchan->abis_ip.connect_ip), + lchan->abis_ip.connect_port, + lchan->abis_ip.rtp_payload, + lchan->abis_ip.rtp_payload2, + lchan->abis_ip.conn_id); + else + LOG_LCHAN(lchan, LOGL_DEBUG, "Sending IPACC MDCX to BTS:" + " %s:%u rtp_payload=%u rtp_payload2=%u conn_id=%u speech_mode=0x%02x\n", + ip_to_a(lchan->abis_ip.connect_ip), + lchan->abis_ip.connect_port, + lchan->abis_ip.rtp_payload, + lchan->abis_ip.rtp_payload2, + lchan->abis_ip.conn_id, + lchan->abis_ip.speech_mode); return abis_rsl_sendmsg(msg); } diff --git a/src/osmo-bsc/lchan_rtp_fsm.c b/src/osmo-bsc/lchan_rtp_fsm.c index 4cfec54..78ba477 100644 --- a/src/osmo-bsc/lchan_rtp_fsm.c +++ b/src/osmo-bsc/lchan_rtp_fsm.c @@ -307,14 +307,16 @@ return; } - 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", - get_value_string(gsm48_chan_mode_names, lchan->activate.ch_mode_rate.chan_mode), - gsm_chan_t_name(lchan->type)); - return; + if (lchan->current_ch_indctr == GSM0808_CHAN_SPEECH) { + 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", + get_value_string(gsm48_chan_mode_names, lchan->activate.ch_mode_rate.chan_mode), + gsm_chan_t_name(lchan->type)); + return; + } + lchan->abis_ip.speech_mode = val; } - lchan->abis_ip.speech_mode = val; val = ipacc_payload_type(lchan->activate.ch_mode_rate.chan_mode, lchan->type); if (val < 0) { -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31549 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I6641b713177276bcf798f08123e1dd2e88ffdce6 Gerrit-Change-Number: 31549 Gerrit-PatchSet: 6 Gerrit-Owner: osmith <osm...@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <lafo...@osmocom.org> Gerrit-Reviewer: osmith <osm...@sysmocom.de> Gerrit-Reviewer: pespin <pes...@sysmocom.de> Gerrit-MessageType: merged