|
@@ -74,8 +74,38 @@ if [ "$ret" -eq 0 ]; then
|
|
ret=`$PSQL "select COUNT(*) from location where username='49721123456789';" | tail -n 1`
|
|
ret=`$PSQL "select COUNT(*) from location where username='49721123456789';" | tail -n 1`
|
|
fi;
|
|
fi;
|
|
|
|
|
|
|
|
+$PSQL "delete from location where username like '49721123456789%';"
|
|
|
|
+
|
|
|
|
+if [ "$ret" -eq 0 ]; then
|
|
|
|
+ # register again
|
|
|
|
+ sipsak -U -C sip:foobar@localhost -s sip:49721123456789@localhost -H localhost &> /dev/null
|
|
|
|
+ ret=$?
|
|
|
|
+fi;
|
|
|
|
+
|
|
|
|
+$KILL
|
|
|
|
+
|
|
|
|
+# restart to test preload_udomain functionality
|
|
|
|
+../$BIN -w . -f ../test/$CFG > /dev/null
|
|
|
|
+ret=$?
|
|
|
|
+
|
|
|
|
+sleep 1
|
|
|
|
+
|
|
|
|
+if [ "$ret" -eq 0 ]; then
|
|
|
|
+ # check if the contact is still registered
|
|
|
|
+ sipsak -U -C empty -s sip:[email protected] -H localhost -q "Contact: <sip:foobar@localhost>" &> /dev/null
|
|
|
|
+ ret=$?
|
|
|
|
+fi;
|
|
|
|
+
|
|
|
|
+# check if the methods value is correct
|
|
|
|
+if [ "$ret" -eq 0 ]; then
|
|
|
|
+ ./$CTL ul show | grep "Methods:: 4294967295" &> /dev/null
|
|
|
|
+ ret=$?
|
|
|
|
+fi;
|
|
|
|
+
|
|
$KILL
|
|
$KILL
|
|
|
|
|
|
|
|
+$PSQL "delete from location where username like '49721123456789%';"
|
|
|
|
+
|
|
cd ../test
|
|
cd ../test
|
|
mv $CFG.tmp $CFG
|
|
mv $CFG.tmp $CFG
|
|
|
|
|