Browse Source

- extend test a little bit after reg_callid_avp addition in registrar

git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@4777 689a6050-402a-0410-94f2-e92a70836424
Henning Westerholt 17 years ago
parent
commit
9667e870f6
2 changed files with 12 additions and 1 deletions
  1. 9 1
      test/unit/11.cfg
  2. 3 0
      test/unit/11.sh

+ 9 - 1
test/unit/11.cfg

@@ -12,6 +12,7 @@ loadmodule "tm/tm.so"
 loadmodule "rr/rr.so"
 loadmodule "maxfwd/maxfwd.so"
 loadmodule "textops/textops.so"
+loadmodule "xlog/xlog.so"
 loadmodule "mi_fifo/mi_fifo.so"
 modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")
 
@@ -19,6 +20,8 @@ loadmodule "usrloc/usrloc.so"
 modparam("usrloc", "db_mode", 1)
 
 loadmodule "registrar/registrar.so"
+modparam("registrar", "reg_callid_avp", "$avp(s:foobar)")
+
 #-------------------------  request routing logic -------------------
 route{
 
@@ -55,6 +58,11 @@ route{
 			sl_send_reply("404", "Not Found");
 			exit;
 		}
+		$avp(s:foobar) = $ci + "bar";
+#		$avp(s:foobar) = $ci;
+		if (registered("location")) {
+			xlog("already registered");
+		}
 		append_hf("P-hint: usrloc applied\r\n");
 	}
 
@@ -63,7 +71,7 @@ route{
 
 route[1] {
 	if (!t_relay()) {
-	sl_reply_error();
+		sl_reply_error();
 	}
 	exit;
 }

+ 3 - 0
test/unit/11.sh

@@ -53,6 +53,9 @@ if [ "$TMP" -eq 0 ] ; then
 	ret=1
 fi ;
 
+# see if the user is registered
+cat ../test/invite.sip | nc -q 1 -u localhost 5060 > /dev/null
+
 # unregister the user
 cat ../test/unregister.sip | nc -q 1 -u localhost 5060 > /dev/null