Attention is currently required from: osmith, fixeria.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/29875 )
Change subject: sccplite: Use mgwpool config to set up socket forwarding IPA-MGCP from MSC to MGW
......................................................................
Patch Set 2:
(1 comment)
File src/osmo-bsc/osmo_bsc_msc.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/29875/comment/2972f92e_8c70d8f3
PS2, Line 176: * than 1 MGW.
> maybe print an error log entry if the user tries to do this?
It's not that straighforward to find out the number of mgw configured in the pool, all the API is contained in a lib and there's no API for it.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/29875
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: If105dee52b8d36161c759f979eaef4579b47d365
Gerrit-Change-Number: 29875
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 26 Oct 2022 09:59:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: comment
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29870 )
Change subject: osmux: Generate AMR OA payload paddings bits as 0
......................................................................
osmux: Generate AMR OA payload paddings bits as 0
Some AMR format's payload size doesn't necessarily fit octet boundaries.
When AMR octet-aligned is used, padding bits are appended at the end to
fill the octet.
Until this patch, the padding bits where set with whatever payload fill
pattern was provided. Instead of doing so, better set the padding bits
to 0 to avoid conflicts when checking the received paytload later on,
since those bits are potentially be going to be set to 0 (eg when
converting to bandwidth-efficient).
Related: SYS#6161
Change-Id: I5bc68eb05c2f5500a259f4c73d14b51794f7f078
---
M library/AMR_Types.ttcn
M library/OSMUX_Emulation.ttcn
2 files changed, 17 insertions(+), 3 deletions(-)
Approvals:
Jenkins Builder: Verified
osmith: Looks good to me, approved
diff --git a/library/AMR_Types.ttcn b/library/AMR_Types.ttcn
index b4f044d..5586a20 100644
--- a/library/AMR_Types.ttcn
+++ b/library/AMR_Types.ttcn
@@ -33,7 +33,13 @@
const integer c_AMRFT_len[9] := {12, 13, 15, 17, 19, 20, 26, 31, 5};
function f_amrft_payload_len(INT4b amr_ft) return integer {
- return c_AMRFT_len[amr_ft];
+ return c_AMRFT_len[amr_ft];
+}
+
+const integer c_AMRFT_bits_len[9] := {95, 103, 118, 134, 148, 159, 204, 244, 39};
+
+function f_amrft_payload_bits_len(INT4b amr_ft) return integer {
+ return c_AMRFT_bits_len[amr_ft];
}
type record RTP_AMR_Hdr {
diff --git a/library/OSMUX_Emulation.ttcn b/library/OSMUX_Emulation.ttcn
index c6999de..4538fdf 100644
--- a/library/OSMUX_Emulation.ttcn
+++ b/library/OSMUX_Emulation.ttcn
@@ -374,12 +374,20 @@
log2str("No Space in TxHandleList for ", hdl.cid));
}
+/* Generate correctly-sized AMR payload based on amr_ft, using tx_fixed_payload as a fill pattern. */
function f_osmux_gen_expected_rx_rtp_payload(INT4b amr_ft, octetstring tx_fixed_payload) return octetstring {
+ var integer payload_len_bits;
var integer payload_len;
+ var bitstring payload_truncated_bits;
var octetstring payload_truncated;
- var integer i;
+
+ /* Generate the AMR payload as a bitstring, since some formats don't end up in octet boundary: */
+ payload_len_bits := f_amrft_payload_bits_len(amr_ft);
+ payload_truncated_bits := substr(oct2bit(tx_fixed_payload), 0, payload_len_bits);
+
+ /* Now convert it as an octet string filling final padding with zeroes: */
payload_len := f_amrft_payload_len(amr_ft);
- payload_truncated := substr(tx_fixed_payload, 0, payload_len);
+ payload_truncated := bit2oct(f_pad_bit(payload_truncated_bits, payload_len*8, '0'B));
return payload_truncated;
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29870
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I5bc68eb05c2f5500a259f4c73d14b51794f7f078
Gerrit-Change-Number: 29870
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: pespin, fixeria.
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/29875 )
Change subject: sccplite: Use mgwpool config to set up socket forwarding IPA-MGCP from MSC to MGW
......................................................................
Patch Set 2: Code-Review+1
(1 comment)
File src/osmo-bsc/osmo_bsc_msc.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/29875/comment/ab1324fa_d9c94559
PS2, Line 176: * than 1 MGW.
maybe print an error log entry if the user tries to do this?
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/29875
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: If105dee52b8d36161c759f979eaef4579b47d365
Gerrit-Change-Number: 29875
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 26 Oct 2022 09:57:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: neels, pespin.
Hello osmith, Jenkins Builder, neels, laforge, dexter,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-mgw/+/29865
to look at the new patch set (#4).
Change subject: mgw: Rename s/mgcp_send_rtp/mgcp_conn_rtp_dispatch_rtp/
......................................................................
mgw: Rename s/mgcp_send_rtp/mgcp_conn_rtp_dispatch_rtp/
The previous name is misleading since the function is not really sending
stuff over a socket, but rather handling/dispatching the incoming
message internally (and finally later it may be sent over a socket under
some conditions).
Change-Id: Idaf791997b8438a4aede50f614afa0d55ad41faa
---
M src/libosmo-mgcp/mgcp_network.c
1 file changed, 13 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/65/29865/4
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29865
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Idaf791997b8438a4aede50f614afa0d55ad41faa
Gerrit-Change-Number: 29865
Gerrit-PatchSet: 4
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: pespin.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-bsc/+/29875
to look at the new patch set (#2).
Change subject: sccplite: Use mgwpool config to set up socket forwarding IPA-MGCP from MSC to MGW
......................................................................
sccplite: Use mgwpool config to set up socket forwarding IPA-MGCP from MSC to MGW
In SCCPlite, the BSC receives the CN-side MGCP from the MSC through an
IPA conn, and it then forwards those messages to its co-located MGW
through a rawUDP socket created at startup.
This forwarding UDP socket still relied exclusively on the "mgw.conf"
struct which was filled only by the old VTY interface which was been
deprecated lately.
This patch moves the mgw-pool setup before the msc setup so that if the
VTY config file still uses the old VTY, the single MGW is added to the
MGW pool through mgcp_client_pool_register_single(). It then simply
picks the first available MGW from the pool when creating the raw UDP
MGCP-forwarding socket.
This means SCCPLite is still left with supporting only 1 MGW. If more
than one MGW is defined in the pool, then when the call is being set up
a different MGW could be picked from the pool while the CN-side MGCP
would still be sent to the MGW pool selected at osm-bsc startup.
This limitation coul be removed later on by adding a new VTY command
under the "msc" to pin calls for an MSC to an MGW with a given "mgw_nr"
from the pool, and that same MGW be looked for in the pool every time a
new call is being established.
Another possibility would be to avoid creating the "connected" UDP
socket at osmo-bsc startup, and rather use it in non-connected mode and
transmit (sendto) using the mgcp_client remote address during call
establishment.
In any case, this is left as future excercise since so far there hasn't
been any need for multiple MGWs in SCCPLite setups.
Related: SYS#5987
Change-Id: If105dee52b8d36161c759f979eaef4579b47d365
---
M src/osmo-bsc/osmo_bsc_main.c
M src/osmo-bsc/osmo_bsc_msc.c
2 files changed, 16 insertions(+), 10 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/75/29875/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/29875
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: If105dee52b8d36161c759f979eaef4579b47d365
Gerrit-Change-Number: 29875
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29864 )
Change subject: mgw: rx_rtp(): reorder checks and handlings
......................................................................
mgw: rx_rtp(): reorder checks and handlings
First validate the origin of the message, then later the content
of the message and finally execute whatever triggers are necessary.
This way contents from unknown senders are not even parsed or acted
upon, avoiding useless potential harm.
Change-Id: I011a6d7d705768c32a35cec5cd7169725a21a670
---
M src/libosmo-mgcp/mgcp_network.c
1 file changed, 4 insertions(+), 4 deletions(-)
Approvals:
Jenkins Builder: Verified
osmith: Looks good to me, approved
laforge: Looks good to me, but someone else must approve
diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c
index 26f3475..432c2b1 100644
--- a/src/libosmo-mgcp/mgcp_network.c
+++ b/src/libosmo-mgcp/mgcp_network.c
@@ -1514,7 +1514,9 @@
LOG_CONN_RTP(conn_src, LOGL_DEBUG, "rx_rtp(%u bytes)\n", msgb_length(msg));
- mgcp_conn_watchdog_kick(conn_src->conn);
+ /* Check if the origin of the RTP packet seems plausible */
+ if (!trunk->rtp_accept_all && check_rtp_origin(conn_src, from_addr))
+ return -1;
/* If AMR is configured for the ingress connection and conversion of the
* framing mode (octet-aligned vs. bandwith-efficient) is explicitly
@@ -1534,9 +1536,7 @@
}
}
- /* Check if the origin of the RTP packet seems plausible */
- if (!trunk->rtp_accept_all && check_rtp_origin(conn_src, from_addr))
- return -1;
+ mgcp_conn_watchdog_kick(conn_src->conn);
/* Execute endpoint specific implementation that handles the
* dispatching of the RTP data */
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29864
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I011a6d7d705768c32a35cec5cd7169725a21a670
Gerrit-Change-Number: 29864
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: merged