Revision: 15452
Author: vladimir.ralev
Date: Mon Nov 22 11:42:53 2010
Log: Update Issue 2093
Test scenarios and scripts
http://code.google.com/p/mobicents/source/detail?r=15452
Added:
/trunk/servers/sip-servlets/sip-servlets-test-suite/sipp-scenarios/clustering/ar
/trunk/servers/sip-servlets/sip-servlets-test-suite/sipp-scenarios/clustering/ar/proxy-b2bua-ar-dar.properties
/trunk/servers/sip-servlets/sip-servlets-test-suite/sipp-scenarios/clustering/ar/proxy-b2bua-ar-receiver.xml
/trunk/servers/sip-servlets/sip-servlets-test-suite/sipp-scenarios/clustering/ar/proxy-b2bua-ar-sender.xml
/trunk/servers/sip-servlets/sip-servlets-test-suite/sipp-scenarios/clustering/ar/worstcase-affinity-lb-configuration.properties
Modified:
/trunk/servers/sip-servlets/sip-servlets-test-suite/sipp-scenarios/clustering/auto-clustering-failover-test.sh
/trunk/servers/sip-servlets/sip-servlets-test-suite/sipp-scenarios/clustering/auto-prepare-example.sh
/trunk/servers/sip-servlets/sip-servlets-test-suite/sipp-scenarios/clustering/clustering-failover-test.sh
=======================================
--- /dev/null
+++
/trunk/servers/sip-servlets/sip-servlets-test-suite/sipp-scenarios/clustering/ar/proxy-b2bua-ar-dar.properties
Mon Nov 22 11:42:53 2010
@@ -0,0 +1,5 @@
+#Application Router Configuration
+#Wed Nov 17 22:04:39 EET 2010
+INVITE=("CustomDistributableCallForwardingB2BUAApplication", "DAR\:From", "TERMINATING", "", "NO_ROUTE", "0",
"DIRECTION\=OUTBOUND"),("org.mobicents.servlet.sip.example.DistributableLocationServiceApplication", "DAR\:From", "TERMINATING", "", "NO_ROUTE", "0",
"DIRECTION\=INBOUND")
+REGISTER=("DistributableClick2Call", "DAR\:From", "TERMINATING", "", "NO_ROUTE",
"0"),("org.mobicents.servlet.sip.example.DistributableSimpleApplication", "DAR\:From", "ORIGINATING", "", "NO_ROUTE", "0")
+OPTIONS=("org.mobicents.servlet.sip.example.DistributableSimpleApplication", "DAR\:From", "ORIGINATING",
"", "NO_ROUTE", "0")
=======================================
--- /dev/null
+++
/trunk/servers/sip-servlets/sip-servlets-test-suite/sipp-scenarios/clustering/ar/proxy-b2bua-ar-receiver.xml
Mon Nov 22 11:42:53 2010
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<!-- Luis Barreiro - Mobicents QA team -->
+
+<scenario name="UAC for SIP-Servlets Tests - location-service-c">
+
+ <recv request="INVITE" rrs="true" timeout="5000"/>
+
+ <send>
+ <![CDATA[
+
+ SIP/2.0 180 Ringing
+ [last_Via:]
+ [last_From:]
+ [last_To:];tag=[call_number]
+ [last_Call-ID:]
+ [last_CSeq:]
+ [last_Record-Route:]
+ Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+ <pause milliseconds="300"/>
+
+ <send retrans="500">
+ <![CDATA[
+
+ SIP/2.0 200 OK
+ [last_Via:]
+ [last_From:]
+ [last_To:];tag=[call_number]
+ [last_Call-ID:]
+ [last_CSeq:]
+ [last_Record-Route:]
+ Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+ Content-Type: application/sdp
+ Content-Length: [len]
+
+ v=0
+ o=callee 53655765 2353687637 IN IP[local_ip_type] [local_ip]
+ s=-
+ c=IN IP[media_ip_type] [media_ip]
+ t=0 0
+ m=audio [media_port] RTP/AVP 0
+ a=rtpmap:0 PCMU/8000
+
+ ]]>
+ </send>
+
+ <recv request="ACK" >
+</recv>
+ <pause milliseconds="6000"/>
+ <recv request="INVITE" rrs="true" timeout="5000"/>
+
+ <pause milliseconds="300"/>
+
+ <send retrans="500">
+ <![CDATA[
+
+ SIP/2.0 200 OK
+ [last_Via:]
+ [last_From:]
+ [last_To:];tag=[call_number]
+ [last_Call-ID:]
+ [last_CSeq:]
+ [last_Record-Route:]
+ Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+ Content-Type: application/sdp
+ Content-Length: [len]
+
+ v=0
+ o=callee 53655765 2353687637 IN IP[local_ip_type] [local_ip]
+ s=-
+ c=IN IP[media_ip_type] [media_ip]
+ t=0 0
+ m=audio [media_port] RTP/AVP 0
+ a=rtpmap:0 PCMU/8000
+
+ ]]>
+ </send>
+
+ <recv request="ACK" >
+</recv>
+ <pause milliseconds="6000"/>
+ <recv request="BYE" timeout="30000" />
+
+ <send>
+ <![CDATA[
+
+ SIP/2.0 200 OK
+ [last_Via:]
+ [last_From:]
+ [last_To:]
+ [last_Call-ID:]
+ [last_CSeq:]
+ [last_Record-Route:]
+ Contact: sip:receiver-failo...@[local_ip]:[local_port]
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+</scenario>
+
=======================================
--- /dev/null
+++
/trunk/servers/sip-servlets/sip-servlets-test-suite/sipp-scenarios/clustering/ar/proxy-b2bua-ar-sender.xml
Mon Nov 22 11:42:53 2010
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<!-- Luis Barreiro - Mobicents QA team -->
+
+<scenario name="UAC for SIP-Servlets Tests - location-service-a">
+
+ <send retrans="10000">
+ <![CDATA[
+
+ INVITE sip:[[email protected] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: sipp <sip:s...@[local_ip]:[local_port]>;tag=[call_number]
+ To: sut <sip:[[email protected]>
+ Call-ID: [call_id]
+ CSeq: 1 INVITE
+ Contact: sip:s...@[local_ip]:[local_port]
+ Max-Forwards: 70
+ Subject: Clustering Test
+ Content-Type: application/sdp
+ Content-Length: [len]
+
+ v=0
+ o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
+ s=-
+ c=IN IP[media_ip_type] [media_ip]
+ t=0 0
+ m=audio [media_port] RTP/AVP 0
+ a=rtpmap:0 PCMU/8000
+
+ ]]>
+ </send>
+
+ <recv response="100" optional="true" />
+
+ <recv response="180" optional="true" />
+
+ <recv response="200" rtd="true" rrs="true">
+ <action>
+ <ereg regexp=".*" search_in="hdr" header="From:" check_it="true"
assign_to="1" />
+ <ereg regexp=".*" search_in="hdr" header="To:" check_it="true"
assign_to="2" />
+ </action>
+ </recv>
+
+ <pause milliseconds="300"/>
+
+ <send>
+ <![CDATA[
+
+ ACK [next_url] SIP/2.0
+ [last_Via:]
+ [last_From:]
+ [last_To:]
+ Call-ID: [call_id]
+ CSeq: 1 ACK
+ [routes]
+ Contact: sip:barre...@[local_ip]:[local_port]
+ Max-Forwards: 70
+ Subject: Clustering Test
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+ <pause milliseconds="6000"/>
+
+ <send retrans="5000">
+ <![CDATA[
+
+ INVITE [next_url] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From : [$1]
+ To : [$2]
+ Call-ID: [call_id]
+ CSeq: 2 INVITE
+ Contact: sip:s...@[local_ip]:[local_port]
+ [routes]
+ Max-Forwards: 70
+ Subject: Clustering Test
+ Content-Length: 0
+
+ ]]>
+ </send>
+ <recv response="100" optional="true" />
+ <recv response="180" optional="true" />
+ <recv response="200" crlf="true">
+ </recv>
+ <send>
+ <![CDATA[
+
+ ACK [next_url] SIP/2.0
+ [last_Via:]
+ [last_From:]
+ [last_To:]
+ Call-ID: [call_id]
+ CSeq: 2 ACK
+ [routes]
+ Contact: sip:barre...@[local_ip]:[local_port]
+ Max-Forwards: 70
+ Subject: Clustering Test
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+ <pause milliseconds="6000"/>
+
+ <send retrans="5000">
+ <![CDATA[
+
+ BYE [next_url] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From : [$1]
+ To : [$2]
+ Call-ID: [call_id]
+ CSeq: 3 BYE
+ Contact: sip:s...@[local_ip]:[local_port]
+ [routes]
+ Max-Forwards: 70
+ Subject: Clustering Test
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+ <recv response="200" crlf="true">
+ </recv>
+
+</scenario>
=======================================
--- /dev/null
+++
/trunk/servers/sip-servlets/sip-servlets-test-suite/sipp-scenarios/clustering/ar/worstcase-affinity-lb-configuration.properties
Mon Nov 22 11:42:53 2010
@@ -0,0 +1,105 @@
+# Mobicents Load Balancer Settings
+# For an overview of the Mobicents Load Balancer visit
http://docs.google.com/present/view?id=dc5jp5vx_89cxdvtxcm
+
+# The binding address of the load balancer
+host=127.0.0.1
+
+# The RMI port used for heartbeat signals
+rmiRegistryPort=2000
+
+# The SIP port used where client should connect
+externalPort=5060
+
+# The SIP port from where servers will receive messages
+# delete if you want to use only one port for both inbound and outbound)
+# if you like to activate the integrated HTTP load balancer, this is the
entry point
+internalPort=5065
+
+# The HTTP port for HTTP forwarding
+httpPort=2080
+#If no nodes are active the LB can redirect the traffic to the
unavailableHost specified in this property,
+#otherwise, it will return 503 Service Unavailable
+#unavailableHost=google.com
+
+#Specify UDP or TCP (for now both must be the same)
+internalTransport=UDP
+externalTransport=UDP
+
+# If you are using IP load balancer, put the IP address and port here
+#externalIpLoadBalancerAddress=127.0.0.1
+#externalIpLoadBalancerPort=111
+
+# Requests initited from the App Servers can route to this address (if you
are using 2 IP load balancers for bidirectional SIP LB)
+#internalIpLoadBalancerAddress=127.0.0.1
+#internalIpLoadBalancerPort=111
+
+# Designate extra IP addresses as serer nodes
+#extraServerNodes=222.221.21.12:21,45.6.6.7:9003,33.5.6.7,33.9.9.2
+
+# Call-ID affinity algortihm settings. This algorithm is the default. No
need to uncomment it.
+algorithmClass=org.mobicents.tools.sip.balancer.WorstCaseUdpTestAffinityAlgorithm
+# This property specifies how much time to keep an association before
being evitcted.
+# It is needed to avoid memory leaks on dead calls. The time is in seconds.
+#callIdAffinityMaxTimeInCache=500
+
+# Uncomment to enable the consistent hash based on Call-ID algorithm.
+#algorithmClass=org.mobicents.tools.sip.balancer.HeaderConsistentHashBalancerAlgorithm
+# This property is not required, it defaults to Call-ID if not set, cna
be "from.user" or "to.user" when you want the SIP URI username
+#sipHeaderAffinityKey=Call-ID
+#specify the GET HTTP parameter to be used as hash key
+#httpAffinityKey=appsession
+
+# Uncomment to enable the persistent consistent hash based on Call-ID
algorithm.
+#algorithmClass=org.mobicents.tools.sip.balancer.PersistentConsistentHashBalancerAlgorithm
+# This property is not required, it defaults to Call-ID if not set
+#sipHeaderAffinityKey=Call-ID
+#specify the GET HTTP parameter to be used as hash key
+#httpAffinityKey=appsession
+
+#This is the JBoss Cache 3.1 configuration file (with jgroups), if not
specified it will use default
+#persistentConsistentHashCacheConfiguration=/home/config.xml
+
+# Call-ID affinity algortihm settings. This algorithm is the default. No
need to uncomment it.
+#algorithmClass=org.mobicents.tools.sip.balancer.CallIDAffinityBalancerAlgorithm
+# This property specifies how much time to keep an association before
being evitcted.
+# It is needed to avoid memory leaks on dead calls. The time is in seconds.
+#callIdAffinityMaxTimeInCache=500
+
+# Uncomment to enable the consistent hash based on Call-ID algorithm.
+#algorithmClass=org.mobicents.tools.sip.balancer.HeaderConsistentHashBalancerAlgorithm
+# This property is not required, it defaults to Call-ID if not set, cna
be "from.user" or "to.user" when you want the SIP URI username
+#sipHeaderAffinityKey=Call-ID
+#specify the GET HTTP parameter to be used as hash key
+#httpAffinityKey=appsession
+
+# Uncomment to enable the persistent consistent hash based on Call-ID
algorithm.
+#algorithmClass=org.mobicents.tools.sip.balancer.PersistentConsistentHashBalancerAlgorithm
+# This property is not required, it defaults to Call-ID if not set
+#sipHeaderAffinityKey=Call-ID
+#specify the GET HTTP parameter to be used as hash key
+#httpAffinityKey=appsession
+
+#This is the JBoss Cache 3.1 configuration file (with jgroups), if not
specified it will use default
+#persistentConsistentHashCacheConfiguration=/home/config.xml
+
+#JSIP stack configuration.....
+javax.sip.STACK_NAME = SipBalancerForwarder
+javax.sip.AUTOMATIC_DIALOG_SUPPORT = off
+# You need 16 for logging traces. 32 for debug + traces.
+# Your code will limp at 32 but it is best for debugging.
+gov.nist.javax.sip.TRACE_LEVEL = 0
+
+// Specify if message contents should be logged.
+gov.nist.javax.sip.LOG_MESSAGE_CONTENT=false
+
+gov.nist.javax.sip.DEBUG_LOG =
/Users/vladimirralev/logs/sipbalancerforwarderdebug.txt
+gov.nist.javax.sip.SERVER_LOG =
/Users/vladimirralev/logs/sipbalancerforwarder.xml
+gov.nist.javax.sip.THREAD_POOL_SIZE = 64
+gov.nist.javax.sip.REENTRANT_LISTENER = true
+gov.nist.javax.sip.TCP_POST_PARSING_THREAD_POOL_SIZE = -1
+gov.nist.javax.sip.MAX_MESSAGE_SIZE=2000
+
+#If a node doesnt check in within that time (in ms), it is considered dead
+nodeTimeout=5100
+#The consistency of the above condition is checked every heartbeatInterval
milliseconds
+heartbeatInterval=5000
=======================================
---
/trunk/servers/sip-servlets/sip-servlets-test-suite/sipp-scenarios/clustering/auto-clustering-failover-test.sh
Tue Nov 16 12:46:45 2010
+++
/trunk/servers/sip-servlets/sip-servlets-test-suite/sipp-scenarios/clustering/auto-clustering-failover-test.sh
Mon Nov 22 11:42:53 2010
@@ -23,6 +23,11 @@
echo "java -server -Xms1536m -Xmx1536m -XX:PermSize=128M
-XX:MaxPermSize=256M -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -jar
$JBOSS_HOME/sip-balancer/sip-balancer-jar-with-dependencies.jar
-mobicents-balancer-config=$JBOSS_HOME/sip-balancer/lb-configuration.properties"
auto-startlb.sh
chmod +x auto-startlb.sh
+echo "#!/bin/sh" > auto-startlb-worst.sh
+echo "java -server -Xms1536m -Xmx1536m -XX:PermSize=128M
-XX:MaxPermSize=256M -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -jar
$JBOSS_HOME/sip-balancer/sip-balancer-jar-with-dependencies.jar
-mobicents-balancer-config=ar/worstcase-affinity-lb-configuration.properties"
auto-startlb-worst.sh
+chmod +x auto-startlb-worst.sh
+
+
./auto-startlb.sh > siplb.out &
export SIPLB=$!
echo "SIP LB $SIPLB"
@@ -304,6 +309,55 @@
./auto-run-test.sh uas-timer-passivation result.txt
+#Kill the app servers
+./auto-kill-process-tree.sh `cat $config1.pid` $config1
+./auto-kill-process-tree.sh `cat $config2.pid` $config2
+
+sleep 10
+
+##################################
+# Test AR
+##################################
+echo "Test Proxy-B2bua AR"
+echo "================================"
+
+#We must kill the LB here and make it use worstcase affinity
+./auto-kill-process-tree.sh $SIPLB siplb
+./auto-startlb-worst.sh > siplb.out &
+export SIPLB=$!
+echo "SIP LB $SIPLB"
+
+./auto-prepare-example.sh proxy-b2bua-ar $config1
+./auto-prepare-example.sh proxy-b2bua-ar $config2
+
+./auto-start-jboss-server.sh $config2 $config2.pid 1 uac
+
+#Wait to boot
+sleep $HALFSTARTSLEEP
+
+./auto-start-jboss-server.sh $config1 $config1.pid 0 uac
+
+# SIPp should be running by the time JBoss finishes the startup, hence we
use half start time here.
+
+#cleanup flag files for this test
+rm -rf *.flag
+
+sleep $HALFSTARTSLEEP
+./auto-run-test.sh proxy-b2bua-ar result-ignore.txt
+
+sleep 20
+if [ -f lssdestryed.flag -a -f cb2buadestryed.flag ]; then
+ #success if both flags are present
+ echo "proxy-b2bua-ar 0" >> result.txt
+else
+ #failure is one of the flags is missing
+ echo "proxy-b2bua-ar 1" >> result.txt
+fi
+
+#some debug info
+cat result.txt
+ls
+
#Kill the app servers
./auto-kill-process-tree.sh `cat $config1.pid` $config1
./auto-kill-process-tree.sh `cat $config2.pid` $config2
@@ -336,6 +390,8 @@
sleep 10
+
+
##################################
# Cleanup
##################################
=======================================
---
/trunk/servers/sip-servlets/sip-servlets-test-suite/sipp-scenarios/clustering/auto-prepare-example.sh
Mon Nov 15 08:47:48 2010
+++
/trunk/servers/sip-servlets/sip-servlets-test-suite/sipp-scenarios/clustering/auto-prepare-example.sh
Mon Nov 22 11:42:53 2010
@@ -54,5 +54,14 @@
cp
$EXAMPLES_HOME/shootist-sip-servlet-distributable/target/shootist-sip-servlet-distributable-*.war
$JBOSS_HOME/server/$config/deploy
cp
$EXAMPLES_HOME/shootist-sip-servlet-distributable/distributable-shootist-dar.properties
$JBOSS_HOME/server/$config/conf/dars/mobicents-dar.properties
;;
+ proxy-b2bua-ar)
+ echo "Distributed example used is proxy-b2bua-ar"
+ mvn clean install -f
$EXAMPLES_HOME/custom-call-forwarding-distributable/pom.xml
+ rm -rf
$JBOSS_HOME/server/$config/deploy/custom-call-forwarding-distributable-*.war
+ cp
$EXAMPLES_HOME/custom-call-forwarding-distributable/target/custom-call-forwarding-distributable-*.war
$JBOSS_HOME/server/$config/deploy
+ mvn clean install -f
$EXAMPLES_HOME/location-service-distributable/pom.xml
+ rm -rf
$JBOSS_HOME/server/$config/deploy/location-service-distributable-*.war
+ cp
$EXAMPLES_HOME/location-service-distributable/target/location-service-distributable-*.war
$JBOSS_HOME/server/$config/deploy
+ cp ar/proxy-b2bua-ar-dar.properties
$JBOSS_HOME/server/$config/conf/dars/mobicents-dar.properties
esac
fi
=======================================
---
/trunk/servers/sip-servlets/sip-servlets-test-suite/sipp-scenarios/clustering/clustering-failover-test.sh
Tue Nov 16 12:46:45 2010
+++
/trunk/servers/sip-servlets/sip-servlets-test-suite/sipp-scenarios/clustering/clustering-failover-test.sh
Mon Nov 22 11:42:53 2010
@@ -143,6 +143,12 @@
echo "Distributed example used is uas-0.0.0.0";
./sipp $MSS_IP:5080 -s isendbye -sf uas/clustering-uac.xml
-trace_err -i $SIPP_IP -p 5050 -r $RATE -m $CALLS -rsa $LB_IP:5060
-trace_msg -nd -timeout $ACTIVE_TIMEOUT -timeout_error
;;
+ proxy-b2bua-ar)
+ rm ./ar/*.log
+ echo "Distributed example used is proxy-b2bua-ar";
+ $NOHUP ./sipp $MSS_IP:5060 -sf proxy-b2bua-ar-receiver.xml -i
$SIPP_IP -p 5090 -nd $BACKGROUNDMETHOD
+ ./sipp $MSS_IP:5060 -s receiver-failover -sf
proxy/proxy-b2bua-ar-sender.xml -trace_err -i $SIPP_IP -p 5050 -r $RATE -m
$CALLS -rsa $LB_IP:5060 -trace_msg -timeout $ACTIVE_TIMEOUT -timeout_error
+ ;;
esac
else
echo "Syntax is command SCENARIO TIMEOUT CALL_RATE NUMBER_OF_CALLS"