fixeria has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39950?usp=email )
Change subject: library/gsup: distinguish GSUP_MT_FORWARD_SM_ERR_{MS,NET}
......................................................................
library/gsup: distinguish GSUP_MT_FORWARD_SM_ERR_{MS,NET}
The idea is to have two variants of the MT_FORWARD_SM_ERROR:
* _MS: originated by the MS/UE (via RP-ERROR),
* _NET: originated by the network itself.
The network-originated kind will be used to indicate unsuccessful
delivery of a MT SMS in absence of response from the MS/UE.
Change-Id: I58e3566731d232b731b2c0be104d8a1098bbf21b
Related: SYS#7323
---
M library/GSUP_Templates.ttcn
M msc/MSC_Tests.ttcn
2 files changed, 35 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/50/39950/1
diff --git a/library/GSUP_Templates.ttcn b/library/GSUP_Templates.ttcn
index cbe4566..327f7f6 100644
--- a/library/GSUP_Templates.ttcn
+++ b/library/GSUP_Templates.ttcn
@@ -1679,7 +1679,8 @@
}
);
-template (value) GSUP_PDU ts_GSUP_MT_FORWARD_SM_ERR(
+/* MT delivery error indicated by the MS/UE */
+template (value) GSUP_PDU ts_GSUP_MT_FORWARD_SM_ERR_MS(
hexstring imsi,
OCT1 sm_rp_mr, /* Message Reference, see GSM TS 04.11, 8.2.3 */
OCT1 sm_rp_cause /* RP-Cause value, see GSM TS 04.11, 8.2.5.4 */
@@ -1692,7 +1693,7 @@
valueof(ts_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_SMS))
}
);
-template GSUP_PDU tr_GSUP_MT_FORWARD_SM_ERR(
+template GSUP_PDU tr_GSUP_MT_FORWARD_SM_ERR_MS(
template hexstring imsi := ?,
template OCT1 sm_rp_mr := ?, /* Message Reference, see GSM TS 04.11, 8.2.3 */
template OCT1 sm_rp_cause := ? /* RP-Cause value, see GSM TS 04.11, 8.2.5.4 */
@@ -1707,6 +1708,37 @@
}
);
+/* MT delivery error indicated by the network */
+template (value) GSUP_PDU ts_GSUP_MT_FORWARD_SM_ERR_NET(
+ hexstring imsi,
+ OCT1 sm_rp_mr, /* Message Reference, see GSM TS 04.11, 8.2.3 */
+ integer cause /* Cause (indicated by network) */
+) := ts_GSUP(
+ OSMO_GSUP_MSGT_MT_FORWARD_SM_ERROR,
+ {
+ valueof(ts_GSUP_IE_IMSI(imsi)),
+ valueof(ts_GSUP_IE_Cause(cause)),
+ valueof(ts_GSUP_IE_SM_RP_MR(sm_rp_mr)),
+ /* Cause IE replaces the SM-RP-Cause IE */
+ valueof(ts_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_SMS))
+ }
+);
+template GSUP_PDU tr_GSUP_MT_FORWARD_SM_ERR_NET(
+ template hexstring imsi := ?,
+ template OCT1 sm_rp_mr := ?, /* Message Reference, see GSM TS 04.11, 8.2.3 */
+ template integer cause := ? /* Cause (indicated by network) */
+) := tr_GSUP(
+ OSMO_GSUP_MSGT_MT_FORWARD_SM_ERROR,
+ {
+ tr_GSUP_IE_IMSI(imsi),
+ tr_GSUP_IE_Cause(cause),
+ tr_GSUP_IE_SM_RP_MR(sm_rp_mr),
+ /* Cause IE replaces the SM-RP-Cause IE */
+ tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_SMS),
+ tr_GSUP_IE_Source_Name(?)
+ }
+);
+
template (value) GSUP_PDU ts_GSUP_MO_READY_FOR_SM_REQ(
hexstring imsi,
OCT1 sm_rp_mr, /* Message Reference, see GSM TS 04.11, 8.2.3 */
diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index a36dbb8..40cd9fd 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -2945,7 +2945,7 @@
/* Register an 'expect' for given IMSI (+TMSI) */
f_ran_register_imsi(g_pars.imsi, g_pars.tmsi);
- var template GSUP_PDU mt_forwardSM_err := tr_GSUP_MT_FORWARD_SM_ERR(
+ var template GSUP_PDU mt_forwardSM_err := tr_GSUP_MT_FORWARD_SM_ERR_MS(
imsi := g_pars.imsi,
/* NOTE: MSC should assign RP-MR itself */
sm_rp_mr := ?,
--
To view, visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39950?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: I58e3566731d232b731b2c0be104d8a1098bbf21b
Gerrit-Change-Number: 39950
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>