summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-11-13 03:04:02 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2018-12-03 03:13:36 +0700
commit88e23234a3fc0c083e8b6d8afbc15cf1aac86960 (patch)
treeb7d2438654876cd9afd62687f7c7bf781ed7dc38
parent8a1d4b6c4f021277923e5fcec3d800191b524569 (diff)
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
-rw-r--r--library/GSUP_Types.ttcn107
1 files changed, 104 insertions, 3 deletions
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 @@ type enumerated GSUP_IEI {
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 @@ type enumerated GSUP_MessageType {
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 @@ type record GSUP_IE {
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 @@ type union GSUP_IeValue {
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 @@ template GSUP_IE tr_GSUP_IE_SM_RP_UI(template octetstring val) := {
}
}
+/* 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 GSUP_PDU tr_GSUP_MT_FORWARD_SM_ERR(
}
);
+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) {