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