osmith has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-bts/+/31795 )
Change subject: rsl_rx_ipac_XXcx: parse csd_fmt_d/ir
......................................................................
rsl_rx_ipac_XXcx: parse csd_fmt_d/ir
Parse the RTP CSD Format and reply with NACK if the mode is not
RSL_IPAC_RTP_CSD_TRAU_BTS, which is the only one we plan to implement
for now.
Related: OS#4393
Change-Id: Ibfc7811387df5224682d7e6a313d38648d3d8c48
---
M src/common/rsl.c
1 file changed, 28 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/95/31795/1
diff --git a/src/common/rsl.c b/src/common/rsl.c
index 64ffcb8..b3412d6 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -2703,12 +2703,14 @@
struct tlv_parsed tp;
struct gsm_lchan *lchan = msg->lchan;
struct gsm_bts *bts = lchan->ts->trx->bts;
- const uint8_t *payload_type, *speech_mode, *payload_type2, *osmux_cid;
+ const uint8_t *payload_type, *speech_mode, *payload_type2, *osmux_cid, *csd_fmt;
uint32_t connect_ip = 0;
uint16_t connect_port = 0;
int rc, inc_ip_port = 0;
char *name;
struct in_addr ia;
+ enum rsl_ipac_rtp_csd_format_d csd_fmt_d;
+ enum rsl_ipac_rtp_csd_format_ir csd_fmt_ir;
if (dch->c.msg_type == RSL_MT_IPAC_CRCX)
name = "CRCX";
@@ -2766,6 +2768,17 @@
inc_ip_port, dch->c.msg_type);
}
+ if ((csd_fmt = TLVP_VAL(&tp, RSL_IE_IPAC_RTP_CSD_FMT))) {
+ csd_fmt_d = *csd_fmt & 0xf;
+ csd_fmt_ir = *csd_fmt << 5;
+ LOGPC(DRSL, LOGL_DEBUG, "csd_fmt_d=%d csd_fmt_ir=%d ", csd_fmt_d,
csd_fmt_ir);
+ if (csd_fmt_d != RSL_IPAC_RTP_CSD_TRAU_BTS) {
+ LOGPLCHAN(lchan, DRSL, LOGL_ERROR, "Rx RSL IPAC %s, csd_fmt_d=%d is not
supported\n",
+ name, csd_fmt_d);
+ return tx_ipac_XXcx_nack(lchan, RSL_ERR_SERV_OPT_UNIMPL, inc_ip_port,
dch->c.msg_type);
+ }
+ }
+
if (!osmux_cid) { /* Regular RTP */
if (bts->osmux.use == OSMUX_USAGE_ONLY) {
LOGPLCHAN(lchan, DRSL, LOGL_ERROR, "Rx RSL IPAC XXcx without Osmux CID"
--
To view, visit
https://gerrit.osmocom.org/c/osmo-bts/+/31795
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ibfc7811387df5224682d7e6a313d38648d3d8c48
Gerrit-Change-Number: 31795
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange