Commit b74c373c authored by Guillaume Beraudo's avatar Guillaume Beraudo

Separate authentified and not authentified tests.

Add a launch.config.perso.sample where to define paths to flexisip and sipp.
parent d2fe3eed
*.log
logs
launch.config.perso
......@@ -9,7 +9,7 @@ aliases=sip.example.org
[module::Registrar]
#enabled=false
reg_domains=sip.example.org
reg_domains=sip.example.org sip-auth.example.org
[module::MediaRelay]
enabled=false
......@@ -20,11 +20,14 @@ enabled=false
#to-domains=sip.example.org
[module::Authentication]
auth_domains=sip.example.org
enabled=true
auth_domains=sip-auth.example.org
from-domains=sip-auth.example.org
datasource=DSN=PostgreSQL test;
request=select password from accounts where id = ?
max_id_length=30
max_password_length=30
hashed_passwords=false
......
......@@ -5,7 +5,7 @@
debug=1
#Tell the proxy its list of aliases separated by commas, that is domain names or IP address it can be reached with
aliases=sip.example.org
aliases=sip.example.org sip-auth.example.org
[module::Registrar]
enabled=false
......
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE scenario SYSTEM "../sipp.dtd">
<scenario>
<Global variables="userId,luserAdd,luserIpPort">
<action>
<assign assign_to="userId" value="0" />
</action>
</Global>
<nop>
<action>
<add assign_to="userId" value="1" />
<assignstr assign_to="luserIpPort" value="[local_ip]:[local_port]" />
<assignstr assign_to="luserAdd" value="sip:user0.000000@sip-auth.example.org" />
<assignstr assign_to="ruserAdd" value="sip:user[$userId]@sip.example.org" />
</action>
</nop>
<send>
<![CDATA[
INVITE [$ruserAdd] SIP/2.0
Via: SIP/2.0/[transport] [$luserIpPort];branch=[branch]
From: <[$luserAdd]>;tag=[pid]SIPpTag00[call_number]
To: <[$ruserAdd]>
Call-ID: [call_id]
CSeq: 1 INVITE
Contact: [$luserAdd]
Max-Forwards: 70
Subject: Test invite from client
Content-Type: application/sdp
Content-Length: [len]
v=0
o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
s=A conversation
c=IN IP[media_ip_type] [media_ip]
t=0 0
m=audio [media_port] RTP/AVP 114 101
a=rtpmap:114 AMR/8000/1
a=fmtp:114 octet-align=1
a=rtpmap:101 telephone-event/8000/1
a=fmtp:101 0-11
a=sendrecv
]]>
</send>
<recv response="100" optional="true"></recv>
<recv response="407" auth="true"></recv>
<send>
<![CDATA[
INVITE [$ruserAdd] SIP/2.0
Via: SIP/2.0/[transport] [$luserIpPort];branch=[branch]
From: <[$luserAdd]>;tag=[pid]SIPpTag00[call_number]
To: <[$ruserAdd]>
Call-ID: [call_id]
CSeq: 2 INVITE
Contact: [$luserAdd]
[authentication username=user0.000000 password=user0.000000]
Max-Forwards: 70
Subject: Test invite from client
Content-Type: application/sdp
Content-Length: [len]
v=0
o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
s=A conversation
c=IN IP[media_ip_type] [media_ip]
t=0 0
m=audio [media_port] RTP/AVP 114 101
a=rtpmap:114 AMR/8000/1
a=fmtp:114 octet-align=1
a=rtpmap:101 telephone-event/8000/1
a=fmtp:101 0-11
a=sendrecv
]]>
</send>
<recv response="100" optional="true"></recv>
<recv response="180" optional="true"></recv>
<recv response="183" optional="true"></recv>
<recv response="200" rtd="true" timeout="2000"></recv>
<send>
<![CDATA[
ACK [$ruserAdd] SIP/2.0
Via: SIP/2.0/[transport] [$luserIpPort];branch=[branch]
From: <[$luserAdd]>;tag=[pid]SIPpTag00[call_number]
To: <[$ruserAdd]>[peer_tag_param]
Call-ID: [call_id]
CSeq: 1 ACK
Contact: [$luserAdd]
[authentication username=user0.000000 password=user0.000000]
Max-Forwards: 70
Subject: Ack user we have received the 200
Content-Length: 0
]]>
</send>
<nop>
<action>
<exec play_pcap_audio="transcoding/one_way_amr_capture.pcap"/>
</action>
</nop>
<!-- Wait untill the pcap file is almost entirely played. -->
<pause milliseconds="180000"/>
<send>
<![CDATA[
BYE [$ruserAdd] SIP/2.0
Via: SIP/2.0/[transport] [$luserIpPort];branch=[branch]
From: <[$luserAdd]>;tag=[pid]SIPpTag00[call_number]
To: <[$ruserAdd]>[peer_tag_param]
Call-ID: [call_id]
CSeq: 2 BYE
Contact: [$luserAdd]
[authentication username=user0.000000 password=user0.000000]
Max-Forwards: 70
Subject: Teminate invite
Content-Length: 0
]]>
</send>
<recv response="200" crlf="true" timeout="2000"></recv>
<ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
<CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
</scenario>
......@@ -3,7 +3,7 @@
<scenario>
<Global variables="userId,luserAdd,luserIpPort,authentify">
<Global variables="userId,luserAdd,luserIpPort">
<action>
<assign assign_to="userId" value="0" />
</action>
......@@ -11,9 +11,9 @@
<nop>
<action>
<assignstr assign_to="luserIpPort" value="[local_ip]:[local_port]" />
<assignstr assign_to="luserAdd" value="sip:user0.000000@sip.example.org" />
<add assign_to="userId" value="1" />
<assignstr assign_to="luserIpPort" value="[local_ip]:[local_port]" />
<assignstr assign_to="luserAdd" value="sip:[$luserIpPort]" />
<assignstr assign_to="ruserAdd" value="sip:user[$userId]@sip.example.org" />
</action>
</nop>
......@@ -37,73 +37,26 @@
v=0
o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
s=-
s=A conversation
c=IN IP[media_ip_type] [media_ip]
t=0 0
m=audio [media_port] RTP/AVP 0
a=rtpmap:0 PCMU/8000
m=audio [media_port] RTP/AVP 114 101
a=rtpmap:114 AMR/8000/1
a=fmtp:114 octet-align=1
a=rtpmap:101 telephone-event/8000/1
a=fmtp:101 0-11
a=sendrecv
]]>
</send>
<recv response="100" optional="true"></recv>
<recv response="407" optional="true" auth="true" next="2"></recv>
<recv response="180" optional="true"></recv>
<recv response="183" optional="true"></recv>
<recv response="200" rtd="true" timeout="2000"></recv>
<nop condexec="authentify" hide="true">
<action>
<log message="Scenario expecting authentication but server sent a 200 OK to an unauthenticated registrar (scn authentication = [$authentify])"/>
<exec command="aplay ../bom.wav" />
</action>
</nop>
<nop next="3" hide="true" />
<label id="2"/>
<nop condexec="authentify" condexec_inverse="true" hide="true">
<action>
<log message="Scenario doesn't expect authentication but server sent a 407 to the unauthenticated registrar (scn authentication = [$authentify])"/>
<exec command="aplay ../bom.wav" />
<jump value="3"/>
</action>
</nop>
<send>
<![CDATA[
INVITE [$ruserAdd] SIP/2.0
Via: SIP/2.0/[transport] [$luserIpPort];branch=[branch]
From: <[$luserAdd]>;tag=[pid]SIPpTag00[call_number]
To: <[$ruserAdd]>
Call-ID: [call_id]
CSeq: 2 INVITE
Contact: [$luserAdd]
[authentication username=user0.000000 password=user0.000000]
Max-Forwards: 70
Subject: Test invite from client
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>
<recv response="180" optional="true"></recv>
<recv response="183" optional="true"></recv>
<recv response="200" rtd="true" timeout="2000"></recv>
<send>
<![CDATA[
......@@ -121,11 +74,16 @@
]]>
</send>
<!-- This delay can be customized by the -d command-line option -->
<!-- or by adding a 'milliseconds = "value"' option here. -->
<pause/>
<!-- The 'crlf' option inserts a blank line in the statistics report. -->
<nop>
<action>
<exec play_pcap_audio="transcoding/one_way_amr_capture.pcap"/>
</action>
</nop>
<!-- Wait untill the pcap file is almost entirely played. -->
<pause milliseconds="180000"/>
<send>
<![CDATA[
......@@ -136,7 +94,6 @@
Call-ID: [call_id]
CSeq: 2 BYE
Contact: [$luserAdd]
[authentication username=user0.000000 password=user0.000000]
Max-Forwards: 70
Subject: Teminate invite
Content-Length: 0
......@@ -147,14 +104,7 @@
<recv response="200" crlf="true" timeout="2000"></recv>
<label id="3"/>
<!-- 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>
......
SIPP=/home/guillaume/dev/sipp/sipp/trunk/sipp
FLEXISIP=/home/guillaume/dev/inst/bin/flexisip
OUTBOUND_PROXY_PORT=5099
CALL_LENGTH=180
NB_USERS=10000
#NB_USERS=1
export LD_LIBRARY_PATH=/home/guillaume/dev/inst/lib/
#export SOFIA_DEBUG=9
REG_OPTIONS="-r 10 -rp 1s -nd --users 100 -inf authentication.csv -set authentify 'true'"
REG_INVITER_OPTIONS="-nd -set authentify 'true'"
INV_RATE=`echo $NB_USERS / $CALL_LENGTH | bc`
[ $NB_USERS -le $CALL_LENGTH ] && INV_RATE=1
INV_OPTIONS="-r $INV_RATE -rp 1s -default_behaviors all,-bye -l $NB_USERS -d "$CALL_LENGTH"s -inf authentication.csv -set authentify 'true'"
. launch.config.perso
#FLEX_OPTIONS="--debug"
OUTBOUND_PROXY_PORT=5099
INV_OPTIONS="-r $INV_RATE -rp 1s -default_behaviors all,-bye -l $NB_USERS -d "$CALL_LENGTH"s"
FLEX_TRANSCO_OPTIONS="--configfile $FOLDER/flexisip_transcoder.conf --port $OUTBOUND_PROXY_PORT"
echo "Start flexisip transcoder: $FLEX_TRANSCO_OPTIONS"
$FLEXISIP $FLEX_TRANSCO_OPTIONS 2>&1 > flexisip_transcoder.log &
CMD_TRANSCO="$FLEXISIP $FLEX_TRANSCO_OPTIONS"
echo -e "\n\033[1mStart flexisip transcoder: $CMD_TRANSCO \033[0m"
$CMD_TRANSCO 2>&1 > flexisip_transcoder.log &
sleep 2s
SIPP_COMMONS="-rsa $IP:$OUTBOUND_PROXY_PORT"
......@@ -5,11 +5,11 @@
debug=1
#Tell the proxy its list of aliases separated by commas, that is domain names or IP address it can be reached with
aliases=sip.linphone.org
aliases=sip.example.org sip-auth.example.org
[module::Registrar]
#enabled=false
reg_domains=sip.example.org
reg_domains=sip.example.org sip-auth.example.org
[module::MediaRelay]
enabled=false
......@@ -21,11 +21,12 @@ enabled=false
[module::Authentication]
enabled=true
auth_domains=sip.example.org
auth_domains=sip-auth.example.org
from-domains=sip-auth.example.org
#datasource=DSN=PostgreSQL test;
datasource=DSN=myodbc3;
#datasource=DSN=MySqlite;
request=select password from accounts where id = ?
max_id_length=30
max_password_length=30
hashed_passwords=false
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE scenario SYSTEM "../sipp.dtd">
<scenario>
<Global variables="userId,luserAdd,luserIpPort">
<action>
<assign assign_to="userId" value="0" />
</action>
</Global>
<nop>
<action>
<add assign_to="userId" value="1" />
<assignstr assign_to="luserIpPort" value="[local_ip]:[local_port]" />
<assignstr assign_to="luserAdd" value="sip:user0.000000@sip-auth.example.org" />
<assignstr assign_to="ruserAdd" value="sip:user[$userId]@sip.example.org" />
</action>
</nop>
<send>
<![CDATA[
INVITE [$ruserAdd] SIP/2.0
Via: SIP/2.0/[transport] [$luserIpPort];branch=[branch]
From: <[$luserAdd]>;tag=[pid]SIPpTag00[call_number]
To: <[$ruserAdd]>
Call-ID: [call_id]
CSeq: 1 INVITE
Contact: [$luserAdd]
Max-Forwards: 70
Subject: Test invite from client
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>
<recv response="407" auth="true" timeout="2000"></recv>
<send>
<![CDATA[
INVITE [$ruserAdd] SIP/2.0
Via: SIP/2.0/[transport] [$luserIpPort];branch=[branch]
From: <[$luserAdd]>;tag=[pid]SIPpTag00[call_number]
To: <[$ruserAdd]>
Call-ID: [call_id]
CSeq: 2 INVITE
Contact: [$luserAdd]
[authentication username=user0.000000 password=user0.000000]
Max-Forwards: 70
Subject: Test invite from client
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>
<recv response="180" optional="true"></recv>
<recv response="183" optional="true"></recv>
<recv response="200" rtd="true" timeout="2000"></recv>
<send>
<![CDATA[
ACK [$ruserAdd] SIP/2.0
Via: SIP/2.0/[transport] [$luserIpPort];branch=[branch]
From: <[$luserAdd]>;tag=[pid]SIPpTag00[call_number]
To: <[$ruserAdd]>[peer_tag_param]
Call-ID: [call_id]
CSeq: 1 ACK
Contact: [$luserAdd]
[authentication username=user0.000000 password=user0.000000]
Max-Forwards: 70
Subject: Ack user we have received the 200
Content-Length: 0
]]>
</send>
<pause/>
<send>
<![CDATA[
BYE [$ruserAdd] SIP/2.0
Via: SIP/2.0/[transport] [$luserIpPort];branch=[branch]
From: <[$luserAdd]>;tag=[pid]SIPpTag00[call_number]
To: <[$ruserAdd]>[peer_tag_param]
Call-ID: [call_id]
CSeq: 2 BYE
Contact: [$luserAdd]
[authentication username=user0.000000 password=user0.000000]
Max-Forwards: 70
Subject: Teminate invite
Content-Length: 0
]]>
</send>
<recv response="200" crlf="true" timeout="2000"></recv>
<ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
<CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
</scenario>
......@@ -3,7 +3,7 @@
<scenario>
<Global variables="userId,luserAdd,luserIpPort,authentify">
<Global variables="userId,luserAdd,luserIpPort">
<action>
<assign assign_to="userId" value="0" />
</action>
......@@ -45,65 +45,12 @@
]]>
</send>
<recv response="100" optional="true"></recv>
<recv response="407" optional="true" auth="true" next="2"></recv>
<recv response="180" optional="true"></recv>
<recv response="183" optional="true"></recv>
<recv response="200" rtd="true" timeout="2000"></recv>
<nop condexec="authentify" hide="true">
<action>
<log message="Scenario expecting authentication but server sent a 200 OK to an unauthenticated registrar (scn authentication = [$authentify])"/>
<exec command="aplay ../bom.wav" />
</action>
</nop>
<nop next="3" hide="true" />
<label id="2"/>
<nop condexec="authentify" condexec_inverse="true" hide="true">
<action>
<log message="Scenario doesn't expect authentication but server sent a 407 to the unauthenticated registrar (scn authentication = [$authentify])"/>
<exec command="aplay ../bom.wav" />
<jump value="3"/>
</action>
</nop>
<send>
<![CDATA[
INVITE [$ruserAdd] SIP/2.0
Via: SIP/2.0/[transport] [$luserIpPort];branch=[branch]
From: <[$luserAdd]>;tag=[pid]SIPpTag00[call_number]
To: <[$ruserAdd]>
Call-ID: [call_id]
CSeq: 2 INVITE
Contact: [$luserAdd]
[authentication username=user0.000000 password=user0.000000]
Max-Forwards: 70
Subject: Test invite from client
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>
<recv response="180" optional="true"></recv>
<recv response="183" optional="true"></recv>
<recv response="200" rtd="true" timeout="2000"></recv>
<send>
<![CDATA[
......@@ -121,7 +68,6 @@
]]>
</send>
<label id="3"/>
<pause/>
......@@ -146,13 +92,7 @@
<recv response="200" crlf="true" timeout="2000"></recv>
<!-- 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>
......
SIPP=/home/guillaume/dev/sipp/sipp/trunk/sipp
FLEXISIP=/home/guillaume/dev/inst/bin/flexisip
NB_USERS=10000
#NB_USERS=1
CALL_LENGTH=180
export LD_LIBRARY_PATH=/home/guillaume/dev/inst/lib/
AUTH=" -set authentify 'true'"
#AUTH=""
#export SOFIA_DEBUG=9
REG_OPTIONS="-r 10 -rp 1s -nd --users 100 -inf authentication.csv $AUTH"
REG_INVITER_OPTIONS="-nd $AUTH"
INV_RATE=`echo $NB_USERS / $CALL_LENGTH | bc`
[ $NB_USERS -le $CALL_LENGTH ] && INV_RATE=1
INV_OPTIONS="-r $INV_RATE -rp 1s -default_behaviors all,-bye -l $NB_USERS -d "$CALL_LENGTH"s -inf authentication.csv $AUTH"
. launch.config.perso
#NB_USERS=10000
INV_OPTIONS="-r $INV_RATE -rp 1s -default_behaviors all,-bye -l $NB_USERS -d "$CALL_LENGTH"s"
#!/bin/bash
[ ! -f launch.config.perso ] && echo "launch.config.perso not found" && exit 1
FLEXISIP=flexisip
SIPP=sipp
NB_USERS=1000
IP=`cat /etc/hosts | grep sip.example.org | awk -F'\t' '{print $1}'`
IP=`cat /etc/hosts | grep -e "^[^#].*sip.example.org" | egrep "sip-auth.example.org|sip.example.org|relayed-auth.example.org|relayed.example.org" | awk -F'\t' '{print $1}'`
[ -z $IP ] && echo "ERROR: sip.example.org not found in /etc/hosts" && exit
PROXY=sip.example.org
REGISTER_PORT=5070
USERS_PORT=5063
......@@ -11,6 +14,14 @@ INVITER_PORT=5064
# Import configuration
FOLDER=$1
if [ -n "$2" ]
then
echo -e "\033[1mUsing authentication\033[0m"
USE_AUTH="-auth"
else
echo -e "\033[1mNOT using authentication\033[0m"
fi
if [ -z $FOLDER ]
then
echo "Usage ./launch folder, where folder is "
......@@ -22,14 +33,13 @@ FLEX_OPTIONS="$FLEX_OPTIONS --configfile $FOLDER/flexisip.conf --port 5060"
. $FOLDER/launch.config
SIPP_COMMONS="$SIPP_COMMONS -i $IP -trace_err"
REG_OPTIONS="$REG_OPTIONS -p 5070 -m `echo "1+$NB_USERS"|bc` $SIPP_COMMONS"
REG_INVITER_OPTIONS="$REG_INVITER_OPTIONS -p 5064 -m 1 $SIPP_COMMONS"
REG_OPTIONS="$REG_OPTIONS -p 5070 -m `echo "1+$NB_USERS"|bc` $SIPP_COMMONS -inf authentication.csv"
REG_INVITER_OPTIONS="$REG_INVITER_OPTIONS -p 5064 -m 1 $SIPP_COMMONS -nd"
INV_OPTIONS="$INV_OPTIONS -m $NB_USERS -p 5064 $SIPP_COMMONS"
UAS_OPTIONS="$UAS_OPTIONS -p 5063 -bg $SIPP_COMMONS -mi $IP -mp 15000 -rtp_echo"
echo "Using FLEXISIP=$FLEXISIP,SIPP$SIPP,NB_USERS=$NB_USERS"
echo "IP=$IP,PROXY=$PROXY"
echo "Sofia SIP log level: $SU_DEBUG, LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
echo "NB_USERS=$NB_USERS"
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
# Accept core dumps
ulimit -c unlimited
......@@ -38,23 +48,28 @@ ulimit -c unlimited
ulimit -n 65000
echo ""; echo "Start users listening: $SIPP -sf uas.xml $UAS_OPTIONS"
$SIPP -sf uas.xml $UAS_OPTIONS 2>&1 > /dev/null
CMD_UAS="$SIPP -sf uas.xml $UAS_OPTIONS"
echo -e "\n\033[1mStart users listening: $CMD_UAS \033[0m"
$CMD_UAS 2>&1 > /dev/null
echo ""; echo "Start flexisip: $FLEXISIP $FLEX_OPTIONS"
$FLEXISIP $FLEX_OPTIONS 2>&1 > flexisip.log &
CMD_FLEXISIP="$FLEXISIP $FLEX_OPTIONS"
echo -e "\n\033[1mStart flexisip: $CMD_FLEXISIP \033[0m"
$CMD_FLEXISIP 2>&1 > flexisip.log &
sleep 2s
echo ""; echo "Register users $SIPP $PROXY -sf register_users.xml $REG_OPTIONS"
$SIPP $PROXY -sf register_users.xml $REG_OPTIONS
echo ""; echo "Register inviter $SIPP $PROXY -sf register_inviter.xml $REG_INVITER_OPTIONS"
$SIPP $PROXY -sf register_inviter.xml $REG_INVITER_OPTIONS
CMD_REG_USERS="$SIPP $PROXY -sf register_users.xml $REG_OPTIONS"
echo -e "\n\033[1mRegister users $CMD_REG_USERS \033[0m (never authenticated)"
$CMD_REG_USERS
CMD_REG_INVITER="$SIPP $PROXY -sf register_inviter$USE_AUTH.xml $REG_INVITER_OPTIONS"
echo -e "\n\033[1mRegister inviter $CMD_REG_INVITER \033[0m"
$CMD_REG_INVITER
# Allow killing
function onexit() {
echo "Killing everyone"
echo -e "\e[0;31mKilling everyone \033[0m"
killall flexisip 2>/dev/null
killall sipp 2>/dev/null
......@@ -68,10 +83,11 @@ function onexit() {
set -o errtrace
trap onexit 1 2 3 15 ERR
echo "" ; echo "Start inviting users : $INV_OPTIONS"
CMD_INVITE_USERS="$SIPP $PROXY -sf $FOLDER/invite$USE_AUTH.xml $INV_OPTIONS"
echo -e "\n\033[1mStart inviting users : $CMD_INVITE_USERS \033[0m"
while [ true ]
do
$SIPP $PROXY -sf $FOLDER/invite.xml $INV_OPTIONS
$CMD_INVITE_USERS
done
onexit
# Personal base configuration
export LD_LIBRARY_PATH=/home/guillaume/dev/inst/lib/
SIPP=_path_to_sipp_application_compiled_with_openssl_and_pcap_
FLEXISIP=_path_to_flexisip_application_
NB_USERS=1
CALL_LENGTH=180
INV_RATE=`echo $NB_USERS / $CALL_LENGTH | bc`
[ $NB_USERS -le $CALL_LENGTH ] && INV_RATE=1
REG_OPTIONS="-r 10 -rp 1s -nd --users 100"
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">
<scenario>
<Global variables="luserAdd,luserIpPort">
</Global>
<nop hide="true">
<action>
<assignstr assign_to="luserIpPort" value="[local_ip]:[local_port]" />
<assignstr assign_to="luserAdd" value="sip:[$luserIpPort]" />