Attention is currently required from: falconia.
pespin has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/osmo-bsc/+/41647?usp=email )
Change subject: E1: add support for compressed CSD (TW-TS-007)
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/41647?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I5d98309cfc5d443278479252846c66a7da8b4ce4
Gerrit-Change-Number: 41647
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: falconia <falcon(a)freecalypso.org>
Gerrit-Comment-Date: Thu, 11 Dec 2025 10:47:18 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
falconia has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/41647?usp=email )
Change subject: E1: add support for compressed CSD (TW-TS-007)
......................................................................
E1: add support for compressed CSD (TW-TS-007)
Using TW-TS-007 format for CSD instead of CLEARMODE across AoIP
interface drastically reduces IP bandwidth usage, making CSD equal to
speech calls. If the CN requests use of this compressed RTP format
for CSD and the MGW supports it (currently the case with tw-e1abis-mgw
for E1 BTS), then enable it on AoIP side.
Depends: I74c9e76ebcce32ad20501134ec5089794acb4f62 (libosmocore.git)
Change-Id: I5d98309cfc5d443278479252846c66a7da8b4ce4
---
M TODO-RELEASE
M src/osmo-bsc/assignment_fsm.c
M src/osmo-bsc/lchan_rtp_fsm.c
3 files changed, 20 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/47/41647/1
diff --git a/TODO-RELEASE b/TODO-RELEASE
index 1d65ba1..fa4fe07 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -8,3 +8,4 @@
# If any interfaces have been removed or changed since the last public release: c:r:0.
#library what description / commit summary line
libosmo-mgcp-client >1.15.0 new API of fmtp in struct ptmap
+libosmogsm >1.12.0 OSMO_AOIP_RTP_PT_TWTS007 in gsm_48_103.h
diff --git a/src/osmo-bsc/assignment_fsm.c b/src/osmo-bsc/assignment_fsm.c
index c5363b8..f0a2781 100644
--- a/src/osmo-bsc/assignment_fsm.c
+++ b/src/osmo-bsc/assignment_fsm.c
@@ -568,6 +568,9 @@
if ((requested_ext & OSMO_RTP_EXT_TWTS006) && is_e1_bts(bts))
accepted_ext |= OSMO_RTP_EXT_TWTS006;
+ if ((requested_ext & OSMO_RTP_EXT_TWTS007) && is_e1_bts(bts))
+ accepted_ext |= OSMO_RTP_EXT_TWTS007;
+
conn->user_plane.rtp_extensions = accepted_ext;
}
diff --git a/src/osmo-bsc/lchan_rtp_fsm.c b/src/osmo-bsc/lchan_rtp_fsm.c
index 7d80a73..4d0217b 100644
--- a/src/osmo-bsc/lchan_rtp_fsm.c
+++ b/src/osmo-bsc/lchan_rtp_fsm.c
@@ -947,6 +947,7 @@
{
enum mgcp_codecs codec = chan_mode_to_mgcp_codec(lchan->activate.ch_mode_rate.chan_mode,
lchan->type == GSM_LCHAN_TCH_H? false : true);
+ uint8_t rtp_ext = lchan->conn->user_plane.rtp_extensions;
int pt, amr_oa;
if (codec < 0) {
@@ -993,7 +994,7 @@
* OsmoBTS in the future, it will strictly require no-alteration
* pass-through from the BSC-associated MGW. Therefore,
* indicate this format on both sides when it is enabled. */
- if (lchan->conn->user_plane.rtp_extensions & OSMO_RTP_EXT_TWTS006) {
+ if (rtp_ext & OSMO_RTP_EXT_TWTS006) {
OSMO_STRLCPY_ARRAY(verb_info->ptmap[0].fmtp,
"octet-align=1;tw-ts-006=1");
break;
@@ -1009,13 +1010,25 @@
break;
case CODEC_GSM_8000_1:
case CODEC_GSMEFR_8000_1:
- if (lchan->conn->user_plane.rtp_extensions & OSMO_RTP_EXT_TWTS001)
+ if (rtp_ext & OSMO_RTP_EXT_TWTS001)
OSMO_STRLCPY_ARRAY(verb_info->ptmap[0].fmtp, "tw-ts-001=1");
break;
case CODEC_GSMHR_8000_1:
- if (lchan->conn->user_plane.rtp_extensions & OSMO_RTP_EXT_TWTS002)
+ if (rtp_ext & OSMO_RTP_EXT_TWTS002)
OSMO_STRLCPY_ARRAY(verb_info->ptmap[0].fmtp, "tw-ts-002=1");
break;
+ case CODEC_CLEARMODE:
+ /* There are no fmtp parameters for CSData - however, if
+ * TW-TS-007 compressed CSD format was requested by the CN,
+ * then we need to tell our MGW to use this format. But only
+ * on AoIP side - the representation of CSD toward IP-based BTS
+ * remains CLEARMODE until and unless we decide to implement
+ * TW-TS-007 compressed CSD format in OsmoBTS. */
+ if ((rtp_ext & OSMO_RTP_EXT_TWTS007) && !bss_side) {
+ verb_info->ptmap[0].codec = CODEC_COMPR_CSD;
+ verb_info->ptmap[0].pt = OSMO_AOIP_RTP_PT_TWTS007;
+ }
+ break;
default:
break;
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/41647?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I5d98309cfc5d443278479252846c66a7da8b4ce4
Gerrit-Change-Number: 41647
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/41631?usp=email )
Change subject: MGW control: migrate to new API for fmtp
......................................................................
MGW control: migrate to new API for fmtp
Some codecs have additional parameters that need to be communicated
to the MGW using fmtp lines in SDP. We use this mechanism to
indicate octet-align=0|1 for AMR and signal the use of TW-TS-001
and TW-TS-002 extensions for FR/EFR and HR, respectively.
Migrate from legacy struct mgcp_codec_param (now deprecated)
to the new fmtp string API.
Depends: I84ba2ed5ab9d379ac0b675520796446ad6ee0710 (osmo-mgw.git)
Change-Id: Id869c9fa33a3ca6fecd30d5630741fbbf21cf6ed
---
M TODO-RELEASE
M src/osmo-bsc/lchan_rtp_fsm.c
2 files changed, 27 insertions(+), 45 deletions(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/TODO-RELEASE b/TODO-RELEASE
index 0ed7189..1d65ba1 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -7,3 +7,4 @@
# If any interfaces have been added since the last public release: c:r:a + 1.
# If any interfaces have been removed or changed since the last public release: c:r:0.
#library what description / commit summary line
+libosmo-mgcp-client >1.15.0 new API of fmtp in struct ptmap
diff --git a/src/osmo-bsc/lchan_rtp_fsm.c b/src/osmo-bsc/lchan_rtp_fsm.c
index c348833..8095378 100644
--- a/src/osmo-bsc/lchan_rtp_fsm.c
+++ b/src/osmo-bsc/lchan_rtp_fsm.c
@@ -947,7 +947,7 @@
{
enum mgcp_codecs codec = chan_mode_to_mgcp_codec(lchan->activate.ch_mode_rate.chan_mode,
lchan->type == GSM_LCHAN_TCH_H? false : true);
- int pt;
+ int pt, amr_oa;
if (codec < 0) {
LOG_LCHAN(lchan, LOGL_ERROR,
@@ -980,51 +980,32 @@
verb_info->ptmap[0].pt = pt;
verb_info->ptmap_len = 1;
- /* AMR requires additional parameters to be set up (framing mode) */
- if (codec == CODEC_AMR_8000_1) {
- verb_info->param_present = true;
- verb_info->param.amr_octet_aligned_present = true;
- }
-
- if (bss_side && codec == CODEC_AMR_8000_1) {
- /* FIXME: At the moment all BTSs we support are using the
- * octet-aligned payload format. However, in the future
- * we may support BTSs that are using bandwidth-efficient
- * format. In this case we will have to add functionality
- * that distinguishes by the BTS model which mode to use. */
- verb_info->param.amr_octet_aligned = true;
- }
- else if (!bss_side && codec == CODEC_AMR_8000_1) {
- verb_info->param.amr_octet_aligned = lchan->conn->sccp.msc->amr_octet_aligned;
- }
-
- /* If the CN has requested RTP payload format extensions (change from
- * RFC 3551 to TW-TS-001 for FR/EFR, or from RFC 5993 to TW-TS-002
- * for HRv1) via BSSMAP IE of TW-TS-003, we need to pass this request
- * to the MGW. With E1 BTS our MGW is the origin of the RTP stream
- * and thus the party responsible for payload format choices; with
- * IP BTS our MGW is merely a forwarder and thus can get by without
- * this detailed knowledge, but it doesn't hurt to inform the MGW
- * in all cases.
- *
- * Note that the following code does not perform conditional checks
- * of whether the selected codec is FR/EFR for TW-TS-001 or HRv1
- * for TW-TS-002, but instead checks only the extension mode bits.
- * This simplification is allowed by libosmo-mgcp-client API:
- * struct mgcp_codec_param has dedicated fields for fr_efr_twts001
- * and hr_twts002 parameters, and the code in libosmo-mgcp-client
- * then emits the corresponding a=fmtp lines only when the SDP
- * includes those codecs to which these attributes apply.
+ /* Some codecs require fmtp parameters, either always (AMR)
+ * or conditionally (FR & EFR with TW-TS-001, HR with TW-TS-002).
+ * Use the new fmtp string API to insert them into our outgoing
+ * CRCX/MDCX.
*/
- if (lchan->conn->user_plane.rtp_extensions & OSMO_RTP_EXT_TWTS001) {
- verb_info->param_present = true;
- verb_info->param.fr_efr_twts001_present = true;
- verb_info->param.fr_efr_twts001 = true;
- }
- if (lchan->conn->user_plane.rtp_extensions & OSMO_RTP_EXT_TWTS002) {
- verb_info->param_present = true;
- verb_info->param.hr_twts002_present = true;
- verb_info->param.hr_twts002 = true;
+ switch (codec) {
+ case CODEC_AMR_8000_1:
+ if (bss_side)
+ amr_oa = 1;
+ else
+ amr_oa = lchan->conn->sccp.msc->amr_octet_aligned;
+ snprintf(verb_info->ptmap[0].fmtp,
+ sizeof(verb_info->ptmap[0].fmtp),
+ "octet-align=%d", amr_oa);
+ break;
+ case CODEC_GSM_8000_1:
+ case CODEC_GSMEFR_8000_1:
+ if (lchan->conn->user_plane.rtp_extensions & OSMO_RTP_EXT_TWTS001)
+ OSMO_STRLCPY_ARRAY(verb_info->ptmap[0].fmtp, "tw-ts-001=1");
+ break;
+ case CODEC_GSMHR_8000_1:
+ if (lchan->conn->user_plane.rtp_extensions & OSMO_RTP_EXT_TWTS002)
+ OSMO_STRLCPY_ARRAY(verb_info->ptmap[0].fmtp, "tw-ts-002=1");
+ break;
+ default:
+ break;
}
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/41631?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Id869c9fa33a3ca6fecd30d5630741fbbf21cf6ed
Gerrit-Change-Number: 41631
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>
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/41632?usp=email )
Change subject: E1: add support for AMR in TW-TS-006 enhanced RTP format
......................................................................
E1: add support for AMR in TW-TS-006 enhanced RTP format
AMR speech codec on E1 BTS is currently possible at all only with
tw-e1abis-mgw and not with classic osmo-mgw. This new E1 AMR MGW
support includes all 3 possible RTP formats from the beginning:
RFC 4867 BWE, RFC 4867 OA and TW-TS-006 OAX.
Because TW-TS-006 is non-standard outside of GSM networks
specifically built with Osmocom+ThemWi hybrid stack, use of this
RTP format has to be explicitly requested by the CN via BSSMAP
extension of TW-TS-003, which OsmoBSC already understands.
Add TW-TS-006 to the set of supported RTP extensions with E1 BTS,
joining already supported TW-TS-001 and TW-TS-002.
Change-Id: Icf859ca4975079c91a2f41190da0ce94aa686365
---
M src/osmo-bsc/assignment_fsm.c
M src/osmo-bsc/lchan_rtp_fsm.c
2 files changed, 19 insertions(+), 1 deletion(-)
Approvals:
fixeria: Looks good to me, but someone else must approve
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/src/osmo-bsc/assignment_fsm.c b/src/osmo-bsc/assignment_fsm.c
index 4c54632..c5363b8 100644
--- a/src/osmo-bsc/assignment_fsm.c
+++ b/src/osmo-bsc/assignment_fsm.c
@@ -545,7 +545,10 @@
* Note that specific BTS features are needed only for IP-based BTS;
* for E1 BTS no special support is needed from the BTS itself in order
* to enable these RTP extensions, as they are implemented entirely
- * in the BSC-controlled MGW in this case.
+ * in the BSC-controlled MGW in this case. Furthermore, in the case of
+ * E1 BTS with either AMR or CSD, the MGW can be assumed to be tw-e1abis-mgw
+ * or a potential future Osmo-branded copy or derivative thereof,
+ * since classic osmo-mgw supports neither AMR nor CSD with E1 Abis.
*/
static void handle_rtp_extensions(struct gsm_subscriber_connection *conn,
struct gsm_bts *bts)
@@ -562,6 +565,9 @@
(osmo_bts_has_feature(&bts->features, BTS_FEAT_TWTS002) || is_e1_bts(bts)))
accepted_ext |= OSMO_RTP_EXT_TWTS002;
+ if ((requested_ext & OSMO_RTP_EXT_TWTS006) && is_e1_bts(bts))
+ accepted_ext |= OSMO_RTP_EXT_TWTS006;
+
conn->user_plane.rtp_extensions = accepted_ext;
}
diff --git a/src/osmo-bsc/lchan_rtp_fsm.c b/src/osmo-bsc/lchan_rtp_fsm.c
index 8095378..7d80a73 100644
--- a/src/osmo-bsc/lchan_rtp_fsm.c
+++ b/src/osmo-bsc/lchan_rtp_fsm.c
@@ -987,6 +987,18 @@
*/
switch (codec) {
case CODEC_AMR_8000_1:
+ /* Right now AMR with TW-TS-006 is supported only on E1 BTS,
+ * in which case there is no BSS side, only AoIP side.
+ * However, if TW-TS-006 support gets added to IP-native
+ * OsmoBTS in the future, it will strictly require no-alteration
+ * pass-through from the BSC-associated MGW. Therefore,
+ * indicate this format on both sides when it is enabled. */
+ if (lchan->conn->user_plane.rtp_extensions & OSMO_RTP_EXT_TWTS006) {
+ OSMO_STRLCPY_ARRAY(verb_info->ptmap[0].fmtp,
+ "octet-align=1;tw-ts-006=1");
+ break;
+ }
+ /* standard 3GPP/Osmocom/etc operation with RFC 4867 format */
if (bss_side)
amr_oa = 1;
else
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/41632?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Icf859ca4975079c91a2f41190da0ce94aa686365
Gerrit-Change-Number: 41632
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>
Attention is currently required from: falconia, neels.
laforge has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/osmo-bsc/+/41632?usp=email )
Change subject: E1: add support for AMR in TW-TS-006 enhanced RTP format
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/41632?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Icf859ca4975079c91a2f41190da0ce94aa686365
Gerrit-Change-Number: 41632
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-Comment-Date: Wed, 10 Dec 2025 23:16:53 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41646?usp=email )
Change subject: fixup: bts: create all components alive
......................................................................
fixup: bts: create all components alive
Making the ConnHdlr and lapdm_CT components alive resulted in
massive regressions. Specifically, trxcon started rejecting L1CTL
connections with the following message:
L1CTL server cannot accept more than 1 connection(s)
Apparently, alive components do not close the L1CTL connection
automatially, unless the L1CTL port is unmap()ped from the system
explicitly. Thus, testcases spawning multiple alive components
end up creating multiple L1CTL connections, which get rejected.
Let's revert those components that speak L1CTL back to normal
(non-alive), while keeping the emulation components alive.
Change-Id: Id5edfa2514024d1fe83f6c4082e096044ce8e6fd
Fixes: 713e7a86 ("bts: create all components alive")
---
M bts/BTS_Tests.ttcn
M bts/BTS_Tests_LAPDm.ttcn
2 files changed, 2 insertions(+), 2 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 455e696..7bac7ee 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -695,7 +695,7 @@
var charstring id := testcasename();
var ConnHdlr vc_conn;
- vc_conn := ConnHdlr.create(id) alive;
+ vc_conn := ConnHdlr.create(id);
/* connect to RSL Emulation main component */
connect(vc_conn:RSL, vc_RSL:CLIENT_PT);
connect(vc_conn:RSL_PROC, vc_RSL:RSL_PROC);
diff --git a/bts/BTS_Tests_LAPDm.ttcn b/bts/BTS_Tests_LAPDm.ttcn
index 0510695..fef2383 100644
--- a/bts/BTS_Tests_LAPDm.ttcn
+++ b/bts/BTS_Tests_LAPDm.ttcn
@@ -24,7 +24,7 @@
function f_lapdm_init() runs on lapdm_test_CT {
/* create the LAPDm component */
- lapdm_component := lapdm_CT.create alive;
+ lapdm_component := lapdm_CT.create;
/* connect our own LAPDM port to the LAPDM Service Provider of the LAPDm component */
connect(self:LAPDM, lapdm_component:LAPDM_SP);
/* connect the LAPDm compoent's lower-side port to the system L1CTL port (which is internally
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41646?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Id5edfa2514024d1fe83f6c4082e096044ce8e6fd
Gerrit-Change-Number: 41646
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>