Module: sip-router
Branch: master
Commit: 80d8cc1c42bb8bae7dfb477bf6157dcbda33c129
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=80d8cc1…
Author: Henning Westerholt <henning.westerholt(a)1und1.de>
Committer: Henning Westerholt <henning.westerholt(a)1und1.de>
Date: Wed May 20 16:08:50 2009 +0200
test: commit preliminary changes for tm+cr debugging
---
test/unit/26.cfg | 9 ++++++---
test/unit/26.sh | 42 ++++++++++++++++++++++--------------------
2 files changed, 28 insertions(+), 23 deletions(-)
diff --git a/test/unit/26.cfg b/test/unit/26.cfg
index 33cdc03..0953b60 100644
--- a/test/unit/26.cfg
+++ b/test/unit/26.cfg
@@ -1,4 +1,6 @@
-debug=2
+debug=3
+memdbg=6
+memlog=6
loadpath "../../modules_k"
loadmodule "sl"
loadmodule "../../modules/tm/tm.so"
@@ -6,6 +8,7 @@ loadmodule "tmx"
loadmodule "xlog"
loadmodule "maxfwd"
loadmodule "pv"
+loadmodule "kex"
loadmodule "../../modules/carrierroute/carrierroute.so"
loadmodule "mi_fifo"
@@ -27,7 +30,6 @@ route{
setflag(2);
# user route
- xlog("user $rU, domain $rd");
if(cr_user_carrier("$rU", "$rd", "$avp(s:11)")) {
$avp(s:10)="domain0";
if (!cr_route("$avp(s:11)", "$avp(s:10)", "$rU",
"$rU", "call_id", "$avp(s:13)")) {
@@ -50,6 +52,7 @@ route{
}
failure_route[1] {
+ xlog("entered failure route with result $T_reply_code");
revert_uri();
if (!cr_next_domain("$avp(s:11)", "$avp(s:10)", "$rU",
"$avp(s:12)", "$T_reply_code", "$avp(s:10)")) {
xlog("L_ERR", "cr_next_domain failed\n");
@@ -61,7 +64,7 @@ failure_route[1] {
}
$avp(s:12) = $rd+":"+$rp;
t_on_failure("1");
- append_branch();
+ km_append_branch();
if (!t_relay()) {
xlog("L_ERR", "t_relay failed\n");
exit;
diff --git a/test/unit/26.sh b/test/unit/26.sh
index 30ea3de..591f1e2 100755
--- a/test/unit/26.sh
+++ b/test/unit/26.sh
@@ -87,24 +87,26 @@ sleep 1
# ret=$?
# killall sipp &> /dev/null
#fi;
-#sleep 2
-if [ "$ret" -eq 0 ] ; then
- sipp -sn uas -bg -i localhost -m 10 -p 9000 &> /dev/null
- sipp -sn uac -s 49721123456786 127.0.0.1:5060 -i 127.0.0.1 -m 10 -p 5061 &>
/dev/null
- ret=$?
-fi;
-if [ "$ret" -eq 0 ] ; then
- sipp -sn uas -bg -i localhost -m 10 -p 10000 &> /dev/null
- sipp -sn uac -s 49721123456785 127.0.0.1:5060 -i 127.0.0.1 -m 10 -p 5061 &>
/dev/null
- ret=$?
-fi;
+#if [ "$ret" -eq 0 ] ; then
+# sipp -sn uas -bg -i localhost -m 10 -p 9000 &> /dev/null
+# sipp -sn uac -s 49721123456786 127.0.0.1:5060 -i 127.0.0.1 -m 10 -p 5061 &>
/dev/null
+# ret=$?
+#fi;
+#sleep 1
+
+#if [ "$ret" -eq 0 ] ; then
+# sipp -sn uas -bg -i localhost -m 10 -p 10000 &> /dev/null
+# sipp -sn uac -s 49721123456785 127.0.0.1:5060 -i 127.0.0.1 -m 10 -p 5061 &>
/dev/null
+# ret=$?
+#fi;
+#sleep 2
if [ "$ret" -eq 0 ] ; then
killall sipp &> /dev/null
- sipp -sf failure_route.xml -bg -i localhost -m 10 -p 10000 &> /dev/null
- sipp -sn uac -s 49721123456785 127.0.0.1:5060 -i 127.0.0.1 -m 10 -p 5061 &>
/dev/null
+ sipp -sf failure_route.xml -bg -i localhost -m 1 -p 10000 &> /dev/null
+ sipp -sn uac -s 49721123456785 127.0.0.1:5060 -i 127.0.0.1 -m 1 -p 5061 #&>
/dev/null
ret=$?
fi;
@@ -113,13 +115,13 @@ flags, mask, next_domain) values ('4', '3',
'1', '49', '127.0.0.1:10000', '4..',
$MYSQL "insert into carrierfailureroute(id, carrier, domain, scan_prefix, host_name,
reply_code,
flags, mask, next_domain) values ('5', '3', '1', '49',
'127.0.0.1:10000', '486', '0', '0', '2');"
-if [ ! "$ret" -eq 0 ] ; then
- $CTL fifo cr_reload_routes
- killall sipp &> /dev/null
- sipp -sf failure_route.xml -bg -i localhost -m 10 -p 10000 &> /dev/null
- sipp -sn uac -s 49721123456785 127.0.0.1:5060 -i 127.0.0.1 -m 10 -p 5061 &>
/dev/null
- ret=$?
-fi;
+#if [ ! "$ret" -eq 0 ] ; then
+# $CTL fifo cr_reload_routes
+# killall sipp &> /dev/null
+# sipp -sf failure_route.xml -bg -i localhost -m 10 -p 10000 &> /dev/null
+# sipp -sn uac -s 49721123456785 127.0.0.1:5060 -i 127.0.0.1 -m 10 -p 5061 &>
/dev/null
+# ret=$?
+#fi;
$KILL