-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into issue1726_CallerRejectNotification
- Loading branch information
Showing
1,310 changed files
with
37,806 additions
and
99,568 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Load test for Restcomm REST API Create call | ||
|
||
The scripts here will do the following: | ||
1. Will start a sipp thread that will listen for INVITE requests following the hello-play RCML application | ||
2. Will use CURL to create and SEND REST API requests to Calls endpoint. Restcomm will create call to the sipp thread. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
## | ||
## Descript+ion: Restcomm performance test script for Dial Client application. | ||
## Author : George Vagenas | ||
# | ||
|
||
usage() { | ||
echo 'Script usage: ./helloplay-one-minute.sh $RESTCOMM_ADDRESS $LOCAL_ADDRESS $SIMULTANEOUS_CALLS $MAXIMUM_CALLS $CALL_RATE' | ||
echo "Example: ./helloplay-one-minute.sh 192.168.1.11 192.168.1.12 100 10000 30" | ||
} | ||
|
||
if [[ -z $LOCAL_ADDRESS ]]; then | ||
LOCAL_ADDRESS=127.0.0.1 | ||
fi | ||
|
||
DATE=$(date +%F_%H_%M) | ||
|
||
echo "Restcomm IP Address: $RESTCOMM_ADDRESS - Local IP Address: $LOCAL_ADDRESS" | ||
|
||
echo "About to launch rocket..." | ||
sleep 3 | ||
$SIPP_EXECUTABLE -sf $CURRENT_FOLDER/tests/createcall/createcall-sipp-server.xml -s 1999 -i $LOCAL_ADDRESS -p 5060 -mi $LOCAL_ADDRESS -m $MAXIMUM_CALLS -recv_timeout 10000 -t un -nr -fd 1 -trace_stat -stf $RESULTS_DIR/createcall-server-$DATE.csv -trace_screen -screen_file $RESULTS_DIR/createcall-server-$DATE-screens.log | ||
echo $? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
<?xml version="1.0" encoding="ISO-8859-1" ?> | ||
<!DOCTYPE scenario SYSTEM "sipp.dtd"> | ||
|
||
<!-- This program is free software; you can redistribute it and/or --> | ||
<!-- modify it under the terms of the GNU General Public License as --> | ||
<!-- published by the Free Software Foundation; either version 2 of the --> | ||
<!-- License, or (at your option) any later version. --> | ||
<!-- --> | ||
<!-- This program is distributed in the hope that it will be useful, --> | ||
<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of --> | ||
<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --> | ||
<!-- GNU General Public License for more details. --> | ||
<!-- --> | ||
<!-- You should have received a copy of the GNU General Public License --> | ||
<!-- along with this program; if not, write to the --> | ||
<!-- Free Software Foundation, Inc., --> | ||
<!-- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --> | ||
<!-- --> | ||
<!-- Sipp default 'uas' scenario. --> | ||
<!-- --> | ||
|
||
<scenario name="Basic UAS responder"> | ||
<!-- By adding rrs="true" (Record Route Sets), the route sets --> | ||
<!-- are saved and used for following messages sent. Useful to test --> | ||
<!-- against stateful SIP proxies/B2BUAs. --> | ||
<recv request="INVITE" crlf="true"> | ||
</recv> | ||
|
||
<!-- The '[last_*]' keyword is replaced automatically by the --> | ||
<!-- specified header if it was present in the last message received --> | ||
<!-- (except if it was a retransmission). If the header was not --> | ||
<!-- present or if no message has been received, the '[last_*]' --> | ||
<!-- keyword is discarded, and all bytes until the end of the line --> | ||
<!-- are also discarded. --> | ||
<!-- --> | ||
<!-- If the specified header was present several times in the --> | ||
<!-- message, all occurences are concatenated (CRLF seperated) --> | ||
<!-- to be used in place of the '[last_*]' keyword. --> | ||
|
||
<send> | ||
<![CDATA[ | ||
SIP/2.0 180 Ringing | ||
[last_Via:] | ||
[last_From:] | ||
[last_To:];tag=[call_number] | ||
[last_Call-ID:] | ||
[last_CSeq:] | ||
Contact: <sip:[local_ip]:[local_port];transport=[transport]> | ||
Content-Length: 0 | ||
]]> | ||
</send> | ||
|
||
<!-- Wait 2 seconds to simulate ringing time --> | ||
<pause milliseconds="2000"/> | ||
|
||
<send retrans="500"> | ||
<![CDATA[ | ||
SIP/2.0 200 OK | ||
[last_Via:] | ||
[last_From:] | ||
[last_To:];tag=[call_number] | ||
[last_Call-ID:] | ||
[last_CSeq:] | ||
Contact: <sip:[local_ip]:[local_port];transport=[transport]> | ||
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 request="ACK" | ||
optional="false" | ||
rtd="true" | ||
crlf="true"> | ||
</recv> | ||
|
||
<pause milliseconds="57000"/> | ||
|
||
<recv request="BYE"> | ||
</recv> | ||
|
||
<send> | ||
<![CDATA[ | ||
SIP/2.0 200 OK | ||
[last_Via:] | ||
[last_From:] | ||
[last_To:] | ||
[last_Call-ID:] | ||
[last_CSeq:] | ||
Contact: <sip:[local_ip]:[local_port];transport=[transport]> | ||
Content-Length: 0 | ||
]]> | ||
</send> | ||
|
||
<!-- Keep the call open for a while in case the 200 is lost to be --> | ||
<!-- able to retransmit it if we receive the BYE again. --> | ||
<pause milliseconds="4000"/> | ||
|
||
<!-- definition of the response time repartition table (unit is ms) --> | ||
<ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/> | ||
|
||
<!-- definition of the call length repartition table (unit is ms) --> | ||
<CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/> | ||
|
||
</scenario> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/bin/bash | ||
|
||
AUTHTOKEN=$1 | ||
RESTCOMM_ADDRESS=$2 | ||
LOCAL_ADDRESS=$3 | ||
MAX_CALLS=$4 | ||
CPS=$5 | ||
SIPP_CLIENT=sip:1999@$LOCAL_ADDRESS | ||
|
||
SLEEP_TIME=$(echo "scale=10;1/$CPS" | bc) | ||
|
||
DATE=$(date +%F_%H_%M) | ||
|
||
echo "Running Create Call load test, will create REST API calls to get $MAX_CALLS calls to Client $SIPP_CLIENT with call rate $CPS cps" > $RESULTS_DIR/createcall-$DATE.log | ||
echo "Authtoken: $AUTHTOKEN, RESTCOMM_ADDRESS: $RESTCOMM_ADDRESS, SIPP_CLIENT: sip:1999@$LOCAL_ADDRESS, MAX_CALLS: $MAX_CALLS, CPS: $CPS, SLEEP_TIME: $SLEEP_TIME" >> $RESULTS_DIR/createcall-$DATE.log | ||
|
||
CURL_COMMAND="curl --connect-timeout 1 -X POST http://administrator%40company.com:$AUTHTOKEN@$RESTCOMM_ADDRESS:8080/restcomm/2012-04-24/Accounts/ACae6e420f425248d6a26948c17a9e2acf/Calls.json -d From=15126001502 -d To=sip%3A1999%40$LOCAL_ADDRESS -d Url=http://$RESTCOMM_ADDRESS:8080/restcomm/demos/hello-play.xml" | ||
echo "Will use CURL Command: $CURL_COMMAND" >> $RESULTS_DIR/createcall-$DATE.log | ||
#First REST API Request will take longer than the rest because Jersey loads all endpoints | ||
# exec $CURL_COMMAND | ||
|
||
echo "Sleeping for 10 sec before starting the test" >> $RESULTS_DIR/createcall-$DATE.log | ||
sleep 10 | ||
echo "About to start test" >> $RESULTS_DIR/createcall-$DATE.log | ||
|
||
x=1 | ||
while [ $x -le $MAX_CALLS ] | ||
do | ||
echo "Will create $x call out of $MAX_CALLS to $SIPP_CLIENT" >> $RESULTS_DIR/createcall-$DATE.log | ||
eval $CURL_COMMAND | ||
x=$(( $x + 1 )) | ||
echo "sleeping for $SLEEP_TIME seconds" >> $RESULTS_DIR/createcall-$DATE.log | ||
sleep $SLEEP_TIME | ||
done | ||
|
||
SIPP_PID=$(pidof sipp) | ||
echo | ||
echo "Will wait for SIPP PID $SIPP_PID to finish" | ||
|
||
while [ -e /proc/$SIPP_PID ] | ||
do | ||
echo "Process: $SIPP_PID is still running...." | ||
sleep 20 | ||
done | ||
|
||
echo "SIPP Finished. will terminate script" | ||
|
||
echo "Everything set, will exit createcall.sh script" >> $RESULTS_DIR/createcall-$DATE.log | ||
|
||
exit 0 |
Oops, something went wrong.