Added experimental Agent Whisper Monitoring from the Real-time Report. Must be enabled in System Settings. Issue #840

git-svn-id: svn://192.168.202.10@2365 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2015-08-04 15:38:38 +00:00
parent 603e615556
commit adaf80312b
10 changed files with 274 additions and 25 deletions
+3
View File
@@ -123,6 +123,9 @@ OTHER CHANGES:
24. Added option to User Status report to only show call logs with a specified
call status.
25. Added experimental Agent Whisper Monitoring from the Real-time Report.
Must be enabled in System Settings.
+170
View File
@@ -0,0 +1,170 @@
#!/usr/bin/perl
# getAGENTchannel.agi by Omar Rodriguez www.ItContinental.com
# Copyright (C) 2015 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# This script is able to return the name of the channel that belongs to the agent,
# to allow administrators to whisper to the agents
# Has been made using Vicidial code as Base
# CHANGELOG:
# 150728-1315 - First build
# 150804-0944 - Rewritten to work on multi-server systems and with different dialplan
#
$script = 'getAGENTchannel.agi';
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
$year = ($year + 1900);
$mon++;
if ($mon < 10) {$mon = "0$mon";}
if ($mday < 10) {$mday = "0$mday";}
if ($hour < 10) {$hour = "0$hour";}
if ($min < 10) {$min = "0$min";}
if ($sec < 10) {$sec = "0$sec";}
# default path to astguiclient configuration file:
$PATHconf = '/etc/astguiclient.conf';
open(conf, "$PATHconf") || die "can't open $PATHconf: $!\n";
@conf = <conf>;
close(conf);
$i=0;
foreach(@conf)
{
$line = $conf[$i];
$line =~ s/ |>|\n|\r|\t|\#.*|;.*//gi;
if ( ($line =~ /^PATHhome/) && ($CLIhome < 1) )
{$PATHhome = $line; $PATHhome =~ s/.*=//gi;}
if ( ($line =~ /^PATHlogs/) && ($CLIlogs < 1) )
{$PATHlogs = $line; $PATHlogs =~ s/.*=//gi;}
if ( ($line =~ /^PATHagi/) && ($CLIagi < 1) )
{$PATHagi = $line; $PATHagi =~ s/.*=//gi;}
if ( ($line =~ /^PATHweb/) && ($CLIweb < 1) )
{$PATHweb = $line; $PATHweb =~ s/.*=//gi;}
if ( ($line =~ /^PATHsounds/) && ($CLIsounds < 1) )
{$PATHsounds = $line; $PATHsounds =~ s/.*=//gi;}
if ( ($line =~ /^PATHmonitor/) && ($CLImonitor < 1) )
{$PATHmonitor = $line; $PATHmonitor =~ s/.*=//gi;}
if ( ($line =~ /^VARserver_ip/) && ($CLIserver_ip < 1) )
{$VARserver_ip = $line; $VARserver_ip =~ s/.*=//gi;}
if ( ($line =~ /^VARDB_server/) && ($CLIDB_server < 1) )
{$VARDB_server = $line; $VARDB_server =~ s/.*=//gi;}
if ( ($line =~ /^VARDB_database/) && ($CLIDB_database < 1) )
{$VARDB_database = $line; $VARDB_database =~ s/.*=//gi;}
if ( ($line =~ /^VARDB_user/) && ($CLIDB_user < 1) )
{$VARDB_user = $line; $VARDB_user =~ s/.*=//gi;}
if ( ($line =~ /^VARDB_pass/) && ($CLIDB_pass < 1) )
{$VARDB_pass = $line; $VARDB_pass =~ s/.*=//gi;}
if ( ($line =~ /^VARDB_port/) && ($CLIDB_port < 1) )
{$VARDB_port = $line; $VARDB_port =~ s/.*=//gi;}
$i++;
}
if (!$VARDB_port) {$VARDB_port='3306';}
if (!$AGILOGfile) {$AGILOGfile = "$PATHlogs/agiout.$year-$mon-$mday";}
use DBI;
use Time::HiRes ('gettimeofday','usleep','sleep'); # necessary to have perl sleep command of less than one second
use Asterisk::AGI;
$AGI = new Asterisk::AGI;
$dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VARDB_user", "$VARDB_pass")
or die "Couldn't connect to database: " . DBI->errstr;
### Grab Server values from the database
$stmtA = "SELECT agi_output,local_gmt FROM servers where server_ip = '$VARserver_ip';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
if ($sthArows > 0)
{
$AGILOG = '0';
@aryA = $sthA->fetchrow_array;
$DBagi_output = $aryA[0];
$local_gmt = $aryA[1];
if ($DBagi_output =~ /STDERR/) {$AGILOG = '1';}
if ($DBagi_output =~ /FILE/) {$AGILOG = '2';}
if ($DBagi_output =~ /BOTH/) {$AGILOG = '3';}
}
$sthA->finish();
$agent_zap_channel = "101";
########## FIND playfilename ##########
$|=1;
while(<STDIN>)
{
chomp;
last unless length($_);
if ($AGILOG)
{
if (/^agi_(\w+)\:\s+(.*)$/)
{
$AGI{$1} = $2;
}
}
if (/^agi_uniqueid\:\s+(.*)$/) {$unique_id = $1; $uniqueid = $unique_id;}
if (/^agi_channel\:\s+(.*)$/) {$channel = $1;}
if (/^agi_extension\:\s+(.*)$/) {$extension = $1;}
if (/^agi_type\:\s+(.*)$/) {$type = $1;}
if (/^agi_callerid\:\s+(.*)$/) {$callerid = $1;}
if (/^agi_calleridname\:\s+(.*)$/) {$calleridname = $1;}
}
if (length($extension) > 7)
{$extension = substr($extension, -7);}
if ($AGILOG) {$agi_string = "Agent session: $extension| Channel: $channel| CID: $calleridname <$callerid>|"; &agi_output;}
#$stmtA = "SELECT channel FROM vicidial_live_agents WHERE conf_exten = '$canal' AND ifnull(trim(channel), '') <> '' and (channel in (select channel from live_channels) or comments='MANUAL') LIMIT 1";
$stmtA = "SELECT channel FROM live_sip_channels WHERE server_ip='$VARserver_ip' AND extension=right('$extension',7) AND ifnull(trim(channel), '') <> '' limit 1;";
#$AGI->verbose($stmtA);
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$agent_zap_channel = $aryA[0];
$sthA->finish();
}
else
{
$agent_zap_channel = "101";
}
if ($AGILOG) {$agi_string = "$sthArows|$agent_zap_channel|$stmtA|"; &agi_output;}
#$AGI->verbose("agent_zap_channel: $agent_zap_channel");
$AGI->set_variable('agent_zap_channel', $agent_zap_channel);
exit;
sub agi_output
{
($Lsec,$Lmin,$Lhour,$Lmday,$Lmon,$Lyear,$Lwday,$Lyday,$Lisdst) = localtime(time);
if ($Lhour < 10) {$Lhour = "0$Lhour";}
if ($Lmin < 10) {$Lmin = "0$Lmin";}
if ($Lsec < 10) {$Lsec = "0$Lsec";}
$LOGtime = "$Lhour:$Lmin:$Lsec";
if ($AGILOG >=2)
{
### open the log file for writing ###
open(Lout, ">>$AGILOGfile")
|| die "Can't open $AGILOGfile: $!\n";
print Lout "$LOGtime|$LOGtime|$script|$agi_string\n";
close(Lout);
}
### send to STDERR writing ###
if ( ($AGILOG == '1') || ($AGILOG == '3') )
{print STDERR "$LOGtime|$LOGtime|$script|$agi_string\n";}
$agi_string='';
}
+18 -1
View File
@@ -100,9 +100,10 @@
# 150112-2018 - Added flag to delete voicemail greeting when changed from an audio file to empty
# 150307-1738 - Added custom meetme enter sounds(only works with Asterisk 1.8)
# 150724-0835 - Added purge of vicidial_ajax_log records older than 7 days to end of day process
# 150804-0919 - Added whisper extensions
#
$build = '150724-0835';
$build = '150804-0919';
$DB=0; # Debug flag
@@ -1766,6 +1767,14 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
$Lext .= "exten => 473782138521111,1,Answer\n";
$Lext .= "exten => 473782138521111,n,Wait(5)\n";
$Lext .= "exten => 473782138521111,n,Hangup()\n";
$Lext .= "; Whisper to agent meetme entry\n";
$Lext .= "exten => _473782188600XXX,1,Answer\n";
$Lext .= "exten => _473782188600XXX,n,Wait(1)\n";
$Lext .= "exten => _473782188600XXX,n,AGI(getAGENTchannel.agi)\n";
$Lext .= "exten => _473782188600XXX,n,NoOp(\${agent_zap_channel})\n";
$Lext .= "exten => _473782188600XXX,n,GotoIf(\$[ \"\${agent_zap_channel}\" = \"101\" ]?fin)\n";
$Lext .= "exten => _473782188600XXX,n,ChanSpy(\${agent_zap_channel},qw)\n";
$Lext .= "exten => _473782188600XXX,n(fin),Hangup()\n";
}
else
{
@@ -1787,6 +1796,14 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
$Lext .= "exten => 473782138521111,1,Answer\n";
$Lext .= "exten => 473782138521111,n,Wait(5)\n";
$Lext .= "exten => 473782138521111,n,Hangup()\n";
$Lext .= "; Whisper to agent meetme entry\n";
$Lext .= "exten => _473782188600XXX,1,Answer\n";
$Lext .= "exten => _473782188600XXX,n,Wait(1)\n";
$Lext .= "exten => _473782188600XXX,n,AGI(getAGENTchannel.agi)\n";
$Lext .= "exten => _473782188600XXX,n,NoOp(\${agent_zap_channel})\n";
$Lext .= "exten => _473782188600XXX,n,GotoIf(\$[ \"\${agent_zap_channel}\" = \"101\" ]?fin)\n";
$Lext .= "exten => _473782188600XXX,n,ChanSpy(\${agent_zap_channel},qw)\n";
$Lext .= "exten => _473782188600XXX,n(fin),Hangup()\n";
}
$Liax .= "\n";
+3 -2
View File
@@ -1602,7 +1602,8 @@ enable_third_webform ENUM('0','1') default '0',
chat_url VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL,
chat_timeout INT(3) unsigned DEFAULT NULL,
agent_debug_logging VARCHAR(20) default '0',
default_language VARCHAR(100) default 'default English'
default_language VARCHAR(100) default 'default English',
agent_whisper_enabled ENUM('0','1') default '0'
) ENGINE=MyISAM;
CREATE TABLE vicidial_campaigns_list_mix (
@@ -3546,4 +3547,4 @@ UPDATE vicidial_configuration set value='1766' where name='qc_database_version';
UPDATE system_settings set vdc_agent_api_active='1';
UPDATE system_settings SET db_schema_version='1424',db_schema_update_date=NOW(),reload_timestamp=NOW();
UPDATE system_settings SET db_schema_version='1425',db_schema_update_date=NOW(),reload_timestamp=NOW();
+6
View File
@@ -247,3 +247,9 @@ UPDATE system_settings SET db_schema_version='1423',db_schema_update_date=NOW()
ALTER TABLE vicidial_campaigns MODIFY lead_order_secondary ENUM('LEAD_ASCEND','LEAD_DESCEND','CALLTIME_ASCEND','CALLTIME_DESCEND','VENDOR_ASCEND','VENDOR_DESCEND') default 'LEAD_ASCEND';
UPDATE system_settings SET db_schema_version='1424',db_schema_update_date=NOW() where db_schema_version < 1424;
ALTER TABLE system_settings ADD agent_whisper_enabled ENUM('0','1') default '0';
UPDATE servers SET rebuild_conf_files='Y' where active_asterisk_server='Y';
UPDATE system_settings SET db_schema_version='1425',db_schema_update_date=NOW() where db_schema_version < 1425;
+30 -11
View File
@@ -92,10 +92,11 @@
# 141230-0030 - Added code for on-the-fly language translations display
# 150211-2342 - Added hopper link, issue #825
# 150307-0825 - small cosmetic fix
# 150804-0956 - Added WHISPER option agent monitoring
#
$version = '2.10-81';
$build = '150307-0825';
$version = '2.12-82';
$build = '150804-0956';
header ("Content-type: text/html; charset=utf-8");
@@ -178,7 +179,7 @@ $db_source = 'M';
#############################################
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT use_non_latin,outbound_autodial_active,slave_db_server,reports_use_slave_db,enable_languages,language_method FROM system_settings;";
$stmt = "SELECT use_non_latin,outbound_autodial_active,slave_db_server,reports_use_slave_db,enable_languages,language_method,agent_whisper_enabled FROM system_settings;";
$rslt=mysql_to_mysqli($stmt, $link);
if ($DB) {echo "$stmt\n";}
$qm_conf_ct = mysqli_num_rows($rslt);
@@ -191,6 +192,7 @@ if ($qm_conf_ct > 0)
$reports_use_slave_db = $row[3];
$SSenable_languages = $row[4];
$SSlanguage_method = $row[5];
$agent_whisper_enabled = $row[6];
}
##### END SETTINGS LOOKUP #####
###########################################
@@ -438,7 +440,7 @@ if ( (!preg_match('/\-\-ALL\-\-/i',$LOGadmin_viewable_groups)) and (strlen($LOGa
else
{$admin_viewable_groupsALL=1;}
# and (preg_match("/MONITOR|BARGE|HIJACK/",$monitor_active) ) )
# and (preg_match("/MONITOR|BARGE|HIJACK|WHISPER/",$monitor_active) ) )
if ( (!isset($monitor_phone)) or (strlen($monitor_phone)<1) )
{
$stmt="select phone_login from vicidial_users where user='$PHP_AUTH_USER';";
@@ -673,6 +675,12 @@ $select_list .= ">"._QXZ("MONITOR")."</option>";
$select_list .= "<option value=\"BARGE\"";
if ($monitor_active=='BARGE') {$select_list .= " selected";}
$select_list .= ">"._QXZ("BARGE")."</option>";
if ($agent_whisper_enabled == '1')
{
$select_list .= "<option value='WHISPER'";
if ($monitor_active=='WHISPER') {$select_list .= " selected";}
$select_list .= ">"._QXZ("WHISPER")."</option>";
}
#$select_list .= "<option value=\"HIJACK\"";
# if ($monitor_active=='HIJACK') {$select_list .= " selected";}
#$select_list .= ">HIJACK</option>";
@@ -2254,6 +2262,8 @@ $HDsessionid = "------------------+";
$HTsessionid = " "._QXZ("SESSIONID",16)." |";
$HDbarge = "-------+";
$HTbarge = " "._QXZ("BARGE",5)." |";
$HDwhisper = "---------+";
$HTwhisper = " "._QXZ("WHISPER",7)." |";
$HDstatus = "----------+";
$HTstatus = " "._QXZ("STATUS",8)." |";
$HDcustphone = "-------------+";
@@ -2299,7 +2309,7 @@ if ($UGdisplay < 1)
$HDusergroup = '';
$HTusergroup = '';
}
if ( ($SIPmonitorLINK<1) and ($IAXmonitorLINK<1) and (!preg_match("/MONITOR|BARGE/",$monitor_active) ) )
if ( ($SIPmonitorLINK<1) and ($IAXmonitorLINK<1) and (!preg_match("/MONITOR|BARGE|WHISPER/",$monitor_active) ) )
{
$HDsessionid = "-----------+";
$HTsessionid = " "._QXZ("SESSIONID",9)." |";
@@ -2309,6 +2319,11 @@ if ( ($SIPmonitorLINK<2) and ($IAXmonitorLINK<2) and (!preg_match("/BARGE/",$mon
$HDbarge = '';
$HTbarge = '';
}
if ( ($SIPmonitorLINK<2) and ($IAXmonitorLINK<2) and (!preg_match("/WHISPER/",$monitor_active) ) )
{
$HDwhisper = '';
$HTwhisper = '';
}
if ($SERVdisplay < 1)
{
$HDserver_ip = '';
@@ -2320,13 +2335,13 @@ if ($SERVdisplay < 1)
if ($realtime_block_user_info > 0)
{
$Aline = "$HDbegin$HDusergroup$HDsessionid$HDbarge$HDstatus$HDpause$HDcustphone$HDserver_ip$HDcall_server_ip$HDtime$HDcampaign$HDcalls$HDigcall\n";
$Bline = "$HTbegin$HTusergroup$HTsessionid$HTbarge$HTstatus$HTpause$HTcustphone$HTserver_ip$HTcall_server_ip$HTtime$HTcampaign$HTcalls$HTigcall\n";
$Aline = "$HDbegin$HDusergroup$HDsessionid$HDbarge$HDwhisper$HDstatus$HDpause$HDcustphone$HDserver_ip$HDcall_server_ip$HDtime$HDcampaign$HDcalls$HDigcall\n";
$Bline = "$HTbegin$HTusergroup$HTsessionid$HTbarge$HTwhisper$HTstatus$HTpause$HTcustphone$HTserver_ip$HTcall_server_ip$HTtime$HTcampaign$HTcalls$HTigcall\n";
}
else
{
$Aline = "$HDbegin$HDstation$HDphone$HDuser$HDusergroup$HDsessionid$HDbarge$HDstatus$HDpause$HDcustphone$HDserver_ip$HDcall_server_ip$HDtime$HDcampaign$HDcalls$HDigcall\n";
$Bline = "$HTbegin$HTstation$HTphone$HTuser$HTusergroup$HTsessionid$HTbarge$HTstatus$HTpause$HTcustphone$HTserver_ip$HTcall_server_ip$HTtime$HTcampaign$HTcalls$HTigcall\n";
$Aline = "$HDbegin$HDstation$HDphone$HDuser$HDusergroup$HDsessionid$HDbarge$HDwhisper$HDstatus$HDpause$HDcustphone$HDserver_ip$HDcall_server_ip$HDtime$HDcampaign$HDcalls$HDigcall\n";
$Bline = "$HTbegin$HTstation$HTphone$HTuser$HTusergroup$HTsessionid$HTbarge$HTwhisper$HTstatus$HTpause$HTcustphone$HTserver_ip$HTcall_server_ip$HTtime$HTcampaign$HTcalls$HTigcall\n";
}
$Aecho .= "$Aline";
$Aecho .= "$Bline";
@@ -2748,10 +2763,14 @@ $talking_to_print = mysqli_num_rows($rslt);
if ($IAXmonitorLINK>0) {$L=" <a href=\"iax:0$Lsessionid@$server_ip\">"._QXZ("LISTEN",6)."</a>"; $R='';}
if ($SIPmonitorLINK>1) {$R=" | <a href=\"sip:$Lsessionid@$server_ip\">"._QXZ("BARGE",5)."</a>";}
if ($IAXmonitorLINK>1) {$R=" | <a href=\"iax:$Lsessionid@$server_ip\">BARGE</a>";}
if ( (strlen($monitor_phone)>1) and (preg_match("/MONITOR|BARGE/",$monitor_active) ) )
if ( (strlen($monitor_phone)>1) and (preg_match("/MONITOR|BARGE|WHISPER/",$monitor_active) ) )
{$L=" <a href=\"javascript:send_monitor('$Lsessionid','$Lserver_ip','MONITOR');\">"._QXZ("LISTEN",6)."</a>"; $R='';}
if ( (strlen($monitor_phone)>1) and (preg_match("/BARGE/",$monitor_active) ) )
if ( (strlen($monitor_phone)>1) and (preg_match("/BARGE|WHISPER/",$monitor_active) ) )
{$R=" | <a href=\"javascript:send_monitor('$Lsessionid','$Lserver_ip','BARGE');\">"._QXZ("BARGE",5)."</a>";}
if ($SIPmonitorLINK>1) {$R=" | <a href=\"sip:47378218$Lsessionid@$server_ip\">WHISPER</a>";}
if ($IAXmonitorLINK>1) {$R=" | <a href=\"iax:47378218$Lsessionid@$server_ip\">WHISPER</a>";}
if ( (strlen($monitor_phone)>1) and (preg_match("/WHISPER/",$monitor_active) ) )
{$R=" | <a href=\"javascript:send_monitor('$Lsessionid','$Lserver_ip','WHISPER');\">WHISPER</a>";}
if ($CUSTPHONEdisplay > 0) {$CP = " $G$custphone$EG |";}
else {$CP = "";}
+11 -4
View File
File diff suppressed because one or more lines are too long
+6
View File
@@ -56,6 +56,7 @@
# 150725-1406 - Added agent_display_fields
# 150727-1039 - Added default_language
# 150728-0904 - Added state_conversion for list loader
# 150804-1108 - Added agent_whisper_enabled system settings option
#
require("dbconnect_mysqli.php");
@@ -4799,6 +4800,11 @@ FR_SPAC 00 00 00 00 00 - <?php echo _QXZ("France space separated phone number");
<BR>
<B><?php echo _QXZ("Enable Remote Agent Extension Overrides"); ?> -</B><?php echo _QXZ("This setting enables DIDs to have extension overrides for remote agent routed calls through in-groups. Default is 0 for disabled."); ?>
<BR>
<A NAME="settings-agent_whisper_enabled">
<BR>
<B><?php echo _QXZ("Enable Agent Whisper Monitoring"); ?> -</B><?php echo _QXZ("This setting allows a manager to be able to speak to a logged in agent without the customer being able to hear them. WARNING, this feature is considered experimental and may not function properly in some cases. Older versions of Asterisk have shown to have serious issues at times with this feature and can cause Asterisk to freeze or crash. Default is 0 for disabled."); ?>
<BR>
<A NAME="contact_information">
<A NAME="settings-contacts_enabled">
+15 -3
View File
@@ -101,10 +101,11 @@
# 150516-1138 - Fixed conflict with functions.php
# 150603-1528 - Fixed format issue in recording_lookup
# 150730-2022 - Added option to set entry_list_id
# 150804-0948 - Added WHISPER option for blind_monitor function
#
$version = '2.12-77';
$build = '150730-2022';
$version = '2.12-78';
$build = '150804-0948';
$api_url_log = 0;
$startMS = microtime();
@@ -383,7 +384,7 @@ header ("Pragma: no-cache"); // HTTP/1.0
#############################################
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT use_non_latin,custom_fields_enabled,pass_hash_enabled FROM system_settings;";
$stmt = "SELECT use_non_latin,custom_fields_enabled,pass_hash_enabled,agent_whisper_enabled FROM system_settings;";
$rslt=mysql_to_mysqli($stmt, $link);
$qm_conf_ct = mysqli_num_rows($rslt);
if ($qm_conf_ct > 0)
@@ -392,6 +393,7 @@ if ($qm_conf_ct > 0)
$non_latin = $row[0];
$custom_fields_enabled = $row[1];
$SSpass_hash_enabled = $row[2];
$agent_whisper_enabled = $row[3];
}
##### END SETTINGS LOOKUP #####
###########################################
@@ -1633,6 +1635,16 @@ if ($function == 'blind_monitor')
if ( (preg_match('/MONITOR/',$stage)) or (strlen($stage)<1) ) {$stage = '0';}
if (preg_match('/BARGE/',$stage)) {$stage = '';}
if (preg_match('/HIJACK/',$stage)) {$stage = '';}
if (preg_match('/WHISPER/',$stage))
{
if ($agent_whisper_enabled == '1')
{$stage = '47378218';}
else
{
# WHISPER not enabled
$stage = '0';
}
}
### insert a new lead in the system with this phone number
$stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$monitor_server_ip','','Originate','$BMquery','Channel: Local/$monitor_dialstring$stage$session_id@default','Context; default','Exten: $dialplan_number','Priority: 1','Callerid: \"VC Blind Monitor\" <$outbound_cid>','','','','','');";
+12 -4
View File
@@ -30,12 +30,13 @@
# 141001-2200 - Finalized adding QXZ translation to all admin files
# 141230-0032 - Added code for on-the-fly language translations display
# 150307-0823 - Fixes for QXZ
# 150804-0953 - Added WHISPER option agent monitoring
#
$startMS = microtime();
$version = '2.10-18';
$build = '150307-0823';
$version = '2.12-19';
$build = '150804-0953';
header ("Content-type: text/html; charset=utf-8");
@@ -111,7 +112,7 @@ $db_source = 'M';
#############################################
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT use_non_latin,outbound_autodial_active,slave_db_server,reports_use_slave_db,enable_languages,language_method FROM system_settings;";
$stmt = "SELECT use_non_latin,outbound_autodial_active,slave_db_server,reports_use_slave_db,enable_languages,language_method,agent_whisper_enabled FROM system_settings;";
$rslt=mysql_to_mysqli($stmt, $link);
if ($DB) {echo "$stmt\n";}
$qm_conf_ct = mysqli_num_rows($rslt);
@@ -124,6 +125,7 @@ if ($qm_conf_ct > 0)
$reports_use_slave_db = $row[3];
$SSenable_languages = $row[4];
$SSlanguage_method = $row[5];
$agent_whisper_enabled = $row[6];
}
##### END SETTINGS LOOKUP #####
###########################################
@@ -483,7 +485,7 @@ if ($auth)
}
# and (preg_match("/MONITOR|BARGE|HIJACK/",$monitor_active) ) )
# and (preg_match("/MONITOR|BARGE|HIJACK|WHISPER/",$monitor_active) ) )
if ( (!isset($monitor_phone)) or (strlen($monitor_phone)<1) )
{
$stmt="select phone_login from vicidial_users where user='$PHP_AUTH_USER';";
@@ -746,6 +748,12 @@ $select_list .= ">"._QXZ("MONITOR")."</option>";
$select_list .= "<option value='BARGE'";
if ($monitor_active=='BARGE') {$select_list .= " selected";}
$select_list .= ">"._QXZ("BARGE")."</option>";
if ($agent_whisper_enabled == '1')
{
$select_list .= "<option value='WHISPER'";
if ($monitor_active=='WHISPER') {$select_list .= " selected";}
$select_list .= ">"._QXZ("WHISPER")."</option>";
}
#$select_list .= "<option value='HIJACK'";
# if ($monitor_active=='HIJACK') {$select_list .= " selected";}
#$select_list .= ">HIJACK</option>";