aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2016-08-13 08:12:48 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2016-08-13 15:22:28 +0200
commit767daf73cd1db60d2d736c10a564c413d40e9b56 (patch)
treec28ace7ea7fd4d1ca1aa8182001d431ad1843f5b /src
parent7d111546c418d7a0176d6aba4d21f727a75915db (diff)
C-Netz: Documentation of the call process in the source code
Diffstat (limited to 'src')
-rw-r--r--src/cnetz/cnetz.c58
1 files changed, 58 insertions, 0 deletions
diff --git a/src/cnetz/cnetz.c b/src/cnetz/cnetz.c
index 62d6ae8..c9f8236 100644
--- a/src/cnetz/cnetz.c
+++ b/src/cnetz/cnetz.c
@@ -26,6 +26,64 @@
*
*/
+/* Notes on transaction state:
+ *
+ * The state is used to define what is scheduled next, what message is awaited,
+ * what is done when timeout. The event (scheduler, message, timeout) is
+ * processed then and the state may change.
+ */
+
+/* Call control process:
+ *
+ * If an MT (mobile terminating) call is made, a transaction with callref is
+ * created. The transaction is linked to OgK. When the scheduler schedules
+ * VAK(R), the SpK is allocated and the transaction is linked to it.
+ *
+ * If an MO (mobile originating) call is made (received VWG(K)), a transaction
+ * with callref is created. The transaction is linked to OgK. When the
+ * scheduler schedules WAF(M), the process waits for WUE(M). If not received,
+ * the process is repeated. After N times WBN(R) is scheduled and transaction
+ * is destroyed. If WUE(M) is received, the scheduler schedules WBP(R) and
+ * then schedules VAG(R), the SpK is allocated and the transaction is linked to
+ * it.
+ *
+ * Switching to SpK is performed two time slots after transmitting VAK(R) or
+ * VAG(R). The timer is started. The schedulers schedules 8 times BQ(K) and
+ * awaits at least one BEL(K). If BEK(K) is received, the timer is stoped. If
+ * BQ(K) was sent at least 8 times and if timer is stopped, the scheduler
+ * schedules VHQ(K). If no BEL(K) was received, AFK(K) is scheduled N_AFKT
+ * times, then the process on OgK (WBP+VAG or VAK) is repeated N times.
+ *
+ * Similar to BQ/BEL the DS/DSQ handing is performed. For MT calls, the BQ/BEL
+ * is followed by RTA/RTAQ handling. If the phone answers, the AT(K) is
+ * received and DS/DSQ handling is performed.
+ *
+ * After DS/DSQ handling, the SpK changes to distributed signalling mode.
+ * VHQ1/VHQ2(V) is transmitted and VH(V) is received. If VH(V) is not received
+ * F_VHQ times, the connection is terminated by sending AF(K) N_AFKT times.
+ * Transaction is released.
+ *
+ * If AT(K) or AT(V) is received, AF(K) or AF(V) is sent once and transaction
+ * is released.
+ *
+ * If call is released by upper layer, AF(K) is sent N_AFKT times or AF(V) is
+ * sent N_AFV times. The transaction is released.
+ *
+ * More details about the process can be read from the source code.
+ *
+ * Special timings and correct scheduling is defined in source code and can be
+ * read also in the C-Netz specs.
+ */
+
+/*
+ * Notes on the combined channel hack:
+ *
+ * For combined SpK+OgK hack, the channel is used as SpK as last choise. This
+ * allows to use only one transceiver for making C-Netz to work. Also it allows
+ * to use all transceivers for simultanious phone calls. Some phones may not
+ * work with that.
+ */
+
#define CHAN cnetz->sender.kanal
#include <stdio.h>