Browse code

test: port carrierroute config load test to sr, add missing tmx mod to test 13

Henning Westerholt authored on 14/05/2009 14:25:59
Showing 3 changed files
... ...
@@ -6,6 +6,7 @@ loadmodule "xlog"
6 6
 loadmodule "maxfwd"
7 7
 loadmodule "../../modules/carrierroute/carrierroute.so"
8 8
 loadmodule "pv"
9
+loadmodule "tmx"
9 10
 loadmodule "mi_fifo"
10 11
 
11 12
 modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")
... ...
@@ -16,10 +17,6 @@ route{
16 17
 		sl_send_reply("483","Too Many Hops");
17 18
 		return;
18 19
 	};
19
-#	if (msg:len >  max_len) {
20
-#		sl_send_reply("513", "Message too big");
21
-#		return;
22
-#	};
23 20
 	cr_user_carrier("$fU", "$fd", "$avp(s:11)");
24 21
 	$avp(domain)="start";
25 22
 	if (!cr_route("$avp(carrier)", "$avp(s:10)", "$rU", "$rU", "call_id", "$avp(s:12)")) {
... ...
@@ -1,27 +1,19 @@
1
-mpath="../modules"
2
-loadmodule "sl/sl.so"
3
-loadmodule "xlog/xlog.so"
4
-loadmodule "maxfwd/maxfwd.so"
5
-loadmodule "carrierroute/carrierroute.so"
6
-loadmodule "pv/pv.so"
7
-loadmodule "mi_fifo/mi_fifo.so"
1
+loadpath "../../modules_k"
2
+loadmodule "sl"
3
+loadmodule "xlog"
4
+loadmodule "maxfwd"
5
+loadmodule "../../modules/carrierroute/carrierroute.so"
6
+loadmodule "pv"
7
+loadmodule "mi_fifo"
8 8
 
9 9
 modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")
10 10
 
11
-avp_aliases="domain=s:10"
12
-avp_aliases="carrier=s:11"
13
-avp_aliases="host=s:12"
14
-
15 11
 route{
16 12
 	# initial sanity checks
17 13
 	if (!mf_process_maxfwd_header("10")) {
18 14
 		sl_send_reply("483","Too Many Hops");
19 15
 		return;
20 16
 	};
21
-	if (msg:len >  max_len) {
22
-		sl_send_reply("513", "Message too big");
23
-		return;
24
-	};
25 17
 	if (method == "REGISTER") {
26 18
 		if(!cr_route("default", "register", "$rU", "$rU", "call_id", "$avp(s:30)")) {
27 19
 			sl_send_reply("403", "Not allowed");
... ...
@@ -31,19 +31,17 @@ fi ;
31 31
 cp $CFG $CFG.bak
32 32
 
33 33
 # setup config
34
-echo "modparam(\"carrierroute\", \"config_file\", \"`pwd`/../test/carrierroute.cfg\")" >> $CFG
34
+echo "modparam(\"carrierroute\", \"config_file\", \"carrierroute.cfg\")" >> $CFG
35 35
 
36
-../$BIN -w . -f $CFG > /dev/null
36
+$BIN -w . -f $CFG > /dev/null
37 37
 ret=$?
38 38
 
39 39
 sleep 1
40 40
 
41
-cd ../scripts
42
-
43 41
 TMPFILE=`mktemp -t kamailio-test.XXXXXXXXXX`
44 42
 
45 43
 if [ "$ret" -eq 0 ] ; then
46
-	./$CTL fifo cr_dump_routes > $TMPFILE
44
+	$CTL fifo cr_dump_routes > $TMPFILE
47 45
 	ret=$?
48 46
 fi ;
49 47
 
... ...
@@ -78,8 +76,6 @@ fi ;
78 76
 
79 77
 $KILL
80 78
 
81
-cd ../test
82
-
83 79
 mv $CFG.bak $CFG
84 80
 rm -f $TMPFILE
85 81