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 @@
1
+#
2
+# $Id$
3
+#
4
+# iptel.org real world configuration
5
+#
6
+
7
+# ----------- global configuration parameters ------------------------
8
+
9
+debug=9          # debug level (cmd line: -dddddddddd)
10
+fork=yes
11
+children=2
12
+#log_stderror=no	# (cmd line: -E)
13
+log_stderror=yes	# (cmd line: -E)
14
+check_via=yes     # (cmd. line: -v)
15
+dns=on           # (cmd. line: -r)
16
+rev_dns=yes      # (cmd. line: -R)
17
+port=5060
18
+#listen=192.168.57.66
19
+#listen=192.168.50.66
20
+#listen=3ffe:400:190:50:201:2ff:fedd:5050
21
+listen=3ffe:400:190:56:201:2ff:fedd:52b5
22
+
23
+# ------------------ module loading ----------------------------------
24
+
25
+loadmodule "modules/sl/sl.so"
26
+loadmodule "modules/print/print.so"
27
+loadmodule "modules/maxfwd/maxfwd.so"
28
+loadmodule "modules/usrloc/usrloc.so"
29
+
30
+# ----------------- setting module-specific parameters ---------------
31
+
32
+# -- usrloc params --
33
+modparam("usrloc", "use_database",   0)
34
+
35
+# -------------------------  request routing logic -------------------
36
+
37
+# main routing logic
38
+
39
+route{
40
+	# filter local stateless ACK generated by authentication of mf replies
41
+	sl_filter_ACK();
42
+
43
+	# filter too old messages
44
+	log("LOG: Checking maxfwd\n");
45
+	if (!mf_process_maxfwd_header("10")) {
46
+		log("LOG: Too many hops\n");
47
+		sl_send_reply("483","Too Many Hops");
48
+		break;
49
+	};
50
+	
51
+	# sign of our domain: there is @ (username), :
52
+    	# (nothing) or . (host) in front of our domain name	
53
+	if (!(uri=~"[@:\.]lugduf-1\.mobis\.ip6([;:].*)*")) {
54
+		route(2);
55
+		# break from route (2) return -- stop then !
56
+		break;
57
+	};
58
+	# here we continue with requests for our domain...
59
+
60
+	if (method=="REGISTER") {
61
+		log("LOG Request is REGISTER\n");
62
+		# update Contact database
63
+       		log("LOG: REGISTER -> saving location\n");
64
+		save_contact("location");
65
+		break;
66
+	};
67
+
68
+        # native SIP destinations are handled using our USRLOC DB
69
+	if (!lookup_contact("location")) {
70
+		if (method=="ACK") {
71
+			log("Ooops -- an ACK made it here -- probably UAC screwed up to-tags\n");
72
+			break;
73
+		};
74
+		log("LOG: Unable to lookup contact, sending 404\n");
75
+		sl_send_reply("404", "Not Found");
76
+		break;
77
+	};
78
+	forward(uri:host,uri:port);
79
+}
80
+
81
+# routing logic for outbound requests targeted out of our domain
82
+route[2] {
83
+	forward("xhosa.mobis.ip6",5060);
84
+}
... ...
@@ -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 209
 			goto error;
209 210
 		}
210 211
 	}
211
-
212
+#endif
212 213
 	/* quick hack, slower for mutliple modules*/
213 214
 	for (mod=modules;mod;mod=mod->next){
214 215
 		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 313
 	/* check if received needs to be added */
313 314
 	backup = msg->via1->host.s[msg->via1->host.len];
314 315
 	msg->via1->host.s[msg->via1->host.len] = 0;
316
+	DBG("!!!!!!!!-> len=%d backup=%d[%c]\n",msg->via1->host.len,backup,backup);
315 317
 	if (check_address(&msg->src_ip, msg->via1->host.s, received_dns)!=0){
316 318
 		if ((received_buf=received_builder(msg,&received_len))==0)
317 319
 			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