aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2019-02-06 02:29:55 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2019-02-08 08:31:42 +0000
commit6b4895ff53b0fe8880dadf7c8d759a63938bbb3e (patch)
tree16713b85edca37791a8408db640b378a639cc6bd
parentebaefceb82c0195db018c536057875fb8255485a (diff)
gsm/gsm0480: introduce gsm0480_create_release_complete()
In OsmoMSC, it's required to be able to specify a particular GSM 04.07 transaction ID for GSM 04.80 Release complete message instead of the hard-coded value, that is used gsm0480_create_ussd_release_complete(). Let's finally deprecate gsm0480_create_ussd_release_complete(), and introduce a new function without USSD prefix, as this message is also used in other "structured" supplementary services. Change-Id: Ie3ac85fcef90a5e532334ba3482804d5305c88d7
-rw-r--r--include/osmocom/gsm/gsm0480.h4
-rw-r--r--src/gsm/gsm0480.c21
-rw-r--r--src/gsm/libosmogsm.map2
3 files changed, 26 insertions, 1 deletions
diff --git a/include/osmocom/gsm/gsm0480.h b/include/osmocom/gsm/gsm0480.h
index 827464e1..4200189d 100644
--- a/include/osmocom/gsm/gsm0480.h
+++ b/include/osmocom/gsm/gsm0480.h
@@ -117,7 +117,9 @@ struct msgb *gsm0480_create_ussd_resp(uint8_t invoke_id, uint8_t trans_id, const
struct msgb *gsm0480_create_unstructuredSS_Notify(int alertPattern, const char *text);
struct msgb *gsm0480_create_notifySS(const char *text);
struct msgb *gsm0480_create_ussd_notify(int level, const char *text);
-struct msgb *gsm0480_create_ussd_release_complete(void);
+struct msgb *gsm0480_create_ussd_release_complete(void)
+ OSMO_DEPRECATED("Use gsm0480_create_release_complete() instead.");
+struct msgb *gsm0480_create_release_complete(uint8_t trans_id);
int gsm0480_wrap_invoke(struct msgb *msg, int op, int link_id);
int gsm0480_wrap_facility(struct msgb *msg);
diff --git a/src/gsm/gsm0480.c b/src/gsm/gsm0480.c
index b5c98445..9f546cca 100644
--- a/src/gsm/gsm0480.c
+++ b/src/gsm/gsm0480.c
@@ -921,6 +921,7 @@ struct msgb *gsm0480_create_ussd_notify(int level, const char *text)
return msg;
}
+/*! Deprecated, use gsm0480_create_release_complete() instead. */
struct msgb *gsm0480_create_ussd_release_complete(void)
{
struct msgb *msg;
@@ -936,3 +937,23 @@ struct msgb *gsm0480_create_ussd_release_complete(void)
return msg;
}
+
+/*! Create a GSM 04.80 Release complete (see 2.5) message, prefixed
+ * by GSM 04.08 L3 header with a given transaction ID.
+ * \param[in] trans_id GSM 04.07 transaction identifier (and TI flag)
+ * \return message buffer containing the Release complete message
+ */
+struct msgb *gsm0480_create_release_complete(uint8_t trans_id)
+{
+ struct msgb *msg;
+
+ msg = gsm0480_msgb_alloc_name("TS 04.80 USSD REL COMPL");
+ if (!msg)
+ return NULL;
+
+ /* Push the L3 header */
+ gsm48_push_l3hdr_tid(msg, GSM48_PDISC_NC_SS,
+ trans_id, GSM0480_MTYPE_RELEASE_COMPLETE);
+
+ return msg;
+}
diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map
index 602c7a63..ae7c0a1d 100644
--- a/src/gsm/libosmogsm.map
+++ b/src/gsm/libosmogsm.map
@@ -89,6 +89,8 @@ gsm0480_create_unstructuredSS_Notify;
gsm0480_create_ussd_resp;
gsm0480_create_ussd_notify;
gsm0480_create_ussd_release_complete;
+gsm0480_create_release_complete;
+
gsm0480_extract_ie_by_tag;
gsm0480_parse_facility_ie;
gsm0480_decode_ussd_request;