falconia has uploaded this change for review.
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 change 41647. To unsubscribe, or for help writing mail filters, visit settings.