Added DEAD call time logging and agent notification of call hangup

Added cross-listing linking of DIDs, Call Menus and In-groups in admin.php
Changed the audio store to work by server names

git-svn-id: svn://192.168.202.10@1221 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2009-09-08 16:10:35 +00:00
parent d65a83c41c
commit 3d02e5e189
14 changed files with 278 additions and 44 deletions
+2
View File
@@ -220,6 +220,8 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom
56. Added TIMEZONE UP and DOWN lead orders options for campaigns
57. Added DEAD call time logging and agent notification of call hangup
+58
View File
@@ -0,0 +1,58 @@
LIME SURVEY and ViciDial
We've been asked about Lime Survey(http://www.limesurvey.org) integration with ViciDial several times so here is a little summary of how you install it as well as how you can get it to work with Vicidial.
We recommend creating a LimeSurvey Survey for each campaign and adding a "question" that will store the lead ID or phone number. For example, we will use the code LEADID to the survey and then we will send those variables using the web form in the agent interface using the following for the web form address:
VARhttp://SERVER/limesurvey/index.php?sid=37487&lang=en&37487X1X5=--A--phone_number--B--
(example: http://SERVER/limesurvey/index.php?sid=37487&lang=en&37487X1X5=3125551212)
37487 is the survey ID
1 is the question group ID
5 is the question ID (phone number)
3125551212 is a phone number
More information here:
http://docs.limesurvey.org/tiki-index.php?page=Workarounds#Prefilling_survey_answers_using_the_survey_URL
INSTALLATION INSTRUCTIONS:
cd /usr/local/apache2/htdocs/
wget http://softlayer.dl.sourceforge.net/project/limesurvey/1._LimeSurvey_stable/1.85%2B/limesurvey185plus-build7593-20090907.tar.gz
gunzip limesurvey185plus-build7593-20090907.tar.gz
tar xvf limesurvey185plus-build7593-20090907.tar
rm -f limesurvey185plus-build7593-20090907.tar
vi config.php
* change variable to fit
database = limedb
user = limedbuser
password = limedbpw
mysql
create database limedb;
create user limedbuser;
create user limedbuser@localhost;
set password for limedbuser = PASSWORD('limedbpw');
set password for limedbuser@localhost = PASSWORD('limedbpw');
grant all on limedb.* to 'limedbuser';
grant all on limedb.* to 'limedbuser'@'localhost';
*IN A WEB BROWSER, GO TO THIS ADDRESS TO POPULATE THE ADDRESS:
http://SERVER/limesurvey/admin/install/
* delete the admin install directory
rm -fr admin/install/
Go to adm web page:
http://SERVER/limesurvey/admin/admin.php
Add a user: (vicidial/1234/ViciDial User)
Add a group: (ViciDial agent group)
Add a survey: ViciDial test Survey
Add question group: ViciDial general questions
Add a question:
For more information read the online manual:
http://docs.limesurvey.org/tiki-index.php?page=English+Instructions+for+LimeSurvey
+6 -2
View File
@@ -897,6 +897,8 @@ status VARCHAR(6),
user_group VARCHAR(20),
comments VARCHAR(20),
sub_status VARCHAR(6),
dead_epoch INT(10) UNSIGNED,
dead_sec SMALLINT(5) UNSIGNED default '0',
index (lead_id),
index (user),
index (event_time)
@@ -1133,7 +1135,7 @@ outbound_calls_per_second SMALLINT(3) UNSIGNED default '40',
enable_tts_integration ENUM('0','1') default '0',
agentonly_callback_campaign_lock ENUM('0','1') default '1',
sounds_central_control_active ENUM('0','1') default '0',
sounds_web_server VARCHAR(15) default '127.0.0.1',
sounds_web_server VARCHAR(50) default '127.0.0.1',
sounds_web_directory VARCHAR(255) default '',
active_voicemail_server VARCHAR(15) default '',
auto_dial_limit VARCHAR(5) default '4',
@@ -1768,6 +1770,8 @@ status VARCHAR(6),
user_group VARCHAR(20),
comments VARCHAR(20),
sub_status VARCHAR(6),
dead_epoch INT(10) UNSIGNED,
dead_sec SMALLINT(5) UNSIGNED default '0',
index (lead_id),
index (user),
index (event_time)
@@ -1912,7 +1916,7 @@ CREATE INDEX phone_number on vicidial_closer_log (phone_number);
CREATE INDEX date_user on vicidial_closer_log (call_date,user);
CREATE INDEX comment_a on live_inbound_log (comment_a);
UPDATE system_settings SET db_schema_version='1171';
UPDATE system_settings SET db_schema_version='1172';
GRANT RELOAD ON *.* TO cron@'%';
GRANT RELOAD ON *.* TO cron@localhost;
+10
View File
@@ -524,3 +524,13 @@ ALTER TABLE vicidial_list_update_log MODIFY phone_number VARCHAR(255);
ALTER TABLE vicidial_list_update_log MODIFY old_status VARCHAR(255);
UPDATE system_settings SET db_schema_version='1171';
ALTER TABLE vicidial_agent_log ADD dead_epoch INT(10) UNSIGNED;
ALTER TABLE vicidial_agent_log ADD dead_sec SMALLINT(5) UNSIGNED default '0';
ALTER TABLE twoday_vicidial_agent_log ADD dead_epoch INT(10) UNSIGNED;
ALTER TABLE twoday_vicidial_agent_log ADD dead_sec SMALLINT(5) UNSIGNED default '0';
ALTER TABLE system_settings MODIFY sounds_web_server VARCHAR(50) default '127.0.0.1';
UPDATE system_settings SET db_schema_version='1172';
@@ -106,8 +106,8 @@ Agent Only Callback Campaign Lock||
This option defines whether AGENTONLY callbacks are locked to the campaign that the agent originally created them under. Setting this to 1 means that the agent can only dial them from the campaign they were set under, 0 means that the agent can access them no matter what campaign they are logged into. Default is 1||
Central Sound Control Active||
This option defines whether the sound synchronization system is active across all servers. Default is 0 for inactive||
Sounds Web Server IP||
This is the IP address of the web server that will be handling the sound files on this system, this must match the server IP of the machine you are trying to access the audio_store.php webpage on or it will not work. Default is 127.0.0.1||
Sounds Web Server||
This is the server name or IP address of the web server that will be handling the sound files on this system, this must match the server name or IP of the machine you are trying to access the audio_store.php webpage on or it will not work. Default is 127.0.0.1||
Sounds Web Directory||
This auto-generated directory name is created at random by the system as the place that the audio store will be kept. All audio files will reside in this directory||
Audio Store||
+49 -6
View File
@@ -46,10 +46,11 @@
# 90408-0020 - Added API vtiger specific callback activity record ability
# 90508-0727 - Changed to PHP long tags
# 90706-1430 - Fixed AGENTDIRECT calls in queue display count
# 90908-1037 - Added DEAD call logging
#
$version = '2.2.0-21';
$build = '90706-1430';
$version = '2.2.0-22';
$build = '90908-1037';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=17;
$one_mysql_log=0;
@@ -195,6 +196,9 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
{
$Acount=0;
$AexternalDEAD=0;
$Aagent_log_id='';
$Acallerid='';
$DEADcustomer=0;
### see if the agent has a record in the vicidial_live_agents table
$stmt="SELECT count(*) from vicidial_live_agents where user='$user' and server_ip='$server_ip';";
@@ -206,12 +210,14 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
if ($Acount > 0)
{
$stmt="SELECT status from vicidial_live_agents where user='$user' and server_ip='$server_ip';";
$stmt="SELECT status,callerid,agent_log_id from vicidial_live_agents where user='$user' and server_ip='$server_ip';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03004',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$Astatus=$row[0];
$Astatus = $row[0];
$Acallerid = $row[1];
$Aagent_log_id = $row[2];
}
# ### find out if external table shows agent should be disabled
# $stmt="SELECT count(*) from another_table where user='$user' and status='DEAD';";
@@ -237,6 +243,43 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
$retry_count++;
}
##### BEGIN DEAD logging section #####
### find whether the call the agent is on is hung up
$stmt="SELECT count(*) from vicidial_auto_calls where callerid='$Acallerid';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03XXX',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$AcalleridCOUNT=$row[0];
if ( ($AcalleridCOUNT < 1) and (eregi("INCALL",$Astatus)) and (strlen($Aagent_log_id) > 0) )
{
$DEADcustomer++;
### find whether the agent log record has already logged DEAD
$stmt="SELECT count(*) from vicidial_agent_log where agent_log_id='$Aagent_log_id' and ( (dead_epoch IS NOT NULL) or (dead_epoch > 10000) );";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03XXX',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$Aagent_log_idCOUNT=$row[0];
if ($Aagent_log_idCOUNT < 1)
{
$NEWdead_epoch = date("U");
$deadNOW_TIME = date("Y-m-d H:i:s");
$stmt="UPDATE vicidial_agent_log set dead_epoch='$NEWdead_epoch' where agent_log_id='$Aagent_log_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03XXX',$user,$server_ip,$session_name,$one_mysql_log);}
$stmt="UPDATE vicidial_live_agents set last_state_change='$deadNOW_TIME' where callerid='$Acallerid';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03XXX',$user,$server_ip,$session_name,$one_mysql_log);}
}
}
##### END DEAD logging section #####
if ($campagentstdisp == 'YES')
{
$ADsql='';
@@ -318,7 +361,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
if (strlen($external_status)<1) {$external_status = '::::::::::';}
$web_epoch = date("U");
$stmt="select UNIX_TIMESTAMP(last_update),UNIX_TIMESTAMP(db_time) from server_updater where server_ip='$server_ip';";
$stmt="SELECT UNIX_TIMESTAMP(last_update),UNIX_TIMESTAMP(db_time) from server_updater where server_ip='$server_ip';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03014',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -417,7 +460,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
if ($Ashift_logout > 0)
{$Alogin='SHIFT_LOGOUT';}
echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Logged-in: ' . $Alogin . '|CampCalls: ' . $RingCalls . '|Status: ' . $Astatus . '|DiaLCalls: ' . $DiaLCalls . '|APIHanguP: ' . $external_hangup . '|APIStatuS: ' . $external_status . '|APIPausE: ' . $external_pause . '|APIDiaL: ' . $external_dial . "|\n";
echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Logged-in: ' . $Alogin . '|CampCalls: ' . $RingCalls . '|Status: ' . $Astatus . '|DiaLCalls: ' . $DiaLCalls . '|APIHanguP: ' . $external_hangup . '|APIStatuS: ' . $external_status . '|APIPausE: ' . $external_pause . '|APIDiaL: ' . $external_dial . '|DEADcall: ' . $DEADcustomer . "\n";
}
$total_conf=0;
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

+12 -4
View File
@@ -209,10 +209,11 @@
# 90729-0637 - Added DiaLableLeaDsCounT
# 90808-0221 - Added last_state_change to vicidial_live_agents
# 90904-1622 - Added timezone sort options for no hopper dialing
# 90908-1037 - Added DEAD call logging
#
$version = '2.2.0-120';
$build = '90904-1622';
$version = '2.2.0-121';
$build = '90908-1037';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=244;
$one_mysql_log=0;
@@ -3026,9 +3027,10 @@ if ($stage == "end")
$talk_sec=0;
$talk_epochSQL='';
$dead_secSQL='';
$lead_id_commentsSQL='';
$StarTtime = date("U");
$stmt = "select talk_epoch,talk_sec,wait_sec,wait_epoch,lead_id,comments from vicidial_agent_log where agent_log_id='$agent_log_id';";
$stmt = "select talk_epoch,talk_sec,wait_sec,wait_epoch,lead_id,comments,dead_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00101',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -3041,6 +3043,12 @@ if ($stage == "end")
$talk_epochSQL=",talk_epoch='$StarTtime'";
$row[0]=$row[3];
}
if ( (!eregi("NULL",$row[6])) and ($row[6] > 1000) )
{
$dead_sec = ($StarTtime - $row[6]);
if ($dead_sec < 0) {$dead_sec=0;}
$dead_secSQL=",dead_sec='$dead_sec'";
}
$talk_sec = (($StarTtime - $row[0]) + $row[1]);
if ( ( ($auto_dial_level < 1) or (preg_match('/^M/',$MDnextCID)) ) and (preg_match('/INBOUND_MAN/',$dial_method)) )
{
@@ -3054,7 +3062,7 @@ if ($stage == "end")
}
}
}
$stmt="UPDATE vicidial_agent_log set talk_sec='$talk_sec',dispo_epoch='$StarTtime' $talk_epochSQL $lead_id_commentsSQL where agent_log_id='$agent_log_id';";
$stmt="UPDATE vicidial_agent_log set talk_sec='$talk_sec',dispo_epoch='$StarTtime' $talk_epochSQL $dead_secSQL $lead_id_commentsSQL where agent_log_id='$agent_log_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00102',$user,$server_ip,$session_name,$one_mysql_log);}
+18 -2
View File
@@ -250,10 +250,11 @@
# 90827-0133 - Reworked Script display code
# 90827-1549 - Added list script override option, original_phone_login variable
# 90831-1456 - Added active_agent_login_server option for servers
# 90908-1038 - Added DEAD call display
#
$version = '2.2.0-227';
$build = '90831-1456';
$version = '2.2.0-228';
$build = '90908-1038';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=61;
$one_mysql_log=0;
@@ -2486,6 +2487,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var TEMP_VDIC_web_form_address = '';
var APIPausE_ID = '99999';
var APIDiaL_ID = '99999';
var CheckDEADcall = 0;
var CheckDEADcallON = 0;
var VtigeRLogiNScripT = '<?php echo $vtiger_screen_login ?>';
var VtigeRurl = '<?php echo $vtiger_url ?>';
var VtigeREnableD = '<?php echo $enable_vtiger_integration ?>';
@@ -2523,6 +2526,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
image_livecall_OFF.src="./images/agc_live_call_OFF.gif";
var image_livecall_ON = new Image();
image_livecall_ON.src="./images/agc_live_call_ON.gif";
var image_livecall_DEAD = new Image();
image_livecall_DEAD.src="./images/agc_live_call_DEAD.gif";
var image_LB_dialnextnumber = new Image();
image_LB_dialnextnumber.src="./images/vdc_LB_dialnextnumber.gif";
var image_LB_hangupcustomer = new Image();
@@ -3146,6 +3151,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var APIPausE = APIPausE_array[1];
var APIDiaL_array = check_time_array[9].split("APIDiaL: ");
var APIDiaL = APIDiaL_array[1];
var CheckDEADcall_array = check_time_array[10].split("DEADcall: ");
var CheckDEADcall = CheckDEADcall_array[1];
if ( (APIHanguP==1) && (VD_live_customer_call==1) )
{
hideDiv('CustomerGoneBox');
@@ -3230,6 +3237,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{NeWManuaLDiaLCalLSubmiT('NOW');}
}
}
if ( (CheckDEADcall > 0) && (VD_live_customer_call==1) )
{
if (CheckDEADcallON < 1)
{
if( document.images ) { document.images['livecall'].src = image_livecall_DEAD.src;}
CheckDEADcallON=1;
}
}
// ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ above section working on API functions
var check_conf_array=check_ALL_array[1].split("|");
@@ -6459,6 +6474,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{var group = campaign;}
leaving_threeway=0;
blind_transfer=0;
CheckDEADcallON=0;
document.vicidial_form.callchannel.value = '';
document.vicidial_form.callserverip.value = '';
document.vicidial_form.xferchannel.value = '';
+27 -8
View File
@@ -19,6 +19,7 @@
# 90508-0644 - Changed to PHP long tags
# 90523-0935 - Rewrite of seconds to minutes and hours conversion
# 90717-1500 - Changed to be multi-campaign, multi-user-group select
# 90908-1058 - Added DEAD time statistics
#
require("dbconnect.php");
@@ -286,7 +287,7 @@ $usersARY[0]='';
$user_namesARY[0]='';
$k=0;
$stmt="select count(*) as calls,sum(talk_sec) as talk,full_name,vicidial_users.user,sum(pause_sec),sum(wait_sec),sum(dispo_sec),status from vicidial_users,vicidial_agent_log where event_time <= '$query_date_END' and event_time >= '$query_date_BEGIN' and vicidial_users.user=vicidial_agent_log.user and pause_sec<36000 and wait_sec<36000 and talk_sec<36000 and dispo_sec<36000 $group_SQL $user_group_SQL group by user,full_name,status order by full_name,user,status desc limit 500000;";
$stmt="select count(*) as calls,sum(talk_sec) as talk,full_name,vicidial_users.user,sum(pause_sec),sum(wait_sec),sum(dispo_sec),status,sum(dead_sec) from vicidial_users,vicidial_agent_log where event_time <= '$query_date_END' and event_time >= '$query_date_BEGIN' and vicidial_users.user=vicidial_agent_log.user and pause_sec<36000 and wait_sec<36000 and talk_sec<36000 and dispo_sec<36000 $group_SQL $user_group_SQL group by user,full_name,status order by full_name,user,status desc limit 500000;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$rows_to_print = mysql_num_rows($rslt);
@@ -304,6 +305,7 @@ while ($i < $rows_to_print)
$wait_sec[$i] = $row[5];
$dispo_sec[$i] = $row[6];
$status[$i] = $row[7];
$dead_sec[$i] = $row[8];
if ( (!eregi("-$status[$i]-", $statuses)) and (strlen($status[$i])>0) )
{
$statusesTXT = sprintf("%8s", $status[$i]);
@@ -325,9 +327,9 @@ while ($i < $rows_to_print)
}
echo "CALL STATS BREAKDOWN:\n";
echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n";
echo "| <a href=\"$LINKbase\">USER NAME</a> | <a href=\"$LINKbase&stage=ID\">ID</a> | <a href=\"$LINKbase&stage=CALLS\">CALLS</a> | <a href=\"$LINKbase&stage=TIME\">TIME</a> | PAUSE |PAUSAVG | WAIT |WAITAVG | TALK |TALKAVG | DISPO |DISPAVG |$statusesHTML\n";
echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n";
echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n";
echo "| <a href=\"$LINKbase\">USER NAME</a> | <a href=\"$LINKbase&stage=ID\">ID</a> | <a href=\"$LINKbase&stage=CALLS\">CALLS</a> | <a href=\"$LINKbase&stage=TIME\">TIME</a> | PAUSE |PAUSAVG | WAIT |WAITAVG | TALK |TALKAVG | DISPO |DISPAVG | DEAD |DEADAVG |$statusesHTML\n";
echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n";
### BEGIN loop through each user ###
@@ -342,6 +344,7 @@ while ($m < $k)
$Spause_sec=0;
$Swait_sec=0;
$Sdispo_sec=0;
$Sdead_sec=0;
$SstatusesHTML='';
### BEGIN loop through each status ###
@@ -361,6 +364,7 @@ while ($m < $k)
$Spause_sec = ($Spause_sec + $pause_sec[$i]);
$Swait_sec = ($Swait_sec + $wait_sec[$i]);
$Sdispo_sec = ($Sdispo_sec + $dispo_sec[$i]);
$Sdead_sec = ($Sdead_sec + $dead_sec[$i]);
$SstatusTXT = sprintf("%8s", $calls[$i]);
$SstatusesHTML .= " $SstatusTXT |";
$status_found++;
@@ -382,6 +386,7 @@ while ($m < $k)
$TOTtotWAIT=($TOTtotWAIT + $Swait_sec);
$TOTtotPAUSE=($TOTtotPAUSE + $Spause_sec);
$TOTtotDISPO=($TOTtotDISPO + $Sdispo_sec);
$TOTtotDEAD=($TOTtotDEAD + $Sdead_sec);
$Stime = ($Stalk_sec + $Spause_sec + $Swait_sec + $Sdispo_sec);
if ( ($Scalls > 0) and ($Stalk_sec > 0) ) {$Stalk_avg = ($Stalk_sec/$Scalls);}
else {$Stalk_avg=0;}
@@ -391,6 +396,8 @@ while ($m < $k)
else {$Swait_avg=0;}
if ( ($Scalls > 0) and ($Sdispo_sec > 0) ) {$Sdispo_avg = ($Sdispo_sec/$Scalls);}
else {$Sdispo_avg=0;}
if ( ($Scalls > 0) and ($Sdead_sec > 0) ) {$Sdead_avg = ($Sdead_sec/$Scalls);}
else {$Sdead_avg=0;}
$RAWuser = $Suser;
$RAWcalls = $Scalls;
@@ -420,6 +427,8 @@ while ($m < $k)
$USERavgWAIT_MS = sec_convert($Swait_avg,'M');
$USERtotDISPO_MS = sec_convert($Sdispo_sec,'H');
$USERavgDISPO_MS = sec_convert($Sdispo_avg,'M');
$USERtotDEAD_MS = sec_convert($Sdead_sec,'H');
$USERavgDEAD_MS = sec_convert($Sdead_avg,'M');
$pfUSERtime_MS = sprintf("%9s", $pfUSERtime_MS);
$pfUSERtotTALK_MS = sprintf("%8s", $pfUSERtotTALK_MS);
@@ -430,9 +439,11 @@ while ($m < $k)
$pfUSERavgWAIT_MS = sprintf("%6s", $USERavgWAIT_MS);
$pfUSERtotDISPO_MS = sprintf("%8s", $USERtotDISPO_MS);
$pfUSERavgDISPO_MS = sprintf("%6s", $USERavgDISPO_MS);
$pfUSERtotDEAD_MS = sprintf("%8s", $USERtotDEAD_MS);
$pfUSERavgDEAD_MS = sprintf("%6s", $USERavgDEAD_MS);
$PAUSEtotal[$m] = $pfUSERtotPAUSE_MS;
$Toutput = "| $Sfull_name | <a href=\"./user_stats.php?user=$RAWuser\">$Suser</a> | $Scalls | $pfUSERtime_MS | $pfUSERtotPAUSE_MS | $pfUSERavgPAUSE_MS | $pfUSERtotWAIT_MS | $pfUSERavgWAIT_MS | $pfUSERtotTALK_MS | $pfUSERavgTALK_MS | $pfUSERtotDISPO_MS | $pfUSERavgDISPO_MS |$SstatusesHTML\n";
$Toutput = "| $Sfull_name | <a href=\"./user_stats.php?user=$RAWuser\">$Suser</a> | $Scalls | $pfUSERtime_MS | $pfUSERtotPAUSE_MS | $pfUSERavgPAUSE_MS | $pfUSERtotWAIT_MS | $pfUSERavgWAIT_MS | $pfUSERtotTALK_MS | $pfUSERavgTALK_MS | $pfUSERtotDISPO_MS | $pfUSERavgDISPO_MS | $pfUSERtotDEAD_MS | $pfUSERavgDEAD_MS |$SstatusesHTML\n";
$TOPsorted_output[$m] = $Toutput;
@@ -514,6 +525,8 @@ if ($TOTtotTALK < 1) {$TOTavgTALK = '0';}
else {$TOTavgTALK = ($TOTtotTALK / $TOTcalls);}
if ($TOTtotDISPO < 1) {$TOTavgDISPO = '0';}
else {$TOTavgDISPO = ($TOTtotDISPO / $TOTcalls);}
if ($TOTtotDEAD < 1) {$TOTavgDEAD = '0';}
else {$TOTavgDEAD = ($TOTtotDEAD / $TOTcalls);}
if ($TOTtotPAUSE < 1) {$TOTavgPAUSE = '0';}
else {$TOTavgPAUSE = ($TOTtotPAUSE / $TOTcalls);}
if ($TOTtotWAIT < 1) {$TOTavgWAIT = '0';}
@@ -522,37 +535,43 @@ else {$TOTavgWAIT = ($TOTtotWAIT / $TOTcalls);}
$TOTtime_MS = sec_convert($TOTtime,'H');
$TOTtotTALK_MS = sec_convert($TOTtotTALK,'H');
$TOTtotDISPO_MS = sec_convert($TOTtotDISPO,'H');
$TOTtotDEAD_MS = sec_convert($TOTtotDEAD,'H');
$TOTtotPAUSE_MS = sec_convert($TOTtotPAUSE,'H');
$TOTtotWAIT_MS = sec_convert($TOTtotWAIT,'H');
$TOTavgTALK_MS = sec_convert($TOTavgTALK,'M');
$TOTavgDISPO_MS = sec_convert($TOTavgDISPO,'H');
$TOTavgDEAD_MS = sec_convert($TOTavgDEAD,'H');
$TOTavgPAUSE_MS = sec_convert($TOTavgPAUSE,'H');
$TOTavgWAIT_MS = sec_convert($TOTavgWAIT,'H');
$TOTtime_MS = sprintf("%10s", $TOTtime_MS);
$TOTtotTALK_MS = sprintf("%10s", $TOTtotTALK_MS);
$TOTtotDISPO_MS = sprintf("%10s", $TOTtotDISPO_MS);
$TOTtotDEAD_MS = sprintf("%10s", $TOTtotDEAD_MS);
$TOTtotPAUSE_MS = sprintf("%10s", $TOTtotPAUSE_MS);
$TOTtotWAIT_MS = sprintf("%10s", $TOTtotWAIT_MS);
$TOTavgTALK_MS = sprintf("%6s", $TOTavgTALK_MS);
$TOTavgDISPO_MS = sprintf("%6s", $TOTavgDISPO_MS);
$TOTavgDEAD_MS = sprintf("%6s", $TOTavgDEAD_MS);
$TOTavgPAUSE_MS = sprintf("%6s", $TOTavgPAUSE_MS);
$TOTavgWAIT_MS = sprintf("%6s", $TOTavgWAIT_MS);
while(strlen($TOTtime_MS)>10) {$TOTtime_MS = substr("$TOTtime_MS", 0, -1);}
while(strlen($TOTtotTALK_MS)>10) {$TOTtotTALK_MS = substr("$TOTtotTALK_MS", 0, -1);}
while(strlen($TOTtotDISPO_MS)>10) {$TOTtotDISPO_MS = substr("$TOTtotDISPO_MS", 0, -1);}
while(strlen($TOTtotDEAD_MS)>10) {$TOTtotDEAD_MS = substr("$TOTtotDEAD_MS", 0, -1);}
while(strlen($TOTtotPAUSE_MS)>10) {$TOTtotPAUSE_MS = substr("$TOTtotPAUSE_MS", 0, -1);}
while(strlen($TOTtotWAIT_MS)>10) {$TOTtotWAIT_MS = substr("$TOTtotWAIT_MS", 0, -1);}
while(strlen($TOTavgTALK_MS)>6) {$TOTavgTALK_MS = substr("$TOTavgTALK_MS", 0, -1);}
while(strlen($TOTavgDISPO_MS)>6) {$TOTavgDISPO_MS = substr("$TOTavgDISPO_MS", 0, -1);}
while(strlen($TOTavgDEAD_MS)>6) {$TOTavgDEAD_MS = substr("$TOTavgDEAD_MS", 0, -1);}
while(strlen($TOTavgPAUSE_MS)>6) {$TOTavgPAUSE_MS = substr("$TOTavgPAUSE_MS", 0, -1);}
while(strlen($TOTavgWAIT_MS)>6) {$TOTavgWAIT_MS = substr("$TOTavgWAIT_MS", 0, -1);}
echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n";
echo "| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls| $TOTtime_MS|$TOTtotPAUSE_MS| $TOTavgPAUSE_MS |$TOTtotWAIT_MS| $TOTavgWAIT_MS |$TOTtotTALK_MS| $TOTavgTALK_MS |$TOTtotDISPO_MS| $TOTavgDISPO_MS |$SUMstatusesHTML\n";
echo "+----------------------------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n";
echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n";
echo "| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls| $TOTtime_MS|$TOTtotPAUSE_MS| $TOTavgPAUSE_MS |$TOTtotWAIT_MS| $TOTavgWAIT_MS |$TOTtotTALK_MS| $TOTavgTALK_MS |$TOTtotDISPO_MS| $TOTavgDISPO_MS |$TOTtotDEAD_MS| $TOTavgDEAD_MS |$SUMstatusesHTML\n";
echo "+-----------------+----------+--------+-----------+----------+--------+----------+--------+----------+--------+----------+--------+----------+--------+$statusesHEAD\n";
echo "\n\n";
+23 -13
View File
@@ -8,9 +8,9 @@
#
# CHANGES
# 90522-0723 - First build
# 90908-1103 - Added DEAD time stats
#
require("dbconnect.php");
require("functions.php");
@@ -326,7 +326,7 @@ else
##### BEGIN Gather all agent time records and parse through them in PHP to save on DB load
$stmt="select user,wait_sec,talk_sec,dispo_sec,pause_sec,lead_id,status from vicidial_agent_log where event_time <= '$query_date_END' and event_time >= '$query_date_BEGIN' $group_SQL $user_group_SQL limit 10000000;";
$stmt="select user,wait_sec,talk_sec,dispo_sec,pause_sec,lead_id,status,dead_sec from vicidial_agent_log where event_time <= '$query_date_END' and event_time >= '$query_date_BEGIN' $group_SQL $user_group_SQL limit 10000000;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$rows_to_print = mysql_num_rows($rslt);
@@ -344,15 +344,18 @@ else
$pause = $row[4];
$lead = $row[5];
$status = $row[6];
$dead = $row[7];
if ($wait > 30000) {$wait=0;}
if ($talk > 30000) {$talk=0;}
if ($dispo > 30000) {$dispo=0;}
if ($pause > 30000) {$pause=0;}
if ($dead > 30000) {$dead=0;}
$TOTwait = ($TOTwait + $wait);
$TOTtalk = ($TOTtalk + $talk);
$TOTdispo = ($TOTdispo + $dispo);
$TOTpause = ($TOTpause + $pause);
$TOTdead = ($TOTdead + $dead);
$TOTALtime = ($TOTALtime + $pause + $dispo + $talk + $wait);
if ( ($lead > 0) and ((!eregi("NULL",$status)) and (strlen($status) > 0)) ) {$TOTcalls++;}
@@ -373,6 +376,7 @@ else
$Stalk[$m] = ($Stalk[$m] + $talk);
$Sdispo[$m] = ($Sdispo[$m] + $dispo);
$Spause[$m] = ($Spause[$m] + $pause);
$Sdead[$m] = ($Sdead[$m] + $dead);
if ( ($lead > 0) and ((!eregi("NULL",$status)) and (strlen($status) > 0)) ) {$Scalls[$m]++;}
}
$m++;
@@ -385,6 +389,7 @@ else
$Stalk[$uc] = $talk;
$Sdispo[$uc] = $dispo;
$Spause[$uc] = $pause;
$Sdead[$uc] = $dead;
if ($lead > 0) {$Scalls[$uc]++;}
$uc++;
}
@@ -405,13 +410,13 @@ else
if ($file_download < 1)
{
echo "AGENT TIME BREAKDOWN:\n";
echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n";
echo "| <a href=\"$LINKbase&stage=NAME\">USER NAME</a> | <a href=\"$LINKbase&stage=ID\">ID</a> | <a href=\"$LINKbase&stage=CALLS\">CALLS</a> | <a href=\"$LINKbase&stage=TCLOCK\">TIME CLOCK</a> | <a href=\"$LINKbase&stage=TIME\">AGENT TIME</a> | WAIT | TALK | DISPO | PAUSE | |$sub_statusesHTML\n";
echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n";
echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n";
echo "| <a href=\"$LINKbase&stage=NAME\">USER NAME</a> | <a href=\"$LINKbase&stage=ID\">ID</a> | <a href=\"$LINKbase&stage=CALLS\">CALLS</a> | <a href=\"$LINKbase&stage=TCLOCK\">TIME CLOCK</a> | <a href=\"$LINKbase&stage=TIME\">AGENT TIME</a> | WAIT | TALK | DISPO | PAUSE | DEAD | |$sub_statusesHTML\n";
echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n";
}
else
{
$file_output .= "USER,ID,CALLS,TIME CLOCK,AGENT TIME,WAIT,TALK,DISPO,PAUSE$sub_statusesFILE\n";
$file_output .= "USER,ID,CALLS,TIME CLOCK,AGENT TIME,WAIT,TALK,DISPO,PAUSE,DEAD$sub_statusesFILE\n";
}
##### END print the output to screen or put into file output variable
@@ -439,6 +444,7 @@ else
$Stalk[$m]= sec_convert($Stalk[$m],'H');
$Sdispo[$m]= sec_convert($Sdispo[$m],'H');
$Spause[$m]= sec_convert($Spause[$m],'H');
$Sdead[$m]= sec_convert($Sdead[$m],'H');
$Stime[$m]= sec_convert($Stime[$m],'H');
$RAWtime = $Stime[$m];
@@ -446,6 +452,7 @@ else
$RAWtalk = $Stalk[$m];
$RAWdispo = $Sdispo[$m];
$RAWpause = $Spause[$m];
$RAWdead = $Sdead[$m];
$n=0;
$user_name_found=0;
@@ -539,6 +546,7 @@ else
$Stalk[$m]= sprintf("%10s", $Stalk[$m]);
$Sdispo[$m]= sprintf("%10s", $Sdispo[$m]);
$Spause[$m]= sprintf("%10s", $Spause[$m]);
$Sdead[$m]= sprintf("%10s", $Sdead[$m]);
$Scalls[$m]= sprintf("%8s", $Scalls[$m]);
$Stime[$m]= sprintf("%10s", $Stime[$m]);
@@ -560,11 +568,11 @@ else
if ($file_download < 1)
{
$Toutput = "| $Sname[$m] | <a href=\"./user_stats.php?user=$RAWuser\">$Suser[$m]</a> | $Scalls[$m] | $StimeTC[$m]$TCuserAUTOLOGOUT| $Stime[$m] | $Swait[$m] | $Stalk[$m] | $Sdispo[$m] | $Spause[$m] | |$SstatusesHTML\n";
$Toutput = "| $Sname[$m] | <a href=\"./user_stats.php?user=$RAWuser\">$Suser[$m]</a> | $Scalls[$m] | $StimeTC[$m]$TCuserAUTOLOGOUT| $Stime[$m] | $Swait[$m] | $Stalk[$m] | $Sdispo[$m] | $Spause[$m] | $Sdead[$m] | |$SstatusesHTML\n";
}
else
{
$fileToutput = "$RAWname,$RAWuser,$RAWcalls,$RAWtimeTC,$RAWtime,$RAWwait,$RAWtalk,$RAWdispo,$RAWpause$SstatusesFILE\n";
$fileToutput = "$RAWname,$RAWuser,$RAWcalls,$RAWtimeTC,$RAWtime,$RAWwait,$RAWtalk,$RAWdispo,$RAWpause,$RAWdead$SstatusesFILE\n";
}
$TOPsorted_output[$m] = $Toutput;
@@ -612,7 +620,7 @@ else
$TOT_AGENTS = sprintf("%4s", $m);
$k=$m;
if ($DB) {echo "Done analyzing... $TOTwait|$TOTtalk|$TOTdispo|$TOTpause|$TOTALtime|$TOTcalls|$uc|<BR>\n";}
if ($DB) {echo "Done analyzing... $TOTwait|$TOTtalk|$TOTdispo|$TOTpause|$TOTdead|$TOTALtime|$TOTcalls|$uc|<BR>\n";}
### BEGIN sort through output to display properly ###
@@ -695,6 +703,7 @@ else
$TOTtalk = sec_convert($TOTtalk,'H');
$TOTdispo = sec_convert($TOTdispo,'H');
$TOTpause = sec_convert($TOTpause,'H');
$TOTdead = sec_convert($TOTdead,'H');
$TOTALtime = sec_convert($TOTALtime,'H');
$TOTtimeTC = sec_convert($TOTtimeTC,'H');
@@ -703,6 +712,7 @@ else
$TOTtalk = sprintf("%11s", $TOTtalk);
$TOTdispo = sprintf("%11s", $TOTdispo);
$TOTpause = sprintf("%11s", $TOTpause);
$TOTdead = sprintf("%11s", $TOTdead);
$TOTALtime = sprintf("%11s", $TOTALtime);
$TOTtimeTC = sprintf("%11s", $TOTtimeTC);
###### END LAST LINE TOTALS FORMATTING ##########
@@ -711,16 +721,16 @@ else
if ($file_download < 1)
{
echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n";
echo "| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls |$TOTtimeTC |$TOTALtime |$TOTwait |$TOTtalk |$TOTdispo |$TOTpause | |$SUMstatusesHTML\n";
echo "+----------------------------+----------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n";
echo "+-----------------+----------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n";
echo "| TOTALS AGENTS:$TOT_AGENTS | $TOTcalls |$TOTtimeTC |$TOTALtime |$TOTwait |$TOTtalk |$TOTdispo |$TOTpause |$TOTdead | |$SUMstatusesHTML\n";
echo "+----------------------------+----------+------------+------------+------------+------------+------------+------------+------------+ +$sub_statusesHEAD\n";
if ($AUTOLOGOUTflag > 0)
{echo " * denotes AUTOLOGOUT from timeclock\n";}
echo "\n\n</PRE>";
}
else
{
$file_output .= "TOTALS,$TOT_AGENTS,$TOTcalls,$TOTtimeTC,$TOTALtime,$TOTwait,$TOTtalk,$TOTdispo,$TOTpause$SUMstatusesFILE\n";
$file_output .= "TOTALS,$TOT_AGENTS,$TOTcalls,$TOTtimeTC,$TOTALtime,$TOTwait,$TOTtalk,$TOTdispo,$TOTpause,$TOTdead$SUMstatusesFILE\n";
}
}
+2
View File
@@ -1600,6 +1600,8 @@ $calls_to_list = mysql_num_rows($rslt);
{
if (!ereg("$Acallerid[$i]\|",$callerids))
{
$Acall_time[$i]=$Astate_change[$i];
$Astatus[$i] = 'DEAD';
$Lstatus = 'DEAD';
$status = ' DEAD ';
+66 -5
View File
@@ -1428,7 +1428,6 @@ if ($non_latin < 1)
$computer_ip = ereg_replace("[^\.0-9]","",$computer_ip);
$queuemetrics_server_ip = ereg_replace("[^\.0-9]","",$queuemetrics_server_ip);
$vtiger_server_ip = ereg_replace("[^\.0-9]","",$vtiger_server_ip);
$sounds_web_server = ereg_replace("[^\.0-9]","",$sounds_web_server);
$active_voicemail_server = ereg_replace("[^\.0-9]","",$active_voicemail_server);
$auto_dial_limit = ereg_replace("[^\.0-9]","",$auto_dial_limit);
$adaptive_dropped_percentage = ereg_replace("[^\.0-9]","",$adaptive_dropped_percentage);
@@ -1583,6 +1582,8 @@ if ($non_latin < 1)
$logins_list = ereg_replace("[^-\,\_0-9a-zA-Z]","",$logins_list);
$forced_timeclock_login = ereg_replace("[^-\,\_0-9a-zA-Z]","",$forced_timeclock_login);
### ALPHA-NUMERIC and dots
$sounds_web_server = ereg_replace("[^\.0-9a-zA-Z]","",$sounds_web_server);
### ALPHA-NUMERIC and spaces
$lead_order = ereg_replace("[^ 0-9a-zA-Z]","",$lead_order);
### ALPHA-NUMERIC and hash
@@ -1939,11 +1940,12 @@ else
# 90827-1552 - Added agent_script_override option for lists
# 90830-2217 - Added Music On Hold section
# 90904-1536 - Added moh chooser option, timezone list ordering
# 90908-1207 - Added cross-listing linking for DIDs, CallMenus and In-groups
#
# make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time
$admin_version = '2.2.0-214';
$build = '90904-1536';
$admin_version = '2.2.0-215';
$build = '90908-1207';
$STARTtime = date("U");
$SQLdate = date("Y-m-d H:i:s");
@@ -5615,7 +5617,7 @@ FR_SPAC 00 00 00 00 00 - France space separated phone number<BR>
<BR>
<A NAME="settings-sounds_web_server">
<BR>
<B>Sounds Web Server IP -</B> This is the IP address of the web server that will be handling the sound files on this system, this must match the server IP of the machine you are trying to access the audio_store.php webpage on or it will not work. Default is 127.0.0.1.
<B>Sounds Web Server -</B> This is the server name or IP address of the web server that will be handling the sound files on this system, this must match the server name or IP of the machine you are trying to access the audio_store.php webpage on or it will not work. Default is 127.0.0.1.
<BR>
<A NAME="settings-sounds_web_directory">
@@ -18887,6 +18889,36 @@ if ($ADD==3111)
echo "<center><b>\n";
echo "<B>DIDS USING THIS IN-GROUP:</B><BR>\n";
echo "<TABLE>\n";
$stmt="SELECT did_id,did_pattern,did_description from vicidial_inbound_dids where group_id='$group_id' and did_route='IN_GROUP';";
$rslt=mysql_query($stmt, $link);
$dids_to_print = mysql_num_rows($rslt);
$o=0;
while ($dids_to_print > $o) {
$row=mysql_fetch_row($rslt);
echo "<TR><TD><a href=\"$PHP_SELF?ADD=3311&did_id=$row[0]\">$row[1] </a></TD><TD> $row[2]<BR></TD></TR>\n";
$o++;
}
echo "</TABLE><BR>\n";
echo "<B>CALL MENUS USING THIS IN-GROUP:</B><BR>\n";
echo "<TABLE>\n";
$stmt="SELECT distinct vm.menu_id,menu_name from vicidial_call_menu vm,vicidial_call_menu_options vmo where vm.menu_id=vmo.menu_id and option_route='INGROUP' and option_route_value='$group_id';";
$rslt=mysql_query($stmt, $link);
$cms_to_print = mysql_num_rows($rslt);
$o=0;
while ($cms_to_print > $o) {
$row=mysql_fetch_row($rslt);
echo "<TR><TD><a href=\"$PHP_SELF?ADD=3511&menu_id=$row[0]\">$row[0] </a></TD><TD> $row[1]<BR></TD></TR>\n";
$o++;
}
echo "</TABLE>\n";
if ($LOGdelete_ingroups > 0)
{
echo "<br><br><a href=\"$PHP_SELF?ADD=53&campaign_id=$group_id&stage=IN\">EMERGENCY VDAC CLEAR FOR THIS IN-GROUP</a><BR><BR>\n";
@@ -19334,6 +19366,35 @@ if ($ADD==3511)
echo "</table>\n";
echo "<BR></center></FORM><br>\n";
echo "<B>DIDS USING THIS CALL MENU:</B><BR>\n";
echo "<TABLE>\n";
$stmt="SELECT did_id,did_pattern,did_description from vicidial_inbound_dids where menu_id='$menu_id' and did_route='CALLMENU';";
$rslt=mysql_query($stmt, $link);
$dids_to_print = mysql_num_rows($rslt);
$o=0;
while ($dids_to_print > $o) {
$row=mysql_fetch_row($rslt);
echo "<TR><TD><a href=\"$PHP_SELF?ADD=3311&did_id=$row[0]\">$row[1] </a></TD><TD> $row[2]<BR></TD></TR>\n";
$o++;
}
echo "</TABLE><BR>\n";
echo "<B>CALL MENUS USING THIS CALL MENU:</B><BR>\n";
echo "<TABLE>\n";
$stmt="SELECT distinct vm.menu_id,menu_name from vicidial_call_menu vm,vicidial_call_menu_options vmo where vm.menu_id=vmo.menu_id and option_route='CALLMENU' and option_route_value='$menu_id';";
$rslt=mysql_query($stmt, $link);
$cms_to_print = mysql_num_rows($rslt);
$o=0;
while ($cms_to_print > $o) {
$row=mysql_fetch_row($rslt);
echo "<TR><TD><a href=\"$PHP_SELF?ADD=3511&menu_id=$row[0]\">$row[0] </a></TD><TD> $row[1]<BR></TD></TR>\n";
$o++;
}
echo "</TABLE>\n";
if ($LOGdelete_dids > 0)
@@ -21249,7 +21310,7 @@ if ($ADD==311111111111111)
echo "<tr bgcolor=#B6D3FC><td align=right>Agent Only Callback Campaign Lock: </td><td align=left><select size=1 name=agentonly_callback_campaign_lock><option>1</option><option>0</option><option selected>$agentonly_callback_campaign_lock</option></select>$NWB#settings-agentonly_callback_campaign_lock$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Central Sound Control Active: </td><td align=left><select size=1 name=sounds_central_control_active><option>1</option><option>0</option><option selected>$sounds_central_control_active</option></select>$NWB#settings-sounds_central_control_active$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Sounds Web Server IP: </td><td align=left><input type=text name=sounds_web_server size=18 maxlength=15 value=\"$sounds_web_server\">$NWB#settings-sounds_web_server$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Sounds Web Server: </td><td align=left><input type=text name=sounds_web_server size=30 maxlength=50 value=\"$sounds_web_server\">$NWB#settings-sounds_web_server$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Sounds Web Directory: </td><td align=left><a href=\"http://$sounds_web_server/$sounds_web_directory\">$sounds_web_directory</a> $NWB#settings-sounds_web_directory$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Active Voicemail Server: </td><td align=left><select size=1 name=active_voicemail_server>\n";
+3 -2
View File
@@ -17,6 +17,7 @@ $MT[0]='';
require("dbconnect.php");
$server_name = getenv("SERVER_NAME");
$PHP_SELF=$_SERVER['PHP_SELF'];
$audiofile=$_FILES["audiofile"];
$AF_orig = $_FILES['audiofile']['name'];
@@ -62,9 +63,9 @@ if ($ss_conf_ct > 0)
### check if sounds server matches this server IP, if not then exit with an error
if ( ( (strlen($sounds_web_server)) != (strlen($WEBserver_ip)) ) or (!eregi("$sounds_web_server",$WEBserver_ip) ) )
if ( ( (strlen($sounds_web_server)) != (strlen($server_name)) ) or (!eregi("$sounds_web_server",$server_name) ) )
{
echo "ERROR: server_ip($WEBserver_ip) does not match sounds web server ip($sounds_web_server)\n";
echo "ERROR: server($server_name) does not match sounds web server ip($sounds_web_server)\n";
exit;
}