|
@@ -26,13 +26,17 @@ if ! (check_sipp && check_openser); then
|
|
|
fi ;
|
|
|
|
|
|
CFG=19.cfg
|
|
|
+SRV=5060
|
|
|
+UAS=5070
|
|
|
+UAC=5080
|
|
|
+
|
|
|
|
|
|
# add an registrar entry to the db;
|
|
|
-mysql --show-warnings -B -u openser --password=openserrw -D openser -e "INSERT INTO location (username,contact,socket,user_agent,cseq,q) VALUES (\"foo\",\"sip:foo@localhost\",\"udp:127.0.0.1:5060\",\"ser_test\",1,-1);"
|
|
|
+mysql --show-warnings -B -u openser --password=openserrw -D openser -e "INSERT INTO location (username,contact,socket,user_agent,cseq,q) VALUES (\"foo\",\"sip:foo@localhost:$UAS\",\"udp:127.0.0.1:$UAS\",\"ser_test\",1,-1);"
|
|
|
|
|
|
../openser -w . -f $CFG &> /dev/null
|
|
|
-sipp -sn uas -bg -i localhost -m 10 -f 2 -p 5060 &> /dev/null
|
|
|
-sipp -sn uac -s foo 127.0.0.1:5059 -i 127.0.0.1 -m 10 -f 2 -p 5061 &> /dev/null
|
|
|
+sipp -sn uas -bg -i localhost -m 10 -f 2 -p $UAS &> /dev/null
|
|
|
+sipp -sn uac -s foo 127.0.0.1:$SRV -i localhost -m 10 -f 2 -p $UAC &> /dev/null
|
|
|
|
|
|
ret=$?
|
|
|
|
|
@@ -40,5 +44,5 @@ ret=$?
|
|
|
killall -9 sipp > /dev/null 2>&1
|
|
|
killall -9 openser > /dev/null 2>&1
|
|
|
|
|
|
-mysql --show-warnings -B -u openser --password=openserrw -D openser -e "DELETE FROM location WHERE ((contact = \"sip:foo@localhost\") and (user_agent = \"ser_test\"));"
|
|
|
+mysql --show-warnings -B -u openser --password=openserrw -D openser -e "DELETE FROM location WHERE ((contact = \"sip:foo@localhost:$UAS\") and (user_agent = \"ser_test\"));"
|
|
|
exit $ret;
|