From f9ee8da0cda6a8989c706e618915d09c9cffd0f4 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Tue, 13 Nov 2018 02:06:15 +0700 Subject: GSUP/SMS: introduce 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: Ic37f3b2114b8095cfce22977e67133b9103942e3 Related Change-Id: (docs) I549b6c8840a1e86caac09e77fb8bc5042d939e62 Related Change-Id: (TTCN) If2256607527ecfcb10285583332fb8b0515d7c78 Related: OS#3587 --- src/gsm/gsup.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src') diff --git a/src/gsm/gsup.c b/src/gsm/gsup.c index e4339971..c1c99923 100644 --- a/src/gsm/gsup.c +++ b/src/gsm/gsup.c @@ -75,6 +75,10 @@ const struct value_string osmo_gsup_message_type_names[] = { OSMO_VALUE_STRING(OSMO_GSUP_MSGT_MT_FORWARD_SM_ERROR), OSMO_VALUE_STRING(OSMO_GSUP_MSGT_MT_FORWARD_SM_RESULT), + OSMO_VALUE_STRING(OSMO_GSUP_MSGT_READY_FOR_SM_REQUEST), + OSMO_VALUE_STRING(OSMO_GSUP_MSGT_READY_FOR_SM_ERROR), + OSMO_VALUE_STRING(OSMO_GSUP_MSGT_READY_FOR_SM_RESULT), + { 0, NULL } }; @@ -471,6 +475,10 @@ int osmo_gsup_decode(const uint8_t *const_data, size_t data_len, gsup_msg->sm_rp_cause = value; break; + case OSMO_GSUP_SM_ALERT_RSN_IE: + gsup_msg->sm_alert_rsn = *value; + break; + default: LOGP(DLGSUP, LOGL_NOTICE, "GSUP IE type %d unknown\n", iei); @@ -699,6 +707,11 @@ int osmo_gsup_encode(struct msgb *msg, const struct osmo_gsup_message *gsup_msg) sizeof(*gsup_msg->sm_rp_cause), gsup_msg->sm_rp_cause); } + if ((u8 = gsup_msg->sm_alert_rsn)) { + msgb_tlv_put(msg, OSMO_GSUP_SM_ALERT_RSN_IE, + sizeof(u8), &u8); + } + return 0; } -- cgit v1.2.3