Attention is currently required from: fixeria, pespin.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/35796?usp=email )
Change subject: Implement M3UA-over-TCP (in addition to SCTP)
......................................................................
Patch Set 1:
(3 comments)
Patchset:
PS1:
> Well, tbh I also wonder whether we should be adding a new "m3ua-tcp" type. […]
I agree that conceptually it is "mixing layers". However, from the user interface point of view, it is probably easier to have it exposed at the same level as m3ua. However, if this becomes a common pattern and thre would also be SUA-over-TCP or M2PA/M2UA/... over TCP, a more generic solution might be better.
Let's check other SIGTRAN variants:
* M2PA (RFC4165) reserves a TCP port but doesn't specify it: NO
* M2UA (RFC3331) is specified both over SCTP and TCP: YES
* SUA (RFC3868) does not mention TCP once: NO
* IUA (RFC3057) is specified both over SCTP and TCP: YES
* V5UA (RFC3807) is specified both over SCTP and TCP: YES
So it seems that several other xUA versions also are specified to run on top of TCP, which (assuming we ever implement more of these) makes it a bit more clumsy to have everything duplicated at the level at whcih we're doing it now in this patch.
I'm not saying I have a very clear opinion about it or a strict requirement - just sharing all of the facts/arguments I found.
btw: it seems holger has created a SCTP<->TCP converter ages ago based on cellmgr_ng: https://github.com/moiji-mobile/stp-bridge
File src/osmo_ss7_asp.c:
https://gerrit.osmocom.org/c/libosmo-sccp/+/35796/comment/9df1dd50_b04707d0
PS1, Line 853: ss7_asp_m3ua_tcp_srv_conn_cb
> You can move most of it to a m3ua_tcp_asp_read_cb(struct osmo_ss7_asp *asp) and use asp->is_server t […]
note that all of this de-segmentation works differently with osmo_io. There, the de-segmentation call-back is passed to
Given that stream_{cli,srv}.c already fully supports osmo_io and provides osmo_stream_srv_set_segmentation_cb / osmo_stream_cli_set_segmentation_cb, I think this mechanism should be used.
I guess the only reason it isn't yet used in libosmo-sigtran is that it still calls osmo_stream_srv_create instead of osmo_stream_srv_create2
There is a patch for making that switch in I7d02037990f4af405839309510dc6c04e36c3369 but it's held back by some incompatibility/inconsistency with non-blocking connect of SCTP client sockets when using the io_uring backend 😞
As @andreas@eversberg.eu is trying to fix that right now, I guess the half-life of this code is going to be very low.
File src/osmo_ss7_vty.c:
https://gerrit.osmocom.org/c/libosmo-sccp/+/35796/comment/2f8968db_89a6be03
PS1, Line 62: "MTP3 User Adaptation (SCTP)\n" \
> IMO, it does not hurt to clarify in command documentation which option of the two with similar names […]
Ack
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35796?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I8c76d271472befacbeb998a93bbdc9e8660d9b5d
Gerrit-Change-Number: 35796
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: jolly <andreas(a)eversberg.eu>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 09 Feb 2024 08:44:50 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/35873?usp=email )
(
2 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: tweak example osmo-msc.cfg: 001 01
......................................................................
tweak example osmo-msc.cfg: 001 01
We have support for leading zeros there, so let's show it off.
Change-Id: I96c3495d0ab098535e34915f13979fb82b2e85cb
---
M doc/examples/osmo-msc/osmo-msc.cfg
1 file changed, 13 insertions(+), 2 deletions(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
fixeria: Looks good to me, but someone else must approve
diff --git a/doc/examples/osmo-msc/osmo-msc.cfg b/doc/examples/osmo-msc/osmo-msc.cfg
index aac27d2..7c5fe2d 100644
--- a/doc/examples/osmo-msc/osmo-msc.cfg
+++ b/doc/examples/osmo-msc/osmo-msc.cfg
@@ -13,8 +13,8 @@
no login
!
network
- network country code 1
- mobile network code 1
+ network country code 001
+ mobile network code 01
short name OsmoMSC
long name OsmoMSC
encryption a5 0
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/35873?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I96c3495d0ab098535e34915f13979fb82b2e85cb
Gerrit-Change-Number: 35873
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
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-MessageType: merged
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/35874?usp=email )
(
2 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: fix misnomer in msc_a.c: codec_cn -> codec_assigned
......................................................................
fix misnomer in msc_a.c: codec_cn -> codec_assigned
Before the codec filter, it would have been the CN side codec, but now
it is only the codec that the RAN reports as assigned, fed into the
codecs filter.
(prep for upcoming change in this code, to support AMR rate selection.)
Change-Id: Ie7966099c5565013018734b0c2028484c24341a7
---
M src/libmsc/msc_a.c
1 file changed, 21 insertions(+), 5 deletions(-)
Approvals:
laforge: Looks good to me, but someone else must approve
fixeria: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c
index a933bd2..4fa9676 100644
--- a/src/libmsc/msc_a.c
+++ b/src/libmsc/msc_a.c
@@ -1462,7 +1462,8 @@
}
if (codec_if_known) {
- const struct codec_mapping *codec_cn;
+ const struct codec_mapping *codec_assigned;
+
/* For 2G:
* - The Assignment Complete has returned a specific codec (e.g. FR3 for AMR FR).
* - Set this codec at the MGW endpoint facing the RAN.
@@ -1476,9 +1477,9 @@
* - ran_msg_iu.c always returns FR3 (AMR FR) for the assigned codec. Set that at the MGW towards CN.
* - So the MGW decapsulates IuUP <-> AMR
*/
- codec_cn = codec_mapping_by_gsm0808_speech_codec_type(codec_if_known->type);
+ codec_assigned = codec_mapping_by_gsm0808_speech_codec_type(codec_if_known->type);
/* TODO: use codec_mapping_by_gsm0808_speech_codec() to also match on codec_if_known->cfg */
- if (!codec_cn) {
+ if (!codec_assigned) {
LOG_TRANS(cc_trans, LOGL_ERROR, "Unknown codec in Assignment Complete: %s\n",
gsm0808_speech_codec_type_name(codec_if_known->type));
call_leg_release(msc_a->cc.call_leg);
@@ -1497,10 +1498,10 @@
/* Update RAN-side endpoint CI from Assignment result -- unless it is forced by the ran_infra, in which
* case it remains unchanged as passed to the earlier call of call_leg_ensure_ci(). */
if (msc_a->c.ran->force_mgw_codecs_to_ran.count == 0)
- rtp_stream_set_one_codec(rtps_to_ran, &codec_cn->sdp);
+ rtp_stream_set_one_codec(rtps_to_ran, &codec_assigned->sdp);
/* Update codec filter with Assignment result, for the CN side */
- cc_trans->cc.codecs.assignment = codec_cn->sdp;
+ cc_trans->cc.codecs.assignment = codec_assigned->sdp;
} else {
/* No codec passed in Assignment Complete, set 'codecs.assignment' to none. */
cc_trans->cc.codecs.assignment = (struct sdp_audio_codec){};
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/35874?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Ie7966099c5565013018734b0c2028484c24341a7
Gerrit-Change-Number: 35874
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
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-MessageType: merged
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/35875?usp=email )
(
2 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: cosmetic: move check for CSD further above
......................................................................
cosmetic: move check for CSD further above
Currently the CSD check is in the middle of figuring out the voice codec
for normal voice calls. Rather do the CSD check first, and then do voice
in one coherent section.
(prep for upcoming change in this code, to support AMR rate selection.)
Change-Id: Ibd21f0bb46c66a406904105564ce961a8760cbe7
---
M src/libmsc/msc_a.c
1 file changed, 24 insertions(+), 9 deletions(-)
Approvals:
laforge: Looks good to me, but someone else must approve
fixeria: Looks good to me, approved
pespin: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c
index 4fa9676..38f05a6 100644
--- a/src/libmsc/msc_a.c
+++ b/src/libmsc/msc_a.c
@@ -1464,6 +1464,15 @@
if (codec_if_known) {
const struct codec_mapping *codec_assigned;
+ /* Check for unexpected codec with CSD */
+ if (cc_trans->bearer_cap.transfer == GSM48_BCAP_ITCAP_UNR_DIG_INF &&
+ codec_if_known->type != GSM0808_SCT_CSD) {
+ LOG_TRANS(cc_trans, LOGL_ERROR, "Unexpected codec in Assignment Complete for CSD: %s\n",
+ gsm0808_speech_codec_type_name(codec_if_known->type));
+ call_leg_release(msc_a->cc.call_leg);
+ return;
+ }
+
/* For 2G:
* - The Assignment Complete has returned a specific codec (e.g. FR3 for AMR FR).
* - Set this codec at the MGW endpoint facing the RAN.
@@ -1486,15 +1495,6 @@
return;
}
- /* Check for unexpected codec with CSD */
- if (cc_trans->bearer_cap.transfer == GSM48_BCAP_ITCAP_UNR_DIG_INF &&
- codec_if_known->type != GSM0808_SCT_CSD) {
- LOG_TRANS(cc_trans, LOGL_ERROR, "Unexpected codec in Assignment Complete for CSD: %s\n",
- gsm0808_speech_codec_type_name(codec_if_known->type));
- call_leg_release(msc_a->cc.call_leg);
- return;
- }
-
/* Update RAN-side endpoint CI from Assignment result -- unless it is forced by the ran_infra, in which
* case it remains unchanged as passed to the earlier call of call_leg_ensure_ci(). */
if (msc_a->c.ran->force_mgw_codecs_to_ran.count == 0)
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/35875?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Ibd21f0bb46c66a406904105564ce961a8760cbe7
Gerrit-Change-Number: 35875
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
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-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/35877?usp=email )
(
2 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: tweak apidoc for sdp_audio_codecs_remove()
......................................................................
tweak apidoc for sdp_audio_codecs_remove()
Change-Id: I1d281f61497336783126aef39165426523b22112
---
M src/libmsc/sdp_msg.c
1 file changed, 11 insertions(+), 2 deletions(-)
Approvals:
fixeria: Looks good to me, approved
laforge: Looks good to me, but someone else must approve
Jenkins Builder: Verified
pespin: Looks good to me, approved
diff --git a/src/libmsc/sdp_msg.c b/src/libmsc/sdp_msg.c
index 9d787ad..2eda38f 100644
--- a/src/libmsc/sdp_msg.c
+++ b/src/libmsc/sdp_msg.c
@@ -206,8 +206,8 @@
return NULL;
}
-/* Remove the codec entry pointed at by 'codec'. 'codec' must point at an entry of 'sdp' (to use an external codec
- * instance, use sdp_audio_codecs_by_descr()).
+/* Remove the codec entry pointed at by 'codec'. 'codec' must point at an entry of 'ac'.
+ * To use any external codec instance, use sdp_audio_codecs_remove(ac, sdp_audio_codecs_by_descr(ac, codec)).
* Return 0 on success, -ENOENT if codec does not point at the sdp->codec array. */
int sdp_audio_codecs_remove(struct sdp_audio_codecs *ac, const struct sdp_audio_codec *codec)
{
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/35877?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I1d281f61497336783126aef39165426523b22112
Gerrit-Change-Number: 35877
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
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-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged