aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--openbsc/include/openbsc/gsm_04_80.h1
-rw-r--r--openbsc/src/gsm_04_80.c21
2 files changed, 22 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/gsm_04_80.h b/openbsc/include/openbsc/gsm_04_80.h
index 85b6a4990..8a25554e9 100644
--- a/openbsc/include/openbsc/gsm_04_80.h
+++ b/openbsc/include/openbsc/gsm_04_80.h
@@ -24,5 +24,6 @@ int gsm0480_send_ussd_reject(struct gsm_subscriber_connection *conn,
const struct ussd_request *request);
struct msgb * gsm0480_create_notifySS(const char *text);
+int gsm0480_wrap_invoke(struct msgb *msg, int op, int link_id);
#endif
diff --git a/openbsc/src/gsm_04_80.c b/openbsc/src/gsm_04_80.c
index f2a0728f2..71fb40577 100644
--- a/openbsc/src/gsm_04_80.c
+++ b/openbsc/src/gsm_04_80.c
@@ -360,6 +360,27 @@ int gsm0480_send_ussd_response(struct gsm_subscriber_connection *conn,
return gsm0808_submit_dtap(conn, msg, 0);
}
+/* wrap an invoke around it... the other way around
+ *
+ * 1.) Invoke Component tag
+ * 2.) Invoke ID Tag
+ * 3.) Operation
+ * 4.) Data
+ */
+int gsm0480_wrap_invoke(struct msgb *msg, int op, int link_id)
+{
+ /* 3. operation */
+ msgb_push_TLV1(msg, GSM0480_OPERATION_CODE, op);
+
+ /* 2. invoke id tag */
+ msgb_push_TLV1(msg, GSM0480_COMPIDTAG_INVOKE_ID, link_id);
+
+ /* 1. component tag */
+ msgb_wrap_with_TL(msg, GSM0480_CTYPE_INVOKE);
+
+ return 0;
+}
+
int gsm0480_send_ussd_reject(struct gsm_subscriber_connection *conn,
const struct msgb *in_msg,
const struct ussd_request *req)