Added minimal call application as required in GSM 04.08.
authorAndreas Eversberg <jolly@eversberg.eu>
Sun, 4 Apr 2010 12:15:23 +0000 (14:15 +0200)
committerAndreas Eversberg <jolly@eversberg.eu>
Sun, 4 Apr 2010 12:15:23 +0000 (14:15 +0200)
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 ;-)

src/host/gsm48-andreas/mnccms.c [new file with mode: 0644]

diff --git a/src/host/gsm48-andreas/mnccms.c b/src/host/gsm48-andreas/mnccms.c
new file mode 100644 (file)
index 0000000..3f030d5
--- /dev/null
@@ -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);
+}
+
+