Browse code

*** empty log message ***

Bogdan-Andrei Iancu authored on 21/06/2002 16:53:35
Showing 5 changed files
... ...
@@ -10,8 +10,7 @@ auto_gen=lex.yy.c cfg.tab.c   #lexx, yacc etc
10 10
 #include  source related defs
11 11
 include Makefile.sources
12 12
 
13
-exclude_modules=CVS mysql 
14
-#auth rr
13
+exclude_modules=CVS mysql auth cpl im sms jabber acc pike tm
15 14
 static_modules=
16 15
 static_modules_path=$(addprefix modules/, $(static_modules))
17 16
 extra_sources=$(wildcard $(addsuffix /*.c, $(static_modules_path)))
18 17
new file mode 100644
... ...
@@ -0,0 +1,84 @@
0
+#
1
+# $Id$
2
+#
3
+# iptel.org real world configuration
4
+#
5
+
6
+# ----------- global configuration parameters ------------------------
7
+
8
+debug=9          # debug level (cmd line: -dddddddddd)
9
+fork=yes
10
+children=2
11
+#log_stderror=no	# (cmd line: -E)
12
+log_stderror=yes	# (cmd line: -E)
13
+check_via=yes     # (cmd. line: -v)
14
+dns=on           # (cmd. line: -r)
15
+rev_dns=yes      # (cmd. line: -R)
16
+port=5060
17
+#listen=192.168.57.66
18
+#listen=192.168.50.66
19
+#listen=3ffe:400:190:50:201:2ff:fedd:5050
20
+listen=3ffe:400:190:56:201:2ff:fedd:52b5
21
+
22
+# ------------------ module loading ----------------------------------
23
+
24
+loadmodule "modules/sl/sl.so"
25
+loadmodule "modules/print/print.so"
26
+loadmodule "modules/maxfwd/maxfwd.so"
27
+loadmodule "modules/usrloc/usrloc.so"
28
+
29
+# ----------------- setting module-specific parameters ---------------
30
+
31
+# -- usrloc params --
32
+modparam("usrloc", "use_database",   0)
33
+
34
+# -------------------------  request routing logic -------------------
35
+
36
+# main routing logic
37
+
38
+route{
39
+	# filter local stateless ACK generated by authentication of mf replies
40
+	sl_filter_ACK();
41
+
42
+	# filter too old messages
43
+	log("LOG: Checking maxfwd\n");
44
+	if (!mf_process_maxfwd_header("10")) {
45
+		log("LOG: Too many hops\n");
46
+		sl_send_reply("483","Too Many Hops");
47
+		break;
48
+	};
49
+	
50
+	# sign of our domain: there is @ (username), :
51
+    	# (nothing) or . (host) in front of our domain name	
52
+	if (!(uri=~"[@:\.]lugduf-1\.mobis\.ip6([;:].*)*")) {
53
+		route(2);
54
+		# break from route (2) return -- stop then !
55
+		break;
56
+	};
57
+	# here we continue with requests for our domain...
58
+
59
+	if (method=="REGISTER") {
60
+		log("LOG Request is REGISTER\n");
61
+		# update Contact database
62
+       		log("LOG: REGISTER -> saving location\n");
63
+		save_contact("location");
64
+		break;
65
+	};
66
+
67
+        # native SIP destinations are handled using our USRLOC DB
68
+	if (!lookup_contact("location")) {
69
+		if (method=="ACK") {
70
+			log("Ooops -- an ACK made it here -- probably UAC screwed up to-tags\n");
71
+			break;
72
+		};
73
+		log("LOG: Unable to lookup contact, sending 404\n");
74
+		sl_send_reply("404", "Not Found");
75
+		break;
76
+	};
77
+	forward(uri:host,uri:port);
78
+}
79
+
80
+# routing logic for outbound requests targeted out of our domain
81
+route[2] {
82
+	forward("xhosa.mobis.ip6",5060);
83
+}
... ...
@@ -194,6 +194,7 @@ int forward_reply(struct sip_msg* msg)
194 194
 	
195 195
 	to=0;
196 196
 	new_buf=0;
197
+#ifdef Bogdan
197 198
 	/*check if first via host = us */
198 199
 	if (check_via){
199 200
 		for (r=0; r<sock_no; r++)
... ...
@@ -208,7 +209,7 @@ int forward_reply(struct sip_msg* msg)
208 208
 			goto error;
209 209
 		}
210 210
 	}
211
-
211
+#endif
212 212
 	/* quick hack, slower for mutliple modules*/
213 213
 	for (mod=modules;mod;mod=mod->next){
214 214
 		if ((mod->exports) && (mod->exports->response_f)){
... ...
@@ -56,6 +56,7 @@ int check_address(struct ip_addr* ip, char *name, int resolver)
56 56
 	struct hostent* he;
57 57
 	int i;
58 58
 
59
+	return 0;
59 60
 	/* maybe we are lucky and name it's an ip */
60 61
 	if (strcmp(name, ip_addr2a(ip))==0)
61 62
 		return 0;
... ...
@@ -312,6 +313,7 @@ char * build_req_buf_from_sip_req( struct sip_msg* msg,
312 312
 	/* check if received needs to be added */
313 313
 	backup = msg->via1->host.s[msg->via1->host.len];
314 314
 	msg->via1->host.s[msg->via1->host.len] = 0;
315
+	DBG("!!!!!!!!-> len=%d backup=%d[%c]\n",msg->via1->host.len,backup,backup);
315 316
 	if (check_address(&msg->src_ip, msg->via1->host.s, received_dns)!=0){
316 317
 		if ((received_buf=received_builder(msg,&received_len))==0)
317 318
 			goto error;
... ...
@@ -38,7 +38,7 @@ modparam("sms","modems","Falcom [d=/dev/ttyS1;b=9600;p=9254;m=new;l=10;r=2] ")
38 38
 modparam("sms","networks","D1[c=491710765000;m=10]")
39 39
 modparam("sms","links","Falcom[D1]")
40 40
 #modparam("sms","domain","fesarius.fokus.gmd.de")
41
-modparam("sms","max_sms_parts",2)
41
+modparam("sms","max_sms_parts",3)
42 42
 
43 43
 #modparam("pike","timeout",30)
44 44