Change in osmo-ttcn3-hacks[master]: library/GSUP_Types.ttcn: add READY-FOR-SM message

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Vadim Yanitskiy gerrit-no-reply at lists.osmocom.org
Tue Dec 4 21:40:39 UTC 2018


Vadim Yanitskiy has submitted this change and it was merged. ( https://gerrit.osmocom.org/11752 )

Change subject: library/GSUP_Types.ttcn: add READY-FOR-SM message
......................................................................

library/GSUP_Types.ttcn: add READY-FOR-SM message

According to 3GPP TS 29.002, section 12.4, MAP-READY-FOR-SM is
used between the MSC and VLR as well as between the VLR and the
HLR to indicate that a subscriber has memory available for SMS.

This change replicates this service in GSUP as READY_FOR_SM_*.
The only mandatory IE for this service (excluding Invoke ID) is
'Alert Reason' that is replicated by OSMO_GSUP_SM_ALERT_RSN_IE.

Change-Id: If2256607527ecfcb10285583332fb8b0515d7c78
Related: OS#3587
---
M library/GSUP_Types.ttcn
1 file changed, 104 insertions(+), 3 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/library/GSUP_Types.ttcn b/library/GSUP_Types.ttcn
index 9cb3255..d16b4a5 100644
--- a/library/GSUP_Types.ttcn
+++ b/library/GSUP_Types.ttcn
@@ -51,7 +51,8 @@
 	OSMO_GSUP_SM_RP_OA_IE		('42'O),
 	OSMO_GSUP_SM_RP_UI_IE		('43'O),
 	OSMO_GSUP_SM_RP_CAUSE_IE	('44'O),
-	OSMO_GSUP_SM_RP_MMS_IE		('45'O)
+	OSMO_GSUP_SM_RP_MMS_IE		('45'O),
+	OSMO_GSUP_SM_ALERT_RSN_IE	('46'O)
 } with { variant "FIELDLENGTH(8)" };
 
 type enumerated GSUP_MessageType {
@@ -91,7 +92,11 @@
 
 	OSMO_GSUP_MSGT_MT_FORWARD_SM_REQUEST	('00101000'B),
 	OSMO_GSUP_MSGT_MT_FORWARD_SM_ERROR	('00101001'B),
-	OSMO_GSUP_MSGT_MT_FORWARD_SM_RESULT	('00101010'B)
+	OSMO_GSUP_MSGT_MT_FORWARD_SM_RESULT	('00101010'B),
+
+	OSMO_GSUP_MSGT_READY_FOR_SM_REQUEST	('00101100'B),
+	OSMO_GSUP_MSGT_READY_FOR_SM_ERROR	('00101101'B),
+	OSMO_GSUP_MSGT_READY_FOR_SM_RESULT	('00101110'B)
 } with { variant "FIELDLENGTH(8)" };
 
 type enumerated GSUP_CancelType {
@@ -150,6 +155,7 @@
 				 sm_rp_ui, tag = OSMO_GSUP_SM_RP_UI_IE;
 				 sm_rp_cause, tag = OSMO_GSUP_SM_RP_CAUSE_IE;
 				 sm_rp_mms, tag = OSMO_GSUP_SM_RP_MMS_IE;
+				 sm_alert_rsn, tag = OSMO_GSUP_SM_ALERT_RSN_IE;
 			)"
 };
 
@@ -190,7 +196,8 @@
 	GSUP_SM_RP_OA		sm_rp_oa,
 	octetstring		sm_rp_ui,
 	OCT1			sm_rp_cause,
-	OCT1			sm_rp_mms
+	OCT1			sm_rp_mms,
+	GSUP_SM_ALERT_RSN_Type	sm_alert_rsn
 };
 
 type record GSUP_PDU {
@@ -851,6 +858,29 @@
 	}
 }
 
+/* SM Alert Reason types, see 7.6.8.8 */
+type enumerated GSUP_SM_ALERT_RSN_Type {
+	GSUP_SM_ALERT_RSN_TYPE_NONE		('00'O),
+	GSUP_SM_ALERT_RSN_TYPE_MS_PRESENT	('01'O),
+	GSUP_SM_ALERT_RSN_TYPE_MEM_AVAIL	('02'O)
+} with { variant "FIELDLENGTH(8)" };
+
+/* SM Alert Reason IE (used in READY-FOR-SM), see 7.6.8.8 */
+template (value) GSUP_IE ts_GSUP_IE_SM_ALERT_RSN(GSUP_SM_ALERT_RSN_Type rsn) := {
+	tag := OSMO_GSUP_SM_ALERT_RSN_IE,
+	len := 0, /* overwritten */
+	val := {
+		sm_alert_rsn := rsn
+	}
+}
+template GSUP_IE tr_GSUP_IE_SM_ALERT_RSN(template GSUP_SM_ALERT_RSN_Type rsn) := {
+	tag := OSMO_GSUP_SM_ALERT_RSN_IE,
+	len := ?,
+	val := {
+		sm_alert_rsn := rsn
+	}
+}
+
 template (value) GSUP_IE ts_GSUP_IE_SSInfo(octetstring ss) := {
 	tag := OSMO_GSUP_SS_INFO_IE,
 	len := 0, /* overwritten */
@@ -1148,6 +1178,77 @@
 	}
 );
 
+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 */
+	GSUP_SM_ALERT_RSN_Type sm_alert_rsn /* SM Alert Reason, see 7.6.8.8 */
+) := ts_GSUP(
+	OSMO_GSUP_MSGT_READY_FOR_SM_REQUEST,
+	{
+		valueof(ts_GSUP_IE_IMSI(imsi)),
+		valueof(ts_GSUP_IE_SM_RP_MR(sm_rp_mr)),
+		valueof(ts_GSUP_IE_SM_ALERT_RSN(sm_alert_rsn))
+	}
+);
+template GSUP_PDU tr_GSUP_MO_READY_FOR_SM_REQ(
+	template hexstring imsi := ?,
+	template OCT1 sm_rp_mr := ?, /* Message Reference, see GSM TS 04.11, 8.2.3 */
+	template GSUP_SM_ALERT_RSN_Type sm_alert_rsn := ? /* SM Alert Reason, see 7.6.8.8 */
+) := tr_GSUP(
+	OSMO_GSUP_MSGT_READY_FOR_SM_REQUEST,
+	{
+		tr_GSUP_IE_IMSI(imsi),
+		tr_GSUP_IE_SM_RP_MR(sm_rp_mr),
+		tr_GSUP_IE_SM_ALERT_RSN(sm_alert_rsn)
+	}
+);
+
+template (value) GSUP_PDU ts_GSUP_MO_READY_FOR_SM_RES(
+	hexstring imsi,
+	OCT1 sm_rp_mr /* Message Reference, see GSM TS 04.11, 8.2.3 */
+) := ts_GSUP(
+	OSMO_GSUP_MSGT_READY_FOR_SM_RESULT,
+	{
+		valueof(ts_GSUP_IE_IMSI(imsi)),
+		valueof(ts_GSUP_IE_SM_RP_MR(sm_rp_mr))
+	}
+);
+template GSUP_PDU tr_GSUP_MO_READY_FOR_SM_RES(
+	template hexstring imsi := ?,
+	template OCT1 sm_rp_mr := ? /* Message Reference, see GSM TS 04.11, 8.2.3 */
+) := tr_GSUP(
+	OSMO_GSUP_MSGT_READY_FOR_SM_RESULT,
+	{
+		tr_GSUP_IE_IMSI(imsi),
+		tr_GSUP_IE_SM_RP_MR(sm_rp_mr)
+	}
+);
+
+template (value) GSUP_PDU ts_GSUP_MO_READY_FOR_SM_ERR(
+	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 */
+) := ts_GSUP(
+	OSMO_GSUP_MSGT_READY_FOR_SM_ERROR,
+	{
+		valueof(ts_GSUP_IE_IMSI(imsi)),
+		valueof(ts_GSUP_IE_SM_RP_MR(sm_rp_mr)),
+		valueof(ts_GSUP_IE_SM_RP_CAUSE(sm_rp_cause))
+	}
+);
+template GSUP_PDU tr_GSUP_MO_READY_FOR_SM_ERR(
+	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 */
+) := tr_GSUP(
+	OSMO_GSUP_MSGT_READY_FOR_SM_ERROR,
+	{
+		tr_GSUP_IE_IMSI(imsi),
+		tr_GSUP_IE_SM_RP_MR(sm_rp_mr),
+		tr_GSUP_IE_SM_RP_CAUSE(sm_rp_cause)
+	}
+);
+
 function f_gsup_find_ie(GSUP_PDU msg, GSUP_IEI iei, out GSUP_IeValue ret) return boolean {
 	for (var integer i := 0; i < sizeof(msg.ies); i := i+1) {
 		if (msg.ies[i].tag == iei) {

-- 
To view, visit https://gerrit.osmocom.org/11752
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: If2256607527ecfcb10285583332fb8b0515d7c78
Gerrit-Change-Number: 11752
Gerrit-PatchSet: 6
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181204/69a985bf/attachment.htm>


More information about the gerrit-log mailing list