Attention is currently required from: pespin.
laforge has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-msc/+/40630?usp=email )
Change subject: msc: Initial implementation of N-PCSTATE.ind
......................................................................
Patch Set 1:
(3 comments)
File src/libmsc/sccp_ran.c:
https://gerrit.osmocom.org/c/osmo-msc/+/40630/comment/697a42d7_aae5c31d?usp… :
PS1, Line 84: LOGP(DMSC, LOGL_DEBUG, "N-PCSTATE ind: affected_pc=%u sp_status=%s remote_sccp_status=%s\n",
as usual, please print pointcodes in the user-configured point-code format, not [just?] as integer.
https://gerrit.osmocom.org/c/osmo-msc/+/40630/comment/792e5b53_8b8bbb33?usp… :
PS1, Line 148: "now unreachable: N-PCSTATE ind: pc=%u sp_status=%s remote_sccp_status=%s\n",
as usual, please print pointcodes in the user-configured point-code format, not [just?] as integer.
https://gerrit.osmocom.org/c/osmo-msc/+/40630/comment/57cf2b6f_c7f19529?usp… :
PS1, Line 156: "now available: N-PCSTATE ind: pc=%u sp_status=%s remote_sccp_status=%s\n",
as usual, please print pointcodes in the user-configured point-code format, not [just?] as integer.
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/40630?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Ice1b2c163b1b0d134fcaa1c8bf543038a35fabdf
Gerrit-Change-Number: 40630
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Jul 2025 19:05:32 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40634?usp=email )
Change subject: RAN_Emulation: Fix handling of IMSI in RANAP Paging
......................................................................
RAN_Emulation: Fix handling of IMSI in RANAP Paging
The IMSI in RANAP Paging messages is encoded in octetstring BCD format.
We need to decode it before using it, since we use plain hexstrings
everywhere in the module to manage IMSIs.
Take the chance to clean up and improve logging on related lines, both
for BSSAP and RANAP.
Change-Id: Ia892a52bad41a4e331703bbab438d8c811b2025e
---
M library/Osmocom_Types.ttcn
M library/RAN_Emulation.ttcnpp
2 files changed, 24 insertions(+), 7 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/34/40634/1
diff --git a/library/Osmocom_Types.ttcn b/library/Osmocom_Types.ttcn
index a7e37e6..690535c 100644
--- a/library/Osmocom_Types.ttcn
+++ b/library/Osmocom_Types.ttcn
@@ -265,6 +265,22 @@
return ret;
}
+function imsi_oct2hex(octetstring imsi) return hexstring {
+ var hexstring ret := ''H
+ var integer i;
+
+ /* swap nibbles and skip F */
+ for (i := 0; i < lengthof(imsi); i := i+1) {
+ var hexstring h := oct2hex(imsi[i]);
+ if (h[0] == 'F'H) {
+ ret := ret & h[1];
+ } else {
+ ret := ret & h[1] & h[0];
+ }
+ }
+ return ret;
+}
+
function f_pad_oct(octetstring str, integer len, OCT1 pad) return octetstring {
var integer strlen := lengthof(str);
for (var integer i := 0; i < len-strlen; i := i+1) {
diff --git a/library/RAN_Emulation.ttcnpp b/library/RAN_Emulation.ttcnpp
index 9401ed6..4e28ab2 100644
--- a/library/RAN_Emulation.ttcnpp
+++ b/library/RAN_Emulation.ttcnpp
@@ -565,18 +565,19 @@
runs on RAN_Emulation_CT return template PDU_BSSAP {
if (match(bssap, tr_BSSMAP_Paging)) {
var RAN_ConnHdlr client := null;
- var template OCT4 tmsi := omit;
+ var hexstring imsi := bssap.pdu.bssmap.paging.iMSI.digits;
+ var template (omit) OCT4 tmsi := omit;
if (ispresent(bssap.pdu.bssmap.paging.tMSI)) {
tmsi := bssap.pdu.bssmap.paging.tMSI.tmsiOctets;
}
- client := f_imsi_table_find(bssap.pdu.bssmap.paging.iMSI.digits, tmsi);
+ client := f_imsi_table_find(imsi, tmsi);
if (client != null) {
log("CommonBssmapUnitdataCallback: IMSI/TMSI found in table, dispatching to ",
client);
CLIENT.send(bssap) to client;
return omit;
}
- log("CommonBssmapUnitdataCallback: IMSI/TMSI not found in table");
+ log("CommonBssmapUnitdataCallback: IMSI=", imsi, ", TMSI=", tmsi, " not found in table");
} else {
log("CommonBssmapUnitdataCallback: Not a paging message");
}
@@ -719,8 +720,8 @@
if (match(ranap, tr_RANAP_Paging(?, ?))) {
var RAN_ConnHdlr client := null;
/* extract IMSI and (if present) TMSI */
- var IMSI imsi := ranap.initiatingMessage.value_.paging.protocolIEs[1].value_.permanentNAS_UE_ID.iMSI;
- var template OCT4 tmsi := omit;
+ var hexstring imsi := imsi_oct2hex(ranap.initiatingMessage.value_.paging.protocolIEs[1].value_.permanentNAS_UE_ID.iMSI);
+ var template (omit) OCT4 tmsi := omit;
if (lengthof(ranap.initiatingMessage.value_.paging.protocolIEs) > 2 and
ranap.initiatingMessage.value_.paging.protocolIEs[2].id == id_TemporaryUE_ID) {
var TemporaryUE_ID ue_id;
@@ -731,14 +732,14 @@
tmsi := ue_id.p_TMSI;
}
}
- client := f_imsi_table_find(oct2hex(imsi), tmsi);
+ client := f_imsi_table_find(imsi, tmsi);
if (client != null) {
log("CommonRanapUnitdataCallback: IMSI/TMSI found in table, dispatching to ",
client);
CLIENT.send(ranap) to client;
return omit;
}
- log("CommonRanapUnitdataCallback: IMSI/TMSI not found in table");
+ log("CommonRanapUnitdataCallback: IMSI=", imsi, ", TMSI=", tmsi, " not found in table");
} else if (match(ranap, tr_RANAP_ResetResource(?, ?, ?))) {
/* extract IuSigConId */
if (lengthof(ranap.initiatingMessage.value_.resetResource.protocolIEs) > 2 and
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40634?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ia892a52bad41a4e331703bbab438d8c811b2025e
Gerrit-Change-Number: 40634
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/40631?usp=email )
Change subject: ran_peer: Avoid paging attempt if not ready
......................................................................
ran_peer: Avoid paging attempt if not ready
If the link is not ready it will fail to transmit the msg anyway,
so there's no use in trying to submit a page over it.
Change-Id: Ia858291f4454e4caf293e1aaf60ea04d2d4a64e9
---
M src/libmsc/ran_peer.c
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/31/40631/1
diff --git a/src/libmsc/ran_peer.c b/src/libmsc/ran_peer.c
index bef753a..07e4328 100644
--- a/src/libmsc/ran_peer.c
+++ b/src/libmsc/ran_peer.c
@@ -682,6 +682,10 @@
{
struct msgb *l2;
+ /* ran_peer is not ready for paging (link not ready). */
+ if (!rp->fi || rp->fi->state != RAN_PEER_ST_READY)
+ return 0;
+
/* There are also the RAN peers that are configured in the neighbor ident for Handover, but if those aren't
* connected, then we can't Page there. */
if (!cell_id_list_find(&rp->cells_seen, page_id, 0, false))
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/40631?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Ia858291f4454e4caf293e1aaf60ea04d2d4a64e9
Gerrit-Change-Number: 40631
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>