Attention is currently required from: laforge.
falconia has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/37285?usp=email )
Change subject: {de,en}code8_hr: fix totally broken functions
......................................................................
Patch Set 1: Code-Review+2
(1 comment)
Patchset:
PS1:
> This shows one more reason to have unit tests (see my other related comment to another patch in this […]
I hope you realize that when someone uses their non-funded spare time to make improvements to retronetworking functionality, they cannot be held to the same standard (w.r.t. unit test requirements) as paid employees working on functionality that has commercial backing. That being said, if and when I receive that promised InSite BTS from @osmocom.account@tbspace.de, once I get it running and capture some real-life TRAU-UL traffic (plus real-life TRAU-DL output from the TCSM2 TRAU I already have), I will look into putting together some unit tests based on those real-life traffic examples.
Meanwhile, on the present patch, seeing 3 CR+1's including yours, I will go ahead and CR+2 it, then merge the series in which the other two patches already got CR+2.
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/37285?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I7cf0275f2ff212e001db38d7b090f222f292cdb0
Gerrit-Change-Number: 37285
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Wed, 26 Jun 2024 15:53:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: comment
falconia has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/37129?usp=email )
Change subject: add support for RTP extensions via TW-TS-003
......................................................................
add support for RTP extensions via TW-TS-003
Themyscira Wireless Technical Specification TW-TS-003 defines
a mechanism whereby the CN can ask the BSS (via an extension to
BSSMAP Assignment procedure) to use enhanced RTP payload formats
that are contrary to the stipulations of 3GPP TS 48.103.
However, these RTP extensions need to originate at the BTS,
hence if the BSC receives a request from the CN to use them,
it needs to validate that request against BTS capabilities,
and then actually pass it to the BTS via an Osmocom-defined
RSL IE that replicates TW-TS-003 in Abis. Implement this logic.
Intra-BSC handovers: if ThemWi RTP extensions are used in a GSM
network that allows handovers, all deployed BTSes must have
the same capabilities with regard to these extensions, practically
meaning same or close-enough version of OsmoBTS. OsmoBSC checks
CN-requested RTP extensions against BTS capabilities on the
initial assignment, but not on subsequent handovers.
Inter-BSC handovers: support for RTP extensions in this deployment
configuration (networks that allow such handovers) remains to be
implemented.
OsmoMGW considerations: if all deployed BTSes are native IP
OsmoBTS, as opposed to E1-based, OsmoMGW does not need to know
anything at all about ThemWi RTP extensions. However, future
support for these RTP extensions with E1-based BTSes will require
adding a mechanism for communicating the necessary non-standard
request to OsmoMGW.
LCLS considerations: enabling ThemWi RTP extensions affects only
the uplink RTP output path in OsmoBTS and not the path from RTP
input to downlink Tx. The latter path accepts both basic and
extended RTP formats; any ThemWi extensions in the incoming RTP
stream are harmlessly ignored. Therefore, activation of ThemWi
RTP extensions will have no impact on LCLS operation.
Related: OS#6448
Depends: I0eccfe5ddcf44f8f20440acb01e2d4870ec0cd91 (libosmocore)
Change-Id: I2a742afff160a9a8286633bf5ae0dd4a828c7a42
---
M include/osmocom/bsc/gsm_data.h
M src/osmo-bsc/abis_rsl.c
M src/osmo-bsc/assignment_fsm.c
M src/osmo-bsc/osmo_bsc_bssap.c
4 files changed, 120 insertions(+), 0 deletions(-)
Approvals:
fixeria: Looks good to me, but someone else must approve
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index bd51a42..6bffcc4 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -150,6 +150,7 @@
uint16_t msc_rtp_port;
bool use_osmux;
uint8_t osmux_cid;
+ uint8_t rtp_extensions;
/* Rate/codec setting in preference order (need at least 1 !) */
int n_ch_mode_rate;
@@ -359,6 +360,7 @@
/* RTP address where the MSC expects us to send the RTP stream coming from the BTS. */
char msc_assigned_rtp_addr[INET6_ADDRSTRLEN];
uint16_t msc_assigned_rtp_port;
+ uint8_t rtp_extensions;
/* The endpoint at the MGW used to join both BTS and MSC side connections, e.g.
* "rtpbridge/23@mgw". */
diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c
index 49e8b52..9d922d0 100644
--- a/src/osmo-bsc/abis_rsl.c
+++ b/src/osmo-bsc/abis_rsl.c
@@ -3033,6 +3033,11 @@
if (lchan->abis_ip.osmux.use)
msgb_tlv_put(msg, RSL_IE_OSMO_OSMUX_CID, 1, &lchan->abis_ip.osmux.local_cid);
+ /* Are we serving a GSM subscriber for whom the CN requested
+ * the use of RTP extensions? */
+ if (lchan->conn && lchan->conn->user_plane.rtp_extensions)
+ msgb_tlv_put(msg, RSL_IE_OSMO_RTP_EXTENSIONS, 1,
+ &lchan->conn->user_plane.rtp_extensions);
msg->dst = rsl_chan_link(lchan);
@@ -3077,6 +3082,9 @@
msgb_tv_put(msg, RSL_IE_IPAC_RTP_PAYLOAD2, lchan->abis_ip.rtp_payload2);
if (lchan->abis_ip.osmux.use)
msgb_tlv_put(msg, RSL_IE_OSMO_OSMUX_CID, 1, &lchan->abis_ip.osmux.local_cid);
+ if (lchan->conn && lchan->conn->user_plane.rtp_extensions)
+ msgb_tlv_put(msg, RSL_IE_OSMO_RTP_EXTENSIONS, 1,
+ &lchan->conn->user_plane.rtp_extensions);
msg->dst = rsl_chan_link(lchan);
diff --git a/src/osmo-bsc/assignment_fsm.c b/src/osmo-bsc/assignment_fsm.c
index 5e98a28..79c4ac7 100644
--- a/src/osmo-bsc/assignment_fsm.c
+++ b/src/osmo-bsc/assignment_fsm.c
@@ -22,6 +22,8 @@
#include <osmocom/core/tdef.h>
#include <osmocom/gsm/gsm0808.h>
+#include <osmocom/gsm/rtp_extensions.h>
+#include <osmocom/gsm/bts_features.h>
#include <osmocom/mgcp_client/mgcp_client_endpoint_fsm.h>
@@ -172,6 +174,13 @@
msg->l3h[1] = msgb_l3len(msg) - 2;
}
+static void bssap_extend_twts003(struct msgb *msg, uint8_t accepted_ext)
+{
+ OSMO_ASSERT(msg->l3h[1] == msgb_l3len(msg) - 2); /*TL not in len */
+ msgb_tlv_put(msg, GSM0808_IE_THEMWI_RTP_EXTENSIONS, 1, &accepted_ext);
+ msg->l3h[1] = msgb_l3len(msg) - 2;
+}
+
static void send_assignment_complete(struct gsm_subscriber_connection *conn)
{
int rc;
@@ -267,6 +276,9 @@
conn->assignment.req.use_osmux)
bssap_extend_osmux(resp, osmux_cid);
+ if (conn->user_plane.rtp_extensions)
+ bssap_extend_twts003(resp, conn->user_plane.rtp_extensions);
+
rate_ctr_inc(rate_ctr_group_get_ctr(conn->sccp.msc->msc_ctrs, MSC_CTR_BSSMAP_TX_DT1_ASSIGNMENT_COMPLETE));
rc = gscon_sigtran_send(conn, resp);
if (rc) {
@@ -478,6 +490,7 @@
.aoip = gscon_is_aoip(conn),
.msc_assigned_cic = conn->user_plane.msc_assigned_cic,
.msc_rtp_port = conn->user_plane.msc_assigned_rtp_port,
+ .rtp_extensions = conn->user_plane.rtp_extensions,
.n_ch_mode_rate = 1,
.ch_mode_rate_list = { lchan->current_ch_mode_rate },
.target_lchan = to_lchan,
@@ -522,6 +535,31 @@
return _reassignment_request(assign_for, lchan, NULL, new_lchan_type, -1, -1);
}
+/*
+ * The CN may have requested RTP extensions (payload format modifications
+ * contrary to the stipulations of TS 48.103) via BSSMAP IE of TW-TS-003.
+ * This function checks whether or not we can fulfill that request
+ * based on BTS capabilities, and sets the bitmask of accepted extensions
+ * that will be passed on to the BTS via Abis RSL.
+ */
+static void handle_rtp_extensions(struct gsm_subscriber_connection *conn,
+ struct gsm_bts *bts)
+{
+ const struct assignment_request *req = &conn->assignment.req;
+ uint8_t requested_ext = req->rtp_extensions;
+ uint8_t accepted_ext = 0;
+
+ if ((requested_ext & OSMO_RTP_EXT_TWTS001) &&
+ osmo_bts_has_feature(&bts->features, BTS_FEAT_TWTS001))
+ accepted_ext |= OSMO_RTP_EXT_TWTS001;
+
+ if ((requested_ext & OSMO_RTP_EXT_TWTS002) &&
+ osmo_bts_has_feature(&bts->features, BTS_FEAT_TWTS002))
+ accepted_ext |= OSMO_RTP_EXT_TWTS002;
+
+ conn->user_plane.rtp_extensions = accepted_ext;
+}
+
void assignment_fsm_start(struct gsm_subscriber_connection *conn, struct gsm_bts *bts,
struct assignment_request *req)
{
@@ -553,6 +591,8 @@
return;
conn->assignment.ch_indctr = req->ch_indctr;
+ handle_rtp_extensions(conn, bts);
+
if (!req->target_lchan && reuse_existing_lchan(conn)) {
/* The already existing lchan is suitable for this mode */
conn->assignment.new_lchan = NULL;
diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c
index 2a98054..c9e8e5e 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -992,6 +992,26 @@
return 0;
}
+static int bssmap_handle_ass_req_tp_rtp_ext(struct tlv_parsed *tp,
+ struct assignment_request *req,
+ uint8_t *cause)
+{
+ /* If the special TW-TS-003 BSSMAP IE is not included,
+ * we are in standard 3GPP-compliant operation mode -
+ * no more work is needed here. */
+ if (!TLVP_PRESENT(tp, GSM0808_IE_THEMWI_RTP_EXTENSIONS))
+ return 0;
+
+ /* the format is TLV with one required byte of value */
+ if (TLVP_LEN(tp, GSM0808_IE_THEMWI_RTP_EXTENSIONS) < 1) {
+ *cause = GSM0808_CAUSE_INFORMATION_ELEMENT_OR_FIELD_MISSING;
+ return -1;
+ }
+
+ req->rtp_extensions = *TLVP_VAL(tp, GSM0808_IE_THEMWI_RTP_EXTENSIONS);
+ return 0;
+}
+
static int bssmap_handle_ass_req_ct_data(struct gsm_subscriber_connection *conn, struct tlv_parsed *tp,
struct gsm0808_channel_type *ct, struct assignment_request *req,
uint8_t *cause)
@@ -1056,6 +1076,10 @@
return -1;
}
+ /* optional RTP extensions per TW-TS-003 */
+ if (bssmap_handle_ass_req_tp_rtp_ext(tp, req, cause) < 0)
+ return -1;
+
return 0;
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/37129?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I2a742afff160a9a8286633bf5ae0dd4a828c7a42
Gerrit-Change-Number: 37129
Gerrit-PatchSet: 2
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged
Attention is currently required from: pespin.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37298?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: SIP_Templates: Allow setting Session-Expires and Min_SE in INVITE templates
......................................................................
SIP_Templates: Allow setting Session-Expires and Min_SE in INVITE templates
Related: SYS#6987
Change-Id: Ib2bc6258c072e88539ccc852d057b517822936bd
---
M asterisk/SIP_ConnectionHandler.ttcn
M library/SIP_Templates.ttcn
M sip/SIP_Tests.ttcn
3 files changed, 56 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/98/37298/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37298?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ib2bc6258c072e88539ccc852d057b517822936bd
Gerrit-Change-Number: 37298
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
falconia has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/36896?usp=email )
Change subject: common: add support for TW-TS-001
......................................................................
common: add support for TW-TS-001
Themyscira Wireless Technical Specification TW-TS-001 defines
an enhanced RTP transport format for FR and EFR codecs within
an IP-based GSM RAN, restoring the full functionality and semantics
of GSM 08.60 TRAU-UL format that were lost in the industry transition
to RTP with payload formats standardized by TIPHON and IETF.
Given that this new enhanced RTP transport format runs counter
to commonly accepted standards, it is strictly optional. OsmoBTS
always accepts both basic and extended RTP formats, but it sends
the extended RTP format of TW-TS-001 only when commanded to do so
by the BSC via an RSL extension IE; OsmoBSC will in turn direct
the BTS to use this extension only when the CN asks for it via
the BSSMAP extension defined in TW-TS-003.
Spec references:
https://www.freecalypso.org/specs/tw-ts-001-v010100.txthttps://www.freecalypso.org/specs/tw-ts-003-v010002.txt
Related: OS#6448
Depends: I0eccfe5ddcf44f8f20440acb01e2d4870ec0cd91 (libosmocore)
Change-Id: Id997e8666bc19e60936aaa83b43a968d30320bd7
---
M TODO-RELEASE
M include/osmo-bts/lchan.h
M src/common/bts.c
M src/common/l1sap.c
M src/common/rsl.c
M src/common/rtp_input_preen.c
6 files changed, 151 insertions(+), 18 deletions(-)
Approvals:
falconia: Verified
laforge: Looks good to me, approved
pespin: Looks good to me, but someone else must approve
diff --git a/TODO-RELEASE b/TODO-RELEASE
index 96426a5..6448b19 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -9,4 +9,5 @@
#library what description / commit summary line
libosmogsm >1.9.0 added new PRIM_INFO to include/osmocom/gsm/l1sap.h
libosmogsm >1.9.0 use of RLP code in libosmogsm
+libosmogsm >1.9.0 BTS feature & RSL defs for ThemWi RTP extensions
libosmoctrl >1.9.0 use ctrl_cmd_send2()
diff --git a/include/osmo-bts/lchan.h b/include/osmo-bts/lchan.h
index 585483b..60c2710 100644
--- a/include/osmo-bts/lchan.h
+++ b/include/osmo-bts/lchan.h
@@ -168,6 +168,7 @@
uint16_t conn_id;
uint8_t rtp_payload;
uint8_t rtp_payload2;
+ uint8_t rtp_extensions;
uint8_t speech_mode;
struct {
bool use;
diff --git a/src/common/bts.c b/src/common/bts.c
index 56765ec..633e0d1 100644
--- a/src/common/bts.c
+++ b/src/common/bts.c
@@ -393,6 +393,7 @@
osmo_bts_set_feature(bts->features, BTS_FEAT_ETWS_PN);
osmo_bts_set_feature(bts->features, BTS_FEAT_IPV6_NSVC);
osmo_bts_set_feature(bts->features, BTS_FEAT_PAGING_COORDINATION);
+ osmo_bts_set_feature(bts->features, BTS_FEAT_TWTS001);
/* Maximum TA supported by the PHY (can be overridden by PHY specific code) */
bts->support.max_ta = MAX_TA_DEF;
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 5f275cd..5a900f8 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -34,6 +34,7 @@
#include <osmocom/gsm/gsm_utils.h>
#include <osmocom/gsm/rsl.h>
#include <osmocom/gsm/rlp.h>
+#include <osmocom/gsm/rtp_extensions.h>
#include <osmocom/core/gsmtap.h>
#include <osmocom/core/gsmtap_util.h>
#include <osmocom/core/utils.h>
@@ -1990,13 +1991,42 @@
send_ul_rtp_packet_speech(lchan, fn, msg->data, msg->len);
}
+/* a helper function for emitting FR/EFR UL in TW-TS-001 format */
+static void send_rtp_twts001(struct gsm_lchan *lchan, uint32_t fn,
+ struct msgb *msg, bool good_frame)
+{
+ uint8_t teh;
+ bool send_frame;
+
+ if (msg->len == GSM_FR_BYTES || msg->len == GSM_EFR_BYTES) {
+ if (good_frame)
+ teh = 0xE0;
+ else
+ teh = 0xE2;
+ send_frame = true;
+ } else {
+ teh = 0xE6;
+ send_frame = false;
+ }
+ /* always set DTXd and TAF bits */
+ if (lchan->ts->trx->bts->dtxd)
+ teh |= 0x08;
+ if (fn % 104 == 52)
+ teh |= 0x01;
+ if (send_frame) {
+ msgb_push_u8(msg, teh);
+ send_ul_rtp_packet_speech(lchan, fn, msg->data, msg->len);
+ } else {
+ send_ul_rtp_packet_speech(lchan, fn, &teh, 1);
+ }
+}
+
/* A helper function for l1sap_tch_ind(): handling BFI
*
- * Please note that we pass the msgb to this function, even though it is
- * currently not used. This msgb passing is a provision for adding
- * support for TRAU-UL-like RTP payload formats like TW-TS-001 that allow
- * indicating BFI along with deemed-bad frame data bits, just like
- * GSM 08.60 and 08.61 TRAU-UL frames.
+ * Please note that the msgb passed to this function is used only when
+ * the CN asked the BSS to emit extended RTP formats (currently TW-TS-001,
+ * later TW-TS-002 as well) that can indicate BFI along with deemed-bad
+ * frame data bits, just like GSM 08.60 and 08.61 TRAU-UL frames.
*/
static void tch_ul_bfi_handler(struct gsm_lchan *lchan,
const struct gsm_time *g_time, struct msgb *msg)
@@ -2005,6 +2035,20 @@
uint8_t ecu_out[GSM_FR_BYTES];
int rc;
+ /* Are we on TCH/FS or TCH/EFS, configured to emit TW-TS-001 extended
+ * RTP format? If so, emit BFI per that spec. The placement of
+ * this check before the ECU is intentional: the modes of TW-TS-001
+ * UL output (closely replicating the classic GSM architecture in which
+ * a BTS never applies an ECU to its UL output) and internal UL ECU
+ * are mutually exclusive. */
+ if ((lchan->abis_ip.rtp_extensions & OSMO_RTP_EXT_TWTS001) &&
+ lchan->type == GSM_LCHAN_TCH_F &&
+ (lchan->tch_mode == GSM48_CMODE_SPEECH_V1 ||
+ lchan->tch_mode == GSM48_CMODE_SPEECH_EFR)) {
+ send_rtp_twts001(lchan, fn, msg, false);
+ return;
+ }
+
/* Are we applying an ECU to this uplink, and are we in a state
* (not DTX pause) where we emit ECU output? */
if (lchan->ecu_state && !osmo_ecu_is_dtx_pause(lchan->ecu_state)) {
@@ -2084,11 +2128,27 @@
/* hand msg to RTP code for transmission */
switch (lchan->rsl_cmode) {
case RSL_CMOD_SPD_SPEECH:
- if (bts->emit_hr_rfc5993 && lchan->type == GSM_LCHAN_TCH_H &&
- lchan->tch_mode == GSM48_CMODE_SPEECH_V1)
- send_rtp_rfc5993(lchan, fn, msg);
- else
+ /* support different RTP output formats per codec */
+ if (lchan->type == GSM_LCHAN_TCH_F &&
+ (lchan->tch_mode == GSM48_CMODE_SPEECH_V1 ||
+ lchan->tch_mode == GSM48_CMODE_SPEECH_EFR)) {
+ /* FR and EFR codecs */
+ if (lchan->abis_ip.rtp_extensions & OSMO_RTP_EXT_TWTS001)
+ send_rtp_twts001(lchan, fn, msg, true);
+ else
+ send_ul_rtp_packet_speech(lchan, fn, msg->data, msg->len);
+ } else if (lchan->type == GSM_LCHAN_TCH_H &&
+ lchan->tch_mode == GSM48_CMODE_SPEECH_V1) {
+ /* HR codec: TS 101 318 or RFC 5993,
+ * will also support TW-TS-002 in the future. */
+ if (bts->emit_hr_rfc5993)
+ send_rtp_rfc5993(lchan, fn, msg);
+ else
+ send_ul_rtp_packet_speech(lchan, fn, msg->data, msg->len);
+ } else {
+ /* generic case, no RTP alterations */
send_ul_rtp_packet_speech(lchan, fn, msg->data, msg->len);
+ }
break;
case RSL_CMOD_SPD_DATA:
send_ul_rtp_packet_data(lchan, tch_ind, msg->data, msg->len);
diff --git a/src/common/rsl.c b/src/common/rsl.c
index 40690f0..cc802c8 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -2979,7 +2979,7 @@
struct gsm_lchan *lchan = msg->lchan;
struct gsm_bts *bts = lchan->ts->trx->bts;
const uint8_t *payload_type, *speech_mode, *payload_type2, *csd_fmt;
- const uint8_t *osmux_cid = NULL;
+ const uint8_t *osmux_cid = NULL, *rtp_extensions = NULL;
uint32_t connect_ip = 0;
uint16_t connect_port = 0;
int rc, inc_ip_port = 0;
@@ -3036,6 +3036,12 @@
if (osmux_cid)
LOGPC(DRSL, LOGL_DEBUG, "osmux_cid=%u ", *osmux_cid);
+ /* same here */
+ if (TLVP_PRES_LEN(&tp, RSL_IE_OSMO_RTP_EXTENSIONS, 1))
+ rtp_extensions = TLVP_VAL(&tp, RSL_IE_OSMO_RTP_EXTENSIONS);
+ if (rtp_extensions)
+ LOGPC(DRSL, LOGL_DEBUG, "rtp_extensions=%u ", *rtp_extensions);
+
if (dch->c.msg_type == RSL_MT_IPAC_CRCX && connect_ip && connect_port)
inc_ip_port = 1;
@@ -3164,6 +3170,12 @@
if (speech_mode)
lchan->abis_ip.speech_mode = *speech_mode;
+ /* Configure non-standard RTP extensions */
+ if (rtp_extensions)
+ lchan->abis_ip.rtp_extensions = *rtp_extensions;
+ else
+ lchan->abis_ip.rtp_extensions = 0;
+
/* FIXME: CSD, jitterbuffer, compression */
return rsl_tx_ipac_XXcx_ack(lchan, payload_type2 ? 1 : 0,
diff --git a/src/common/rtp_input_preen.c b/src/common/rtp_input_preen.c
index 5729229..addd55b 100644
--- a/src/common/rtp_input_preen.c
+++ b/src/common/rtp_input_preen.c
@@ -64,21 +64,49 @@
static enum pl_input_decision
input_preen_fr(const uint8_t *rtp_pl, unsigned rtp_pl_len)
{
- if (rtp_pl_len != GSM_FR_BYTES)
+ switch (rtp_pl_len) {
+ case GSM_FR_BYTES: /* standard TS 101 318 or RFC 3551 format */
+ /* magic must be correct */
+ if ((rtp_pl[0] & 0xF0) != 0xD0)
+ return PL_DECISION_DROP;
+ return PL_DECISION_ACCEPT;
+ case GSM_FR_BYTES+1: /* Themyscira TW-TS-001 format */
+ /* TEH octet must be correct, and not a BFI */
+ if ((rtp_pl[0] & 0xF6) != 0xE0)
+ return PL_DECISION_DROP;
+ /* standard FR magic must be correct too */
+ if ((rtp_pl[1] & 0xF0) != 0xD0)
+ return PL_DECISION_DROP;
+ /* Strip TEH octet, leaving only standard FR payload. */
+ return PL_DECISION_STRIP_HDR_OCTET;
+ default:
+ /* invalid payload */
return PL_DECISION_DROP;
- if ((rtp_pl[0] & 0xF0) != 0xD0)
- return PL_DECISION_DROP;
- return PL_DECISION_ACCEPT;
+ }
}
static enum pl_input_decision
input_preen_efr(const uint8_t *rtp_pl, unsigned rtp_pl_len)
{
- if (rtp_pl_len != GSM_EFR_BYTES)
+ switch (rtp_pl_len) {
+ case GSM_EFR_BYTES: /* standard TS 101 318 or RFC 3551 format */
+ /* magic must be correct */
+ if ((rtp_pl[0] & 0xF0) != 0xC0)
+ return PL_DECISION_DROP;
+ return PL_DECISION_ACCEPT;
+ case GSM_EFR_BYTES+1: /* Themyscira TW-TS-001 format */
+ /* TEH octet must be correct, and not a BFI */
+ if ((rtp_pl[0] & 0xF6) != 0xE0)
+ return PL_DECISION_DROP;
+ /* standard EFR magic must be correct too */
+ if ((rtp_pl[1] & 0xF0) != 0xC0)
+ return PL_DECISION_DROP;
+ /* Strip TEH octet, leaving only standard EFR payload. */
+ return PL_DECISION_STRIP_HDR_OCTET;
+ default:
+ /* invalid payload */
return PL_DECISION_DROP;
- if ((rtp_pl[0] & 0xF0) != 0xC0)
- return PL_DECISION_DROP;
- return PL_DECISION_ACCEPT;
+ }
}
static enum pl_input_decision
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/36896?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Id997e8666bc19e60936aaa83b43a968d30320bd7
Gerrit-Change-Number: 36896
Gerrit-PatchSet: 5
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: falconia, laforge, neels.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/36967?usp=email )
Change subject: gsm48_ie: add helper function for speech bearer cap on GSM MS side
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
Patchset:
PS1:
> @vyanitskiy@sysmocom. […]
I don't have a strong opinion here. To me it's fine either way, whether we add this function here or directly to osmocom-bb.git. If anyone urgently needs this API (I doubt so), then feel free to CR+2 and merge. If this can wait, I can move this API to osmocom-bb.git within the next few weeks.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/36967?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Iaf41687da1d377e98f26e6a16d991ab7d95be0fc
Gerrit-Change-Number: 36967
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: falconia <falcon(a)freecalypso.org>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Wed, 26 Jun 2024 15:26:28 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: comment
Attention is currently required from: falconia.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/37129?usp=email )
Change subject: add support for RTP extensions via TW-TS-003
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/37129?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I2a742afff160a9a8286633bf5ae0dd4a828c7a42
Gerrit-Change-Number: 37129
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: falconia <falcon(a)freecalypso.org>
Gerrit-Comment-Date: Wed, 26 Jun 2024 13:41:40 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment