|
@@ -1,5 +1,5 @@
|
|
|
#!/bin/bash
|
|
|
-# tests the authentification via auth_db and uri_db
|
|
|
+# tests the authentification via auth_db
|
|
|
|
|
|
# Copyright (C) 2007 1&1 Internet AG
|
|
|
#
|
|
@@ -31,25 +31,28 @@ fi ;
|
|
|
CFG=21.cfg
|
|
|
|
|
|
# add an registrar entry to the db;
|
|
|
-$MYSQL "INSERT INTO subscriber (username, domain, password, email_address) VALUES (\"alice\",\"localhost\",\"alice\",\"alice@localhost\");"
|
|
|
+$MYSQL "INSERT INTO subscriber (username, domain, password) VALUES (\"alice\",\"localhost\",\"alice\");"
|
|
|
|
|
|
-$BIN -w . -f $CFG &> /dev/null;
|
|
|
+$BIN -w . -f $CFG -E -e -dd > /dev/null 2>&1
|
|
|
ret=$?
|
|
|
+
|
|
|
sleep 1
|
|
|
|
|
|
if [ "$ret" -eq 0 ] ; then
|
|
|
- sipp -s alice 127.0.0.1:5059 -i 127.0.0.1 -m 1 -f 1 -auth_uri alice@localhost -p 5061 -sf reg_auth.xml -ap alice &> /dev/null;
|
|
|
+ sipp -s alice 127.0.0.1:5059 -i 127.0.0.1 -m 1 -f 1 -auth_uri alice@localhost -p 5061 -sf reg_auth.xml -ap alice > /dev/null 2>&1 &
|
|
|
ret=$?
|
|
|
-fi;
|
|
|
+fi
|
|
|
|
|
|
if [ "$ret" -eq 0 ] ; then
|
|
|
- sipp -s alice 127.0.0.1:5059 -i 127.0.0.1 -m 1 -f 1 -auth_uri alice@localhost -p 5061 -sf inv_auth.xml -ap alice &> /dev/null;
|
|
|
+ sipp -s alice 127.0.0.1:5059 -i 127.0.0.1 -m 1 -f 1 -auth_uri alice@localhost -p 5061 -sf inv_auth.xml -ap alice > /dev/null 2>&1 &
|
|
|
ret=$?
|
|
|
-fi;
|
|
|
+fi
|
|
|
+
|
|
|
+sleep 1
|
|
|
|
|
|
#cleanup
|
|
|
-$KILL &> /dev/null;
|
|
|
-killall -9 sipp &> /dev/null;
|
|
|
+$KILL > /dev/null
|
|
|
+killall -9 sipp > /dev/null 2>&1
|
|
|
$MYSQL "DELETE FROM subscriber WHERE((username = \"alice\") and (domain = \"localhost\"));"
|
|
|
|
|
|
exit $ret;
|