Attention is currently required from: fixeria.
pespin has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41627?usp=email )
Change subject: s1gw/osmo-s1gw.config: migrate to sctp_{server,client} blocks
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41627?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I7e403fe0e270b6009b09ff8ed28f8b226cba4397
Gerrit-Change-Number: 41627
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 09 Dec 2025 09:55:52 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
falconia has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/41633?usp=email )
Change subject: gsm/protocol/gsm_48_103.h: add definition for TW-TS-007
......................................................................
gsm/protocol/gsm_48_103.h: add definition for TW-TS-007
TW-TS-007 is a Themyscira/Osmocom extension to AoIP interface
that provides a much more compact payload format for CSD, matching
the size of compressed speech payloads. Clause 9 in this spec
fixes the payload type on AoIP interface for this pseudo-codec
as 127, distinguishing it from CLEARMODE and from all speech
codecs.
Osmocom applications that may need payload type numbers for the
standard set of codecs defined in TS 48.103 may also need the
payload type for TW-TS-007 if they implement this extension,
as this payload format is intended to "stand on equal footing"
with standard AoIP payload types. Therefore, add it to the same
header file.
Change-Id: I74c9e76ebcce32ad20501134ec5089794acb4f62
---
M include/osmocom/gsm/protocol/gsm_48_103.h
1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/33/41633/1
diff --git a/include/osmocom/gsm/protocol/gsm_48_103.h b/include/osmocom/gsm/protocol/gsm_48_103.h
index d40acac..6fe461b 100644
--- a/include/osmocom/gsm/protocol/gsm_48_103.h
+++ b/include/osmocom/gsm/protocol/gsm_48_103.h
@@ -19,3 +19,6 @@
/* circuit-switched data */
#define OSMO_AOIP_RTP_PT_CSD 120 /* without redundancy */
#define OSMO_AOIP_RTP_PT_CSD_RED 121 /* with redundancy */
+
+/* Osmocom and Themyscira extensions */
+#define OSMO_AOIP_RTP_PT_TWTS007 127 /* compressed form of CSD */
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41633?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I74c9e76ebcce32ad20501134ec5089794acb4f62
Gerrit-Change-Number: 41633
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
falconia has uploaded this change for review. ( 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(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/31/41631/1
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: newchange
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>
falconia has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/41630?usp=email )
Change subject: MGW control: migrate to new API for codecs and payload types
......................................................................
MGW control: migrate to new API for codecs and payload types
struct mgcp_conn_peer in libosmo-mgcp-client API used to have a
mandatory codecs[] array for codec specification and an optional
ptmap[] array to be used only when the default payload type needs
to be overridden. But now the codecs[] array is deprecated,
and new API features (see following patches) require the use of
ptmap[] array, with mandatory specification of payload type by
the MGCP client. Convert osmo-bsc to this new API.
Change-Id: Iafc38a3da64ce7c2f060a32864174dcde9f57b56
---
M src/osmo-bsc/lchan_rtp_fsm.c
1 file changed, 59 insertions(+), 17 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/30/41630/1
diff --git a/src/osmo-bsc/lchan_rtp_fsm.c b/src/osmo-bsc/lchan_rtp_fsm.c
index 559a30b..c348833 100644
--- a/src/osmo-bsc/lchan_rtp_fsm.c
+++ b/src/osmo-bsc/lchan_rtp_fsm.c
@@ -21,6 +21,7 @@
*/
#include <osmocom/core/fsm.h>
+#include <osmocom/gsm/protocol/gsm_48_103.h>
#include <osmocom/gsm/rtp_extensions.h>
#include <osmocom/netif/rtp.h>
#include <osmocom/mgcp_client/mgcp_client_endpoint_fsm.h>
@@ -894,9 +895,36 @@
}
}
+static int chan_mode_to_mgcp_aoip_pt(enum mgcp_codecs codec)
+{
+ switch (codec) {
+ case CODEC_GSM_8000_1:
+ return OSMO_AOIP_RTP_PT_FR1;
+
+ case CODEC_GSMEFR_8000_1:
+ return OSMO_AOIP_RTP_PT_EFR;
+
+ case CODEC_GSMHR_8000_1:
+ return OSMO_AOIP_RTP_PT_HR1;
+
+ case CODEC_AMR_8000_1:
+ return OSMO_AOIP_RTP_PT_AMR;
+
+ case CODEC_CLEARMODE:
+ return OSMO_AOIP_RTP_PT_CSD;
+
+ default:
+ /* Error: unknown codec */
+ return -1;
+ }
+}
+
static int chan_mode_to_mgcp_bss_pt(enum mgcp_codecs codec)
{
switch (codec) {
+ case CODEC_GSM_8000_1:
+ return RTP_PT_GSM_FULL;
+
case CODEC_GSMHR_8000_1:
return RTP_PT_GSM_HALF;
@@ -906,9 +934,11 @@
case CODEC_AMR_8000_1:
return RTP_PT_AMR;
+ case CODEC_CLEARMODE:
+ return RTP_PT_CSDATA;
+
default:
- /* Not an error, we just leave it to libosmo-mgcp-client to
- * decide over the PT. */
+ /* Error: unknown codec */
return -1;
}
}
@@ -917,34 +947,46 @@
{
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 custom_pt;
+ int pt;
if (codec < 0) {
LOG_LCHAN(lchan, LOGL_ERROR,
"Unable to determine MGCP codec type for %s in chan-mode %s\n",
gsm_chan_t_name(lchan->type), gsm48_chan_mode_name(lchan->activate.ch_mode_rate.chan_mode));
- verb_info->codecs_len = 0;
+ verb_info->ptmap_len = 0;
return;
}
- verb_info->codecs[0] = codec;
- verb_info->codecs_len = 1;
-
- /* Setup custom payload types (only for BSS side and when required) */
- custom_pt = chan_mode_to_mgcp_bss_pt(codec);
- if (bss_side && custom_pt > 0) {
- verb_info->ptmap[0].codec = codec;
- verb_info->ptmap[0].pt = custom_pt;
- verb_info->ptmap_len = 1;
+ /* The new libosmo-mgcp-client API requires us to provide explicit
+ * payload type number for every codec - no more internal defaulting.
+ * Legacy payload types used on IPA/Osmocom Abis-IP are defined in
+ * <osmocom/netif/rtp.h> as RTP_PT_*, new TS 48.103 (AoIP user plane)
+ * payload types are defined in <osmocom/gsm/protocol/gsm_48_103.h>
+ * as OSMO_AOIP_RTP_PT_*.
+ */
+ if (bss_side)
+ pt = chan_mode_to_mgcp_bss_pt(codec);
+ else
+ pt = chan_mode_to_mgcp_aoip_pt(codec);
+ if (pt < 0) {
+ LOG_LCHAN(lchan, LOGL_ERROR,
+ "Unable to determine RTP payload type for %s in chan-mode %s\n",
+ gsm_chan_t_name(lchan->type), gsm48_chan_mode_name(lchan->activate.ch_mode_rate.chan_mode));
+ verb_info->ptmap_len = 0;
+ return;
}
+ verb_info->ptmap[0].codec = codec;
+ verb_info->ptmap[0].pt = pt;
+ verb_info->ptmap_len = 1;
+
/* AMR requires additional parameters to be set up (framing mode) */
- if (verb_info->codecs[0] == CODEC_AMR_8000_1) {
+ if (codec == CODEC_AMR_8000_1) {
verb_info->param_present = true;
verb_info->param.amr_octet_aligned_present = true;
}
- if (bss_side && verb_info->codecs[0] == CODEC_AMR_8000_1) {
+ 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
@@ -952,7 +994,7 @@
* that distinguishes by the BTS model which mode to use. */
verb_info->param.amr_octet_aligned = true;
}
- else if (!bss_side && verb_info->codecs[0] == CODEC_AMR_8000_1) {
+ else if (!bss_side && codec == CODEC_AMR_8000_1) {
verb_info->param.amr_octet_aligned = lchan->conn->sccp.msc->amr_octet_aligned;
}
@@ -988,5 +1030,5 @@
bool mgcp_codec_is_picked(const struct mgcp_conn_peer *verb_info, enum mgcp_codecs codec)
{
- return verb_info->codecs[0] == codec;
+ return verb_info->ptmap[0].codec == codec;
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/41630?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: Iafc38a3da64ce7c2f060a32864174dcde9f57b56
Gerrit-Change-Number: 41630
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon(a)freecalypso.org>