summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2010-04-04 14:15:23 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2010-04-04 14:15:23 +0200
commitfcc494e3e9e277ad5e92a3f3f383e78889fe72f2 (patch)
treeee0042bc686ff2a9f5a789b5221bc38d29f445e4
parent49e9ddf335f0b521a3005028b123b190f8aa8c23 (diff)
Added minimal call application as required in GSM 04.08.
It represents the application ontop of layer 3 Call Control. It will reject any incomming call using appropiate cause value. Since there is no real interface between call application and call control, I introduced MNCC for mobile side. (MNCCms) Applications can be: - normal telephony application, implemented in the MS - remote applications like PBX (MS as external line) - "application-in-the-middle" (no comment ;-)
-rw-r--r--src/host/gsm48-andreas/mnccms.c53
1 files changed, 53 insertions, 0 deletions
diff --git a/src/host/gsm48-andreas/mnccms.c b/src/host/gsm48-andreas/mnccms.c
new file mode 100644
index 00000000..3f030d53
--- /dev/null
+++ b/src/host/gsm48-andreas/mnccms.c
@@ -0,0 +1,53 @@
+/*
+ * (C) 2010 by Andreas Eversberg <jolly@eversberg.eu>
+ *
+ * All Rights Reserved
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+
+/*
+ * support functions
+ */
+
+void mncc_set_cause(struct gsm_mncc *data, int loc, int val)
+{
+ data->fields |= MNCC_F_CAUSE;
+ data->cause.location = loc;
+ data->cause.value = val;
+}
+
+/*
+ * MNCCms dummy application
+ */
+
+/* this is a minimal implementation as required by GSM 04.08 */
+int mncc_recv_dummy(struct osmocom_ms *ms, int msg_type, void *arg)
+{
+ struct gsm_mncc *data = arg;
+ int callref = data->callref;
+ struct gsm_mncc *rel;
+
+ /* reject, as we don't support Calls */
+ memset(&rel, 0, sizeof(struct gsm_mncc));
+ rel.callref = callref;
+ mncc_set_cause(&rel, GSM48_CAUSE_LOC_USER,
+ GSM48_CC_CAUSE_INCOMPAT_DEST);
+
+ return mncc_send(net, MNCC_REL_REQ, &rel);
+}
+
+