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 @@
1
+#
2
+# $Id$
3
+#
4
+# iptel.org real world configuration
5
+#
6
+
7
+# ----------- global configuration parameters ------------------------
8
+
9
+debug=3
10
+fork=no
11
+log_stderror=yes	# (cmd line: -E)
12
+check_via=no # (cmd. line: -v)
13
+dns=no # (cmd. line: -r)
14
+syn_branch=1
15
+reply_to_via=0
16
+
17
+# advertise IP address in Via (as opposed to advertising DNS name
18
+# which is annoying for downstream servers and some phones can
19
+# not handle DNS at all)
20
+listen=195.37.77.100
21
+
22
+# ------------------ module loading ----------------------------------
23
+
24
+loadmodule "../sip_router/modules/sl/sl.so"
25
+loadmodule "../sip_router/modules/print/print.so"
26
+
27
+
28
+# -------------------------  request routing logic -------------------
29
+
30
+# main routing logic
31
+
32
+route{
33
+	# for testing purposes, simply okay all REGISTERs
34
+	if (method=="REGISTER") {
35
+		log("REGISTER");
36
+		sl_send_reply("200", "ok");
37
+		break;
38
+	};
39
+	append_branch("sip:parallel@iptel.org:9");
40
+	append_branch("sip:redirect@iptel.org:9");
41
+	sl_send_reply("300", "Redirect");
42
+}
43
+