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.orgVadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/9370
Change subject: msc: introduce USSD helper functions
......................................................................
msc: introduce USSD helper functions
Change-Id: Ic528b968a9bc7c12e8395364e895400aa016c8f5
---
A msc/USSD_Helpers.ttcn
M msc/gen_links.sh
2 files changed, 62 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/70/9370/1
diff --git a/msc/USSD_Helpers.ttcn b/msc/USSD_Helpers.ttcn
new file mode 100644
index 0000000..d9f05a8
--- /dev/null
+++ b/msc/USSD_Helpers.ttcn
@@ -0,0 +1,61 @@
+module USSD_Helpers {
+
+/* USSD helpers for composing messages, building on top
+ * of both L3_Templates and USSD_Templates.
+ *
+ * (C) 2018 by Vadim Yanitskiy <axilirator at gmail.com>
+ * All rights reserved.
+ *
+ * Released under the terms of GNU General Public License, Version 2 or
+ * (at your option) any later version.
+ */
+
+import from General_Types all;
+import from TCCEncoding_Functions all;
+
+import from USSD_Templates all;
+import from SS_Types all;
+
+function f_USSD_FACILITY_IE_INVOKE(
+ integer invoke_id := 1,
+ integer op_code := 59, // (Process)UnstructuredSS-Request (59 or 60)
+ charstring ussd_string // ASCII string
+) return octetstring {
+ var SS_FacilityInformation facility_ie;
+ var octetstring ussd_string_enc;
+
+ /* Encode input string with GSM 7-bit encoding */
+ ussd_string_enc := f_encGSM7bit(ussd_string);
+
+ /* Encode Facility IE */
+ facility_ie := valueof(ts_ML3_FACILITY_USSD_INVOKE(
+ invoke_id := invoke_id,
+ op_code := op_code,
+ ussd_string := ussd_string_enc
+ ));
+
+ return enc_SS_FacilityInformation(facility_ie);
+}
+
+function f_USSD_FACILITY_IE_RETURN_RESULT(
+ integer invoke_id := 1,
+ integer op_code := 59, // (Process)UnstructuredSS-Request (59 or 60)
+ charstring ussd_string // ASCII string
+) return octetstring {
+ var SS_FacilityInformation facility_ie;
+ var octetstring ussd_string_enc;
+
+ /* Encode input string with GSM 7-bit encoding */
+ ussd_string_enc := f_encGSM7bit(ussd_string);
+
+ /* Encode Facility IE */
+ facility_ie := valueof(ts_ML3_FACILITY_USSD_RETURN_RESULT(
+ invoke_id := invoke_id,
+ op_code := op_code,
+ ussd_string := ussd_string_enc
+ ));
+
+ return enc_SS_FacilityInformation(facility_ie);
+}
+
+}
diff --git a/msc/gen_links.sh b/msc/gen_links.sh
index 1fe5d6e..5f3024b 100755
--- a/msc/gen_links.sh
+++ b/msc/gen_links.sh
@@ -90,6 +90,7 @@
FILES+="RTP_CodecPort.ttcn RTP_CodecPort_CtrlFunctDef.cc "
FILES+="MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunctDef.cc "
FILES+="SMPP_CodecPort.ttcn SMPP_CodecPort_CtrlFunct.ttcn SMPP_CodecPort_CtrlFunctDef.cc SMPP_Emulation.ttcn SMPP_Templates.ttcn "
+FILES+="USSD_Templates.ttcn "
gen_links $DIR $FILES
ignore_pp_results
--
To view, visit https://gerrit.osmocom.org/9370
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic528b968a9bc7c12e8395364e895400aa016c8f5
Gerrit-Change-Number: 9370
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180529/bef448c7/attachment.htm>