|
@@ -31,22 +31,24 @@ CFG="20.cfg"
|
|
TMPFILE=`mktemp -t kamailio-test.XXXXXXXXXX`
|
|
TMPFILE=`mktemp -t kamailio-test.XXXXXXXXXX`
|
|
|
|
|
|
# add an registrar entry to the db;
|
|
# add an registrar entry to the db;
|
|
-$MYSQL "INSERT INTO location (username,contact,socket,user_agent,cseq,q) VALUES (\"foo\",\"sip:[email protected]\",\"udp:127.0.0.1:5060\",\"ser_test\",1,-1);"
|
|
|
|
|
|
+$MYSQL "INSERT INTO location (ruid, username,contact,socket,user_agent,cseq,q) VALUES (\"kamailio-test-uid\",\"foo\",\"sip:[email protected]\",\"udp:127.0.0.1:5060\",\"kamailio_test\",1,-1);"
|
|
|
|
|
|
sipp -sn uas -bg -i 127.0.0.1 -m 1 -f 10 -p 5060 &> /dev/null
|
|
sipp -sn uas -bg -i 127.0.0.1 -m 1 -f 10 -p 5060 &> /dev/null
|
|
|
|
|
|
-$BIN -w . -f $CFG &> $TMPFILE
|
|
|
|
|
|
+$BIN -w . -f $CFG > $TMPFILE 2>&1
|
|
|
|
|
|
sipp -sn uac -s foo 127.0.0.1:5059 -i 127.0.0.1 -m 1 -f 10 -p 5061 &> /dev/null
|
|
sipp -sn uac -s foo 127.0.0.1:5059 -i 127.0.0.1 -m 1 -f 10 -p 5061 &> /dev/null
|
|
|
|
|
|
egrep 'ACC:[[:space:]]+transaction[[:space:]]+answered:[[:print:]]*code=200;reason=OK$' $TMPFILE > /dev/null
|
|
egrep 'ACC:[[:space:]]+transaction[[:space:]]+answered:[[:print:]]*code=200;reason=OK$' $TMPFILE > /dev/null
|
|
ret=$?
|
|
ret=$?
|
|
|
|
|
|
|
|
+sleep 1
|
|
|
|
+
|
|
# cleanup
|
|
# cleanup
|
|
killall -9 sipp &> /dev/null
|
|
killall -9 sipp &> /dev/null
|
|
$KILL &> /dev/null
|
|
$KILL &> /dev/null
|
|
rm $TMPFILE
|
|
rm $TMPFILE
|
|
|
|
|
|
-$MYSQL "DELETE FROM location WHERE ((contact = \"sip:[email protected]\") and (user_agent = \"ser_test\"));"
|
|
|
|
|
|
+$MYSQL "DELETE FROM location WHERE ((contact = \"sip:[email protected]\") and (user_agent = \"kamailio_test\"));"
|
|
|
|
|
|
exit $ret;
|
|
exit $ret;
|