Browse code

added support for redirection

Jiri Kuthan authored on 15/08/2002 09:49:09
Showing 2 changed files
... ...
@@ -101,4 +101,7 @@
101 101
 #define FIFO_DIR "/tmp/"
102 102
 /* max length of the text of fifo 'print' command */
103 103
 #define MAX_PRINT_TEXT 256
104
+
105
+/* maximum length of Contact heder field in redirection replies */
106
+#define MAX_REDIRECTION_LEN 512
104 107
 #endif
105 108
new file mode 100644
... ...
@@ -0,0 +1,43 @@
0
+#
1
+# $Id$
2
+#
3
+# iptel.org real world configuration
4
+#
5
+
6
+# ----------- global configuration parameters ------------------------
7
+
8
+debug=3
9
+fork=no
10
+log_stderror=yes	# (cmd line: -E)
11
+check_via=no # (cmd. line: -v)
12
+dns=no # (cmd. line: -r)
13
+syn_branch=1
14
+reply_to_via=0
15
+
16
+# advertise IP address in Via (as opposed to advertising DNS name
17
+# which is annoying for downstream servers and some phones can
18
+# not handle DNS at all)
19
+listen=195.37.77.100
20
+
21
+# ------------------ module loading ----------------------------------
22
+
23
+loadmodule "../sip_router/modules/sl/sl.so"
24
+loadmodule "../sip_router/modules/print/print.so"
25
+
26
+
27
+# -------------------------  request routing logic -------------------
28
+
29
+# main routing logic
30
+
31
+route{
32
+	# for testing purposes, simply okay all REGISTERs
33
+	if (method=="REGISTER") {
34
+		log("REGISTER");
35
+		sl_send_reply("200", "ok");
36
+		break;
37
+	};
38
+	append_branch("sip:parallel@iptel.org:9");
39
+	append_branch("sip:redirect@iptel.org:9");
40
+	sl_send_reply("300", "Redirect");
41
+}
42
+