added more to PERFORMANCE_TESTING doc

added performance_test_leads to extras directory
added test function to remote agents bin script

git-svn-id: svn://192.168.202.10@355 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2006-10-12 19:12:53 +00:00
parent e6b1e16a7c
commit 86a0e11f98
3 changed files with 60117 additions and 67 deletions
+19 -3
View File
@@ -84,7 +84,9 @@ print "no command line options set\n";
# constants # constants
$US='__'; $US='__';
$MT[0]=''; $MT[0]='';
$local_DEF = 'Local/';
$conf_silent_prefix = '7';
$local_AMP = '@';
# default path to astguiclient configuration file: # default path to astguiclient configuration file:
$PATHconf = '/etc/astguiclient.conf'; $PATHconf = '/etc/astguiclient.conf';
@@ -140,7 +142,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
or die "Couldn't connect to database: " . DBI->errstr; or die "Couldn't connect to database: " . DBI->errstr;
### Grab Server values from the database ### Grab Server values from the database
$stmtA = "SELECT vd_server_logs,local_gmt FROM servers where server_ip = '$VARserver_ip';"; $stmtA = "SELECT vd_server_logs,local_gmt,ext_context FROM servers where server_ip = '$VARserver_ip';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows; $sthArows=$sthA->rows;
@@ -149,7 +151,8 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
{ {
@aryA = $sthA->fetchrow_array; @aryA = $sthA->fetchrow_array;
$DBvd_server_logs = "$aryA[0]"; $DBvd_server_logs = "$aryA[0]";
$DBSERVER_GMT = "$aryA[1]"; $DBSERVER_GMT = "$aryA[1]";
$ext_context = "$aryA[2]";
if ($DBvd_server_logs =~ /Y/) {$SYSLOG = '1';} if ($DBvd_server_logs =~ /Y/) {$SYSLOG = '1';}
else {$SYSLOG = '0';} else {$SYSLOG = '0';}
if (length($DBSERVER_GMT)>0) {$SERVER_GMT = $DBSERVER_GMT;} if (length($DBSERVER_GMT)>0) {$SERVER_GMT = $DBSERVER_GMT;}
@@ -264,6 +267,7 @@ while($one_day_interval > 0)
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows; $sthArows=$sthA->rows;
$TESTrun=0;
$rec_count=0; $rec_count=0;
while ($sthArows > $rec_count) while ($sthArows > $rec_count)
{ {
@@ -283,6 +287,11 @@ while($one_day_interval > 0)
$DBremote_server_ip[$user_counter] = "$server_ip"; $DBremote_server_ip[$user_counter] = "$server_ip";
$DBremote_campaign[$user_counter] = "$campaign_id"; $DBremote_campaign[$user_counter] = "$campaign_id";
$DBremote_conf_exten[$user_counter] = "$conf_exten"; $DBremote_conf_exten[$user_counter] = "$conf_exten";
if ($conf_exten =~ /999999999999/)
{
$TESTrun++;
$DBremote_conf_exten[$user_counter] = ($user_counter + 8600051);
}
$DBremote_closer[$user_counter] = "$closer_campaigns"; $DBremote_closer[$user_counter] = "$closer_campaigns";
$DBremote_random[$user_counter] = "$random"; $DBremote_random[$user_counter] = "$random";
@@ -382,6 +391,13 @@ while($one_day_interval > 0)
$stmtA = "INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,campaign_id,random_id,last_call_time,last_update_time,last_call_finish,closer_campaigns,channel,uniqueid,callerid) values('$DBremote_user[$h]','$server_ip','$DBremote_conf_exten[$h]','R/$DBremote_user[$h]','READY','$DBremote_campaign[$h]','$DBremote_random[$h]','$SQLdate','$tsSQLdate','$SQLdate','$DBremote_closer[$h]','','','');"; $stmtA = "INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,campaign_id,random_id,last_call_time,last_update_time,last_call_finish,closer_campaigns,channel,uniqueid,callerid) values('$DBremote_user[$h]','$server_ip','$DBremote_conf_exten[$h]','R/$DBremote_user[$h]','READY','$DBremote_campaign[$h]','$DBremote_random[$h]','$SQLdate','$tsSQLdate','$SQLdate','$DBremote_closer[$h]','','','');";
$affected_rows = $dbhA->do($stmtA); $affected_rows = $dbhA->do($stmtA);
if ($DBX) {print STDERR "$DBremote_user[$h] NEW INSERT\n";} if ($DBX) {print STDERR "$DBremote_user[$h] NEW INSERT\n";}
if ($TESTrun > 0)
{
$SIqueryCID = "T$CIDdate$DBremote_conf_exten[$h]";
$stmt="INSERT INTO vicidial_manager values('','','$SQLdate','NEW','N','$server_ip','','Originate','$SIqueryCID','Channel: $local_DEF$DBremote_conf_exten[$h]$local_AMP$ext_context','Context: $ext_context','Exten: 999999999999','Priority: 1','Callerid: $SIqueryCID','','','','','');";
$affected_rows = $dbhA->do($stmtA);
if ($DBX) {print STDERR " TESTrun CALL PLACED: 999999999999 $DBremote_conf_exten[$h] $DBremote_user[$h] NEW INSERT: |$affected_rows|\n";}
}
} }
} }
} }
+36 -2
View File
@@ -1,5 +1,8 @@
PERFORMANCE TESTING OF A VICIDIAL SERVER 2006-10-12 PERFORMANCE TESTING OF A VICIDIAL SERVER 2006-10-12
OVERVIEW:
This document goes over the setup of a VICIDIAL/Asterisk server that you are testing, and the control Asterisk server that will be taking the calls from the serer being tested. This document goes over the setup of a VICIDIAL/Asterisk server that you are testing, and the control Asterisk server that will be taking the calls from the serer being tested.
It is very difficult to realistically performance test a VICIDIAL server not in production because of the randomness of call center operations. It is very difficult to realistically performance test a VICIDIAL server not in production because of the randomness of call center operations.
@@ -8,7 +11,18 @@ How this process works is that multiple remote agents are activated and calls ar
The test server and the control server(s) need to be connected through either crossover T1 cables, SIP trunks or IAX trunks. The test server and the control server(s) need to be connected through either crossover T1 cables, SIP trunks or IAX trunks.
For this test below we will be attempting to simulate agents logging in over SIP phones to meetme rooms on the test server. The agent connections will actually be a six(6) hour loop of on-hold-music to simulate voice(the conf.gsm file). This will be on one of the control servers so simulate true SIP phone agent connections to meetme rooms on the test server. It is important that there are no live VICIDIAL agents or calls happening on this server when performance testing is enabled.
If you want pretty server performance graphics you need to make sure the server record has performance logging enabled.
EXAMPLE TESTING SCENARIO:
For this test below we will be placing calls out over crossover T1 cables to other Asterisk servers and we will be attempting to simulate agents logging in over SIP phones to meetme rooms on the test server. The agent connections will actually be a six(6) hour loop of on-hold-music to simulate voice(the conf.gsm file). This will be on one of the control servers so simulate true SIP phone agent connections to meetme rooms on the test server.
When setting up the remote agents record we will use 999999999999(twelve nines) as the dialplan number. This is a special flag in the remote agents handling script that will give a different session_id to each remote agent and will place a call from each of those sessions(meetme rooms) to the 999999999999 extension that should be setup to call the on-hold-music on the control server over SIP trunk.
We will also be using a special list of phone numbers to call so that we are sure that we do not place any real phone calls. The special list is available in the extras directory and is called: performance_test_leads.txt
In the control server you will need the following in your extensions.conf: In the control server you will need the following in your extensions.conf:
@@ -36,7 +50,7 @@ exten => _999XXXXXX6,4,Hangup
exten => _999XXXXXX7,1,Wait(12) exten => _999XXXXXX7,1,Wait(12)
exten => _999XXXXXX7,2,Answer exten => _999XXXXXX7,2,Answer
exten => _999XXXXXX7,3,Playback(demo-instruct) exten => _999XXXXXX7,3,Playback(demo-enterkeywords)
exten => _999XXXXXX7,4,Hangup exten => _999XXXXXX7,4,Hangup
exten => _999XXXXXX8,1,Busy exten => _999XXXXXX8,1,Busy
@@ -51,14 +65,34 @@ exten => _999XXXXXX0,2,Answer
exten => _999XXXXXX0,3,Playback(vm-goodbye) exten => _999XXXXXX0,3,Playback(vm-goodbye)
exten => _999XXXXXX0,4,Hangup exten => _999XXXXXX0,4,Hangup
exten => 999999999999,1,Answer
exten => 999999999999,2,Playback(conf)
exten => 999999999999,3,Playback(conf)
exten => 999999999999,4,Playback(conf)
exten => 999999999999,5,Playback(conf)
exten => 999999999999,6,Playback(conf)
exten => 999999999999,7,Playback(conf)
exten => 999999999999,8,Playback(conf)
exten => 999999999999,9,Playback(conf)
exten => 999999999999,10,Playback(conf)
exten => 999999999999,11,Playback(conf)
exten => 999999999999,12,Playback(conf)
exten => 999999999999,13,Playback(conf)
exten => 999999999999,14,Hangup
In the test server you will need the following in your extensions.conf: In the test server you will need the following in your extensions.conf:
[globals] [globals]
TESTTRUNK = Zap/g2 TESTTRUNK = Zap/g2
TESTSIPTRUNK = SIP/VICItest:test@10.10.10.16:5060
[default] [default]
;exten => _91999NXXXXXX,1,AGI(call_log.agi) ;exten => _91999NXXXXXX,1,AGI(call_log.agi)
exten => _91999NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) exten => _91999NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _91999NXXXXXX,2,Dial(${TESTTRUNK}/${EXTEN:2},,tTo) exten => _91999NXXXXXX,2,Dial(${TESTTRUNK}/${EXTEN:2},,tTo)
exten => _91999NXXXXXX,3,Hangup exten => _91999NXXXXXX,3,Hangup
exten => 999999999999,1,Answer
exten => 999999999999,2,Dial(${TESTSIPTRUNK}/${EXTEN},,tTo)
exten => 999999999999,2,Hangup
File diff suppressed because it is too large Load Diff