Added QueueMetrics Socket-send function for custom queue_log record sending

git-svn-id: svn://192.168.202.10@1879 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2012-11-21 02:19:31 +00:00
parent 124e718863
commit 57bdd4e2d8
13 changed files with 379 additions and 32 deletions
+2
View File
@@ -118,6 +118,8 @@ OTHER CHANGES:
To enable, go to Admin -> System Settings and set "QC Features Active"
to "1", then submit.
26. Added QM Socket-Send functionality for custom queue_log record sending.
+35 -2
View File
@@ -178,9 +178,9 @@
# 120514-0953 - Added force checks for dial-ingroup calls
# 121025-2210 - If AGENTDIRECT and no agent defined, set drop call seconds to 1
# 121114-1936 - Added INGROUP recording option
# 121120-0921 - Added QM socket-send functionality
#
$script = 'agi-VDAD_ALL_inbound.agi';
$dtmf_silent_prefix = '7';
@@ -1785,7 +1785,7 @@ if ($call_handle_method =~ /CLOSER|DIGITID$/)
#############################################
##### START SYSTEM SETTINGS LOOKUP #####
$stmtA = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,queuemetrics_eq_prepend,queuemetrics_pe_phone_append,did_agent_log,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db,did_ra_extensions_enabled FROM system_settings;";
$stmtA = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,queuemetrics_eq_prepend,queuemetrics_pe_phone_append,did_agent_log,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db,did_ra_extensions_enabled,queuemetrics_socket,queuemetrics_socket_url FROM system_settings;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -1808,6 +1808,8 @@ if ($sthArows > 0)
$alt_log_pass = $aryA[12];
$tables_use_alt_log_db = $aryA[13];
$did_ra_extensions_enabled = $aryA[14];
$queuemetrics_socket = $aryA[15];
$queuemetrics_socket_url = $aryA[16];
}
$sthA->finish();
##### END SYSTEM SETTINGS LOOKUP #####
@@ -2760,6 +2762,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
$now_date_epoch = time();
$dataSQL='';
$dataSS='';
$stmtA = "SELECT queuemetrics_phone_environment FROM vicidial_campaigns where campaign_id='$log_campaign' and queuemetrics_phone_environment!='';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
@@ -2775,6 +2778,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
$pe_append = "-$qm_extension[1]";
}
$dataSQL = ",data4='$aryA[0]$pe_append'";
$dataSS = "$aryA[0]$pe_append";
}
$sthA->finish();
if ($AGILOG) {$agi_string = "$sthArowsCQPE|$dataSQL|$stmtA|"; &agi_output;}
@@ -2804,6 +2808,35 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
}
$dbhB->disconnect();
if ( ($queuemetrics_socket =~ /CONNECT_COMPLETE/) and (length($queuemetrics_socket_url) > 10) )
{
$socket_send_data_begin='?';
$socket_send_data = "time_id=$now_date_epoch&call_id=$YqueryCID&queue=$channel_group&agent=Agent/$VDADuser&verb=CONNECT&data1=$drop_timer&data2=&data3=&data4=$dataSS";
if ($queuemetrics_socket_url =~ /\?/)
{$socket_send_data_begin='&';}
### send queue_log data to the queuemetrics_socket_url ###
$compat_url = "$queuemetrics_socket_url$socket_send_data_begin$socket_send_data";
$compat_url =~ s/ /+/gi;
$compat_url =~ s/&/\\&/gi;
$launch = $PATHhome . "/AST_send_URL.pl";
$launch .= " --SYSLOG" if ($SYSLOG);
$launch .= " --lead_id=" . $insert_lead_id;
$launch .= " --phone_number=" . $phone_number;
$launch .= " --user=" . $VDADuser;
$launch .= " --call_type=IN";
$launch .= " --campaign=" . $channel_group;
$launch .= " --uniqueid=" . $uniqueid;
$launch .= " --call_id=" . $callerid;
$launch .= " --alt_dial=MAIN";
$launch .= " --function=QM_SOCKET_SEND";
$launch .= " --compat_url=" . $compat_url;
system($launch . ' &');
if ($AGILOG) {$agi_string = "$launch|"; &agi_output;}
}
}
$stmtA = "UPDATE vicidial_xfer_log set closer='$VDADuser' where lead_id = '$insert_lead_id' order by call_date desc limit 1;";
+119 -1
View File
@@ -96,6 +96,7 @@
# 120529-2112 - Added safe_harbor_audio_field campaign option
# 120621-0726 - Changed survey opt-in non-agent qm logging to log connection to VDAD agent
# 121009-1458 - Changed survey method HANGUP to not wait for digits, added LRERR Local channel logging
# 121120-0922 - Added QM socket-send functionality
#
$script = 'agi-VDAD_ALL_outbound.agi';
@@ -973,7 +974,7 @@ if ($VDACaffected_rows > 0)
#############################################
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmtA = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,queuemetrics_eq_prepend,queuemetrics_pe_phone_append FROM system_settings;";
$stmtA = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,queuemetrics_eq_prepend,queuemetrics_pe_phone_append,queuemetrics_socket,queuemetrics_socket_url FROM system_settings;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -990,6 +991,8 @@ if ($VDACaffected_rows > 0)
$queuemetrics_log_id = $aryA[5];
$queuemetrics_eq_prepend = $aryA[6];
$queuemetrics_pe_phone_append = $aryA[7];
$queuemetrics_socket = $aryA[8];
$queuemetrics_socket_url = $aryA[9];
$rec_count++;
}
$sthA->finish();
@@ -1617,6 +1620,63 @@ if ($call_handle_method =~ /SURVEY/)
$dbhP=$dbhB; $stmtA=$stmtB; $mysql_count='01080'; $MEL_aff_rows=$Baffected_rows; &mysql_error_logging;
$dbhB->disconnect();
if ( ($queuemetrics_socket =~ /CONNECT_COMPLETE/) and (length($queuemetrics_socket_url) > 10) )
{
#### run for CONNECT
$socket_send_data_begin='?';
$socket_send_data = "time_id=$now_date_epoch&call_id=$callerid&queue=$VDADcampaign&agent=Agent/VDAD&verb=CONNECT&data1=0&data2=&data3=&data4=";
if ($queuemetrics_socket_url =~ /\?/)
{$socket_send_data_begin='&';}
### send queue_log data to the queuemetrics_socket_url ###
$compat_url = "$queuemetrics_socket_url$socket_send_data_begin$socket_send_data";
$compat_url =~ s/ /+/gi;
$compat_url =~ s/&/\\&/gi;
$launch = $PATHhome . "/AST_send_URL.pl";
$launch .= " --SYSLOG" if ($SYSLOG);
$launch .= " --lead_id=" . $CIDlead_id;
$launch .= " --phone_number=" . $VDADphone;
$launch .= " --user=VDAD";
$launch .= " --call_type=";
$launch .= " --campaign=" . $VDADcampaign;
$launch .= " --uniqueid=" . $uniqueid;
$launch .= " --call_id=" . $callerid;
$launch .= " --alt_dial=";
$launch .= " --function=QM_SOCKET_SEND";
$launch .= " --compat_url=" . $compat_url;
system($launch . ' &');
if ($AGILOG) {$agi_string = "$launch|"; &agi_output;}
### run for COMPLETEAGENT
$socket_send_data_begin='?';
$socket_send_data = "time_id=$qm_complete_time&call_id=$callerid&queue=$VDADcampaign&agent=Agent/VDAD&verb=COMPLETEAGENT&data1=0&data2=$qm_complete_sec&data3=1&data4=";
if ($queuemetrics_socket_url =~ /\?/)
{$socket_send_data_begin='&';}
### send queue_log data to the queuemetrics_socket_url ###
$compat_url = "$queuemetrics_socket_url$socket_send_data_begin$socket_send_data";
$compat_url =~ s/ /+/gi;
$compat_url =~ s/&/\\&/gi;
$launch = $PATHhome . "/AST_send_URL.pl";
$launch .= " --SYSLOG" if ($SYSLOG);
$launch .= " --lead_id=" . $CIDlead_id;
$launch .= " --phone_number=" . $VDADphone;
$launch .= " --user=VDAD";
$launch .= " --call_type=";
$launch .= " --campaign=" . $VDADcampaign;
$launch .= " --uniqueid=" . $uniqueid;
$launch .= " --call_id=" . $callerid;
$launch .= " --alt_dial=";
$launch .= " --function=QM_SOCKET_SEND";
$launch .= " --compat_url=" . $compat_url;
system($launch . ' &');
if ($AGILOG) {$agi_string = "$launch|"; &agi_output;}
}
}
if (length($DROPexten) > 0)
@@ -2311,6 +2371,35 @@ while ($drop_timer <= $DROP_TIME)
$dbhP=$dbhB; $stmtA=$stmtB; $mysql_count='01039'; $MEL_aff_rows=$Baffected_rows; &mysql_error_logging;
$dbhB->disconnect();
if ( ($queuemetrics_socket =~ /CONNECT_COMPLETE/) and (length($queuemetrics_socket_url) > 10) )
{
$socket_send_data_begin='?';
$socket_send_data = "time_id=$now_date_epoch&call_id=$callerid&queue=$VDADcampaign&agent=Agent/$VDADuser&verb=CONNECT&data1=$drop_timer&data2=&data3=&data4=$queuemetrics_phone_environment$pe_append";
if ($queuemetrics_socket_url =~ /\?/)
{$socket_send_data_begin='&';}
### send queue_log data to the queuemetrics_socket_url ###
$compat_url = "$queuemetrics_socket_url$socket_send_data_begin$socket_send_data";
$compat_url =~ s/ /+/gi;
$compat_url =~ s/&/\\&/gi;
$launch = $PATHhome . "/AST_send_URL.pl";
$launch .= " --SYSLOG" if ($SYSLOG);
$launch .= " --lead_id=" . $CIDlead_id;
$launch .= " --phone_number=" . $VDADphone;
$launch .= " --user=" . $VDADuser;
$launch .= " --call_type=";
$launch .= " --campaign=" . $VDADcampaign;
$launch .= " --uniqueid=" . $uniqueid;
$launch .= " --call_id=" . $callerid;
$launch .= " --alt_dial=";
$launch .= " --function=QM_SOCKET_SEND";
$launch .= " --compat_url=" . $compat_url;
system($launch . ' &');
if ($AGILOG) {$agi_string = "$launch|"; &agi_output;}
}
}
if ($AGILOG) {$agi_string = "exiting the VDAD app, transferring call to $VDADconf_exten"; &agi_output;}
@@ -2838,6 +2927,35 @@ while ($drop_timer <= $DROP_TIME)
$dbhP=$dbhB; $stmtA=$stmtB; $mysql_count='01046'; $MEL_aff_rows=$Baffected_rows; &mysql_error_logging;
$dbhB->disconnect();
if ( ($queuemetrics_socket =~ /CONNECT_COMPLETE/) and (length($queuemetrics_socket_url) > 10) )
{
$socket_send_data_begin='?';
$socket_send_data = "time_id=$now_date_epoch&call_id=$callerid&queue=$VDADcampaign&agent=Agent/$VDADuser&verb=CONNECT&data1=$drop_timer&data2=&data3=&data4=$queuemetrics_phone_environment$pe_append";
if ($queuemetrics_socket_url =~ /\?/)
{$socket_send_data_begin='&';}
### send queue_log data to the queuemetrics_socket_url ###
$compat_url = "$queuemetrics_socket_url$socket_send_data_begin$socket_send_data";
$compat_url =~ s/ /+/gi;
$compat_url =~ s/&/\\&/gi;
$launch = $PATHhome . "/AST_send_URL.pl";
$launch .= " --SYSLOG" if ($SYSLOG);
$launch .= " --lead_id=" . $CIDlead_id;
$launch .= " --phone_number=" . $VDADphone;
$launch .= " --user=" . $VDADuser;
$launch .= " --call_type=";
$launch .= " --campaign=" . $VDADcampaign;
$launch .= " --uniqueid=" . $uniqueid;
$launch .= " --call_id=" . $callerid;
$launch .= " --alt_dial=";
$launch .= " --function=QM_SOCKET_SEND";
$launch .= " --compat_url=" . $compat_url;
system($launch . ' &');
if ($AGILOG) {$agi_string = "$launch|"; &agi_output;}
}
}
if ($AGILOG) {$agi_string = "exiting the VDAD app, transferring call to $VDADremDIALstr"; &agi_output;}
+21 -5
View File
@@ -1,18 +1,20 @@
#!/usr/bin/perl
#
# AST_send_URL.pl version 2.4
# AST_send_URL.pl version 2.6
#
# DESCRIPTION:
# This script is spawned for remote agents when the Start Call URL is set in the
# campaign or in-group that the call came from when sent to the remote agent.
# This script is also used for the Add-Lead-URL feature in In-groups.
# This script is also used for the Add-Lead-URL feature in In-groups and for
# QM socket-send.
#
# Copyright (C) 2011 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2012 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# CHANGES
# 100622-0929 - First Build
# 100929-0918 - Added function variable and new Add Lead URL function
# 110731-0127 - Added call_id variable and logging
# 121120-0925 - Added QM socket-send functionality
#
$|++;
@@ -53,7 +55,8 @@ if (scalar @ARGV) {
'function=s' => \$function,
'debug!' => \$DB,
'debugX!' => \$DBX,
'fulllog!' => \$FULL_LOG);
'fulllog!' => \$FULL_LOG,
'compat_url=s' => \$compat_url);
$DB = 1 if ($DBX);
if ($DB)
@@ -70,6 +73,7 @@ if (scalar @ARGV) {
print " alt_dial: $alt_dial\n" if ($alt_dial);
print " call_id: $call_id\n" if ($call_id);
print " function: $function\n" if ($function);
print " compat_url: $compat_url\n" if ($compat_url);
print "\n";
}
if ($CLOhelp)
@@ -86,9 +90,11 @@ if (scalar @ARGV) {
print " [--uniqueid] = uniqueid of the call\n";
print " [--alt_dial] = label of the phone number dialed\n";
print " [--call_id] = call_id or caller_code of the call\n";
print " [--compat_url] = full compatible URL to send\n";
print " [--function] = which function is to be run, default is REMOTE_AGENT_START_CALL_URL\n";
print " *REMOTE_AGENT_START_CALL_URL - performs a Start Call URL get for Remote Agent Calls\n";
print " *INGROUP_ADD_LEAD_URL - performs an Add Lead URL get for In-Groups when a lead is added\n";
print " *QM_SOCKET_SEND - performs a queue_log socket send url function\n";
print "\n";
print "You may prefix an option with 'no' to disable it.\n";
print " ie. --noSYSLOG or --noFULLLOG\n";
@@ -205,7 +211,17 @@ if (length($lead_id) > 0)
$VAR_did_description = '';
$VAR_closecallid = '';
if ($function =~ /INGROUP_ADD_LEAD_URL/)
if ($function =~ /QM_SOCKET_SEND/)
{
##### BEGIN QM socket-send URL function #####
$compat_url =~ s/ /+/gi;
$compat_url =~ s/&/\\&/gi;
$parse_url = $compat_url;
$url_function = 'qm_socket';
##### END QM socket-send URL function #####
}
elsif ($function =~ /INGROUP_ADD_LEAD_URL/)
{
##### BEGIN Add Lead URL function #####
$stmtA = "SELECT list_id,phone_code,vendor_lead_code FROM vicidial_list where lead_id='$lead_id';";
+35 -3
View File
@@ -1,6 +1,6 @@
#!/usr/bin/perl
#
# FastAGI_log.pl version 2.4
# FastAGI_log.pl version 2.6
#
# Experimental Deamon using perl Net::Server that runs as FastAGI to reduce load
# replaces the following AGI scripts:
@@ -25,7 +25,7 @@
# exten => h,1,DeadAGI(agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME})
#
#
# Copyright (C) 2011 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2012 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# CHANGELOG:
# 61010-1007 - First test build
@@ -61,6 +61,7 @@
# 110224-1854 - Added compatibility with QM phone environment logging
# 110304-0005 - Small changes for CPD and on-hook agent features
# 110324-2336 - Changes to CPD logging of calls and addition of the PDROP status
# 121120-0922 - Added QM socket-send functionality
#
# defaults for PreFork
@@ -1003,7 +1004,7 @@ sub process_request
#############################################
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmtA = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
$stmtA = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,queuemetrics_socket,queuemetrics_socket_url FROM system_settings;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -1016,6 +1017,8 @@ sub process_request
$queuemetrics_login= $aryA[3];
$queuemetrics_pass = $aryA[4];
$queuemetrics_log_id = $aryA[5];
$queuemetrics_socket = $aryA[6];
$queuemetrics_socket_url = $aryA[7];
}
$sthA->finish();
##### END QUEUEMETRICS LOGGING LOOKUP #####
@@ -1097,6 +1100,35 @@ sub process_request
{
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$secX',call_id='$VD_callerid',queue='$VD_campaign_id',agent='$VD_agent',verb='COMPLETECALLER',data1='$VD_stage',data2='$VD_call_length',data3='$queue_position',serverid='$queuemetrics_log_id',data4='$data_four';";
$Baffected_rows = $dbhB->do($stmtB);
if ( ($queuemetrics_socket =~ /CONNECT_COMPLETE/) and (length($queuemetrics_socket_url) > 10) )
{
$socket_send_data_begin='?';
$socket_send_data = "time_id=$secX&call_id=$VD_callerid&queue=$VD_campaign_id&agent=$VD_agent&verb=COMPLETECALLER&data1=$VD_stage&data2=$VD_call_length&data3=$queue_position&data4=$data_four";
if ($queuemetrics_socket_url =~ /\?/)
{$socket_send_data_begin='&';}
### send queue_log data to the queuemetrics_socket_url ###
$compat_url = "$queuemetrics_socket_url$socket_send_data_begin$socket_send_data";
$compat_url =~ s/ /+/gi;
$compat_url =~ s/&/\\&/gi;
$launch = $PATHhome . "/AST_send_URL.pl";
$launch .= " --SYSLOG" if ($SYSLOG);
$launch .= " --lead_id=" . $VD_lead_id;
$launch .= " --phone_number=" . $VD_phone_number;
$launch .= " --user=" . $VD_agent;
$launch .= " --call_type=X";
$launch .= " --campaign=" . $VD_campaign_id;
$launch .= " --uniqueid=" . $uniqueid;
$launch .= " --call_id=" . $VD_callerid;
$launch .= " --alt_dial=UNKNOWN";
$launch .= " --function=QM_SOCKET_SEND";
$launch .= " --compat_url=" . $compat_url;
system($launch . ' &');
if ($AGILOG) {$agi_string = "$launch|"; &agi_output;}
}
}
if ($AGILOG) {$agi_string = "|$stmtB|"; &agi_output;}
+4 -2
View File
@@ -1493,7 +1493,9 @@ call_menu_qualify_enabled ENUM('0','1') default '0',
admin_list_counts ENUM('0','1') default '1',
allow_voicemail_greeting ENUM('0','1') default '0',
audio_store_purge TEXT,
svn_revision INT(9) default '0'
svn_revision INT(9) default '0',
queuemetrics_socket VARCHAR(20) default 'NONE',
queuemetrics_socket_url TEXT
);
CREATE TABLE vicidial_campaigns_list_mix (
@@ -2985,4 +2987,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='1331',db_schema_update_date=NOW();
UPDATE system_settings SET db_schema_version='1332',db_schema_update_date=NOW();
+5
View File
@@ -161,3 +161,8 @@ 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='1331',db_schema_update_date=NOW() where db_schema_version < 1331;
ALTER TABLE system_settings ADD queuemetrics_socket VARCHAR(20) default 'NONE';
ALTER TABLE system_settings ADD queuemetrics_socket_url TEXT;
UPDATE system_settings SET db_schema_version='1332',db_schema_update_date=NOW() where db_schema_version < 1332;
@@ -31,6 +31,10 @@ The default is FULLDATE_AGENT and would look like this 20051020-103108_6666. Ano
This field will override the Campaign Recording Filenaming Scheme unless it is set to NONE. The allowed variables are||
Audit Comments||
This option allows comments to be moved to an audit table. No longer editable, but viewable along with the date-time-creator of each comment. Default is N. This is a part of the Quality Control Add-On||
QueueMetrics Socket Send||
This option, if enabled, will send QM data to a web page that will send it through a socket for logging. The CONNECT_COMPLETE option will send CONNECT, COMPLETEAGENT and COMPLETECALLER events to the url defined below. Default is NONE for disabled||
QueueMetrics Socket Send URL||
If Socket Send is enabled above, this is the URL that is used to send the data to. Default is EMPTY for disabled||
############################################################ CLIENT
+20 -3
View File
@@ -62,10 +62,11 @@
# 120809-2338 - Added recording and webserver functions
# 120819-1758 - Added webphone_url and call_agent functions
# 120913-2039 - Added group_alias to transfer_conference function
# 121120-0855 - Added QM socket-send functionality
#
$version = '2.6-28';
$build = '120913-2039';
$version = '2.6-29';
$build = '121120-0855';
$startMS = microtime();
@@ -2513,7 +2514,7 @@ if ($function == 'ra_call_control')
#############################################
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,queuemetrics_pe_phone_append FROM system_settings;";
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,queuemetrics_pe_phone_append,queuemetrics_socket,queuemetrics_socket_url FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$qm_conf_ct = mysql_num_rows($rslt);
@@ -2527,6 +2528,8 @@ if ($function == 'ra_call_control')
$queuemetrics_pass = $row[4];
$queuemetrics_log_id = $row[5];
$queuemetrics_pe_phone_append = $row[6];
$queuemetrics_socket = $row[7];
$queuemetrics_socket_url = $row[8];
}
##### END QUEUEMETRICS LOGGING LOOKUP #####
###########################################
@@ -2550,6 +2553,7 @@ if ($function == 'ra_call_control')
if ($ra_stage < 0.25) {$ra_stage=0;}
$data4SQL='';
$data4SS='';
$stmt="SELECT queuemetrics_phone_environment FROM vicidial_campaigns where campaign_id='$campaign_id' and queuemetrics_phone_environment!='';";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
@@ -2564,6 +2568,7 @@ if ($function == 'ra_call_control')
$pe_append = "-$qm_extension[1]";
}
$data4SQL = ",data4='$row[0]$pe_append'";
$data4SS = "&data4=$row[0]$pe_append";
}
$stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$value',queue='$campaign_id',agent='Agent/$ra_user',verb='COMPLETEAGENT',data1='$ra_stage',data2='$ra_length',data3='$queue_position',serverid='$queuemetrics_log_id' $data4SQL;";
@@ -2581,6 +2586,18 @@ if ($function == 'ra_call_control')
$stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='NONE',agent='Agent/$ra_user',verb='UNPAUSEALL',serverid='$queuemetrics_log_id' $data4SQL;";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $linkB);
if ( ($queuemetrics_socket == 'CONNECT_COMPLETE') and (strlen($queuemetrics_socket_url) > 10) )
{
$socket_send_data_begin='?';
$socket_send_data = "time_id=$StarTtime&call_id=$value&queue=$campaign_id&agent=Agent/$ra_user&verb=COMPLETEAGENT&data1=$ra_stage&data2=$ra_length&data3=$queue_position$data4SS";
if (preg_match("/\?/",$queuemetrics_socket_url))
{$socket_send_data_begin='&';}
### send queue_log data to the queuemetrics_socket_url ###
if ($DB > 0) {echo "$queuemetrics_socket_url$socket_send_data_begin$socket_send_data<BR>\n";}
$SCUfile = file("$queuemetrics_socket_url$socket_send_data_begin$socket_send_data");
if ($DB > 0) {echo "$SCUfile[0]<BR>\n";}
}
}
### finally send the call
+20 -3
View File
@@ -111,10 +111,11 @@
# 110626-2320 - Added qm_extension
# 120810-0030 - Added external_recording
# 120831-1458 - Added vicidial_dial_log outbound call logging
# 121120-0848 - Added QM socket-send functionality
#
$version = '2.6-58';
$build = '120831-1458';
$version = '2.6-59';
$build = '121120-0848';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=119;
$one_mysql_log=0;
@@ -646,7 +647,7 @@ if ($ACTION=="Hangup")
{
#############################################
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,queuemetrics_pe_phone_append FROM system_settings;";
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,queuemetrics_pe_phone_append,queuemetrics_socket,queuemetrics_socket_url FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02014',$user,$server_ip,$session_name,$one_mysql_log);}
if ($format=='debug') {echo "\n<!-- $rowx[0]|$stmt -->";}
@@ -662,6 +663,8 @@ if ($ACTION=="Hangup")
$queuemetrics_pass = $row[4];
$queuemetrics_log_id = $row[5];
$queuemetrics_pe_phone_append = $row[6];
$queuemetrics_socket = $row[7];
$queuemetrics_socket_url = $row[8];
$i++;
}
##### END QUEUEMETRICS LOGGING LOOKUP #####
@@ -737,6 +740,7 @@ if ($ACTION=="Hangup")
{$secondS = ($StarTtime - $time_id);}
$data4SQL='';
$data4SS='';
$stmt="SELECT queuemetrics_phone_environment FROM vicidial_campaigns where campaign_id='$log_campaign' and queuemetrics_phone_environment!='';";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$linkB,$mel,$stmt,'02116',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -749,6 +753,7 @@ if ($ACTION=="Hangup")
if ( ($queuemetrics_pe_phone_append > 0) and (strlen($row[0])>0) )
{$pe_append = "-$qm_extension";}
$data4SQL = ",data4='$row[0]$pe_append'";
$data4SS = "&data4=$row[0]$pe_append";
}
if ($format=='debug') {echo "\n<!-- $caller_complete|$stmt -->";}
@@ -757,6 +762,18 @@ if ($ACTION=="Hangup")
if ($mel > 0) {mysql_error_logging($NOW_TIME,$linkB,$mel,$stmt,'02019',$user,$server_ip,$session_name,$one_mysql_log);}
$affected_rows = mysql_affected_rows($linkB);
if ($format=='debug') {echo "\n<!-- $affected_rows|$stmt -->";}
if ( ($queuemetrics_socket == 'CONNECT_COMPLETE') and (strlen($queuemetrics_socket_url) > 10) )
{
$socket_send_data_begin='?';
$socket_send_data = "time_id=$StarTtime&call_id=$CalLCID&queue=$CLcampaign_id&agent=Agent/$user&verb=COMPLETEAGENT&data1=$CLstage&data2=$secondS&data3=$CLqueue_position$data4SS";
if (preg_match("/\?/",$queuemetrics_socket_url))
{$socket_send_data_begin='&';}
### send queue_log data to the queuemetrics_socket_url ###
if ($DB > 0) {echo "$queuemetrics_socket_url$socket_send_data_begin$socket_send_data<BR>\n";}
$SCUfile = file("$queuemetrics_socket_url$socket_send_data_begin$socket_send_data");
if ($DB > 0) {echo "$SCUfile[0]<BR>\n";}
}
}
}
}
+83 -6
View File
@@ -316,10 +316,11 @@
# 121029-0159 - Added owner_populate campaign option
# 121114-1749 - Fixed manual dial lead preview script variable issue
# 121116-1409 - Added QC functionality
# 121120-0838 - Added QM socket-send functionality
#
$version = '2.6-214';
$build = '121116-1409';
$version = '2.6-215';
$build = '121120-0838';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=443;
$one_mysql_log=0;
@@ -2598,7 +2599,7 @@ if ($ACTION == 'manDiaLnextCaLL')
#############################################
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,queuemetrics_pe_phone_append FROM system_settings;";
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,queuemetrics_pe_phone_append,queuemetrics_socket,queuemetrics_socket_url FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00037',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
@@ -2613,6 +2614,8 @@ if ($ACTION == 'manDiaLnextCaLL')
$queuemetrics_pass = $row[4];
$queuemetrics_log_id = $row[5];
$queuemetrics_pe_phone_append = $row[6];
$queuemetrics_socket = $row[7];
$queuemetrics_socket_url = $row[8];
}
##### END QUEUEMETRICS LOGGING LOOKUP #####
###########################################
@@ -2620,6 +2623,7 @@ if ($ACTION == 'manDiaLnextCaLL')
if ($enable_queuemetrics_logging > 0)
{
$data4SQL='';
$data4SS='';
$stmt="SELECT queuemetrics_phone_environment FROM vicidial_campaigns where campaign_id='$campaign' and queuemetrics_phone_environment!='';";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00389',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -2632,6 +2636,7 @@ if ($ACTION == 'manDiaLnextCaLL')
if ( ($queuemetrics_pe_phone_append > 0) and (strlen($row[0])>0) )
{$pe_append = "-$qm_extension";}
$data4SQL = ",data4='$row[0]$pe_append'";
$data4SS = "&data4=$row[0]$pe_append";
}
$linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass");
@@ -2659,6 +2664,18 @@ if ($ACTION == 'manDiaLnextCaLL')
$affected_rows = mysql_affected_rows($linkB);
mysql_close($linkB);
if ( ($queuemetrics_socket == 'CONNECT_COMPLETE') and (strlen($queuemetrics_socket_url) > 10) )
{
$socket_send_data_begin='?';
$socket_send_data = "time_id=$StarTtime&call_id=$MqueryCID&queue=$campaign&agent=Agent/$user&verb=CONNECT&data1=0$data4SS";
if (preg_match("/\?/",$queuemetrics_socket_url))
{$socket_send_data_begin='&';}
### send queue_log data to the queuemetrics_socket_url ###
if ($DB > 0) {echo "$queuemetrics_socket_url$socket_send_data_begin$socket_send_data<BR>\n";}
$SCUfile = file("$queuemetrics_socket_url$socket_send_data_begin$socket_send_data");
if ($DB > 0) {echo "$SCUfile[0]<BR>\n";}
}
}
}
@@ -3270,7 +3287,7 @@ if ($ACTION == 'manDiaLonly')
#############################################
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,queuemetrics_pe_phone_append FROM system_settings;";
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,queuemetrics_pe_phone_append,queuemetrics_socket,queuemetrics_socket_url FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00048',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
@@ -3285,12 +3302,15 @@ if ($ACTION == 'manDiaLonly')
$queuemetrics_pass = $row[4];
$queuemetrics_log_id = $row[5];
$queuemetrics_pe_phone_append = $row[6];
$queuemetrics_socket = $row[7];
$queuemetrics_socket_url = $row[8];
}
##### END QUEUEMETRICS LOGGING LOOKUP #####
###########################################
if ($enable_queuemetrics_logging > 0)
{
$data4SQL='';
$data4SS='';
$stmt="SELECT queuemetrics_phone_environment FROM vicidial_campaigns where campaign_id='$campaign' and queuemetrics_phone_environment!='';";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00390',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -3303,6 +3323,7 @@ if ($ACTION == 'manDiaLonly')
if ( ($queuemetrics_pe_phone_append > 0) and (strlen($row[0])>0) )
{$pe_append = "-$qm_extension";}
$data4SQL = ",data4='$row[0]$pe_append'";
$data4SS = "&data4=$row[0]$pe_append";
}
$linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass");
@@ -3330,6 +3351,18 @@ if ($ACTION == 'manDiaLonly')
$affected_rows = mysql_affected_rows($linkB);
mysql_close($linkB);
if ( ($queuemetrics_socket == 'CONNECT_COMPLETE') and (strlen($queuemetrics_socket_url) > 10) )
{
$socket_send_data_begin='?';
$socket_send_data = "time_id=$StarTtime&call_id=$MqueryCID&queue=$campaign&agent=Agent/$user&verb=CONNECT&data1=0$data4SS";
if (preg_match("/\?/",$queuemetrics_socket_url))
{$socket_send_data_begin='&';}
### send queue_log data to the queuemetrics_socket_url ###
if ($DB > 0) {echo "$queuemetrics_socket_url$socket_send_data_begin$socket_send_data<BR>\n";}
$SCUfile = file("$queuemetrics_socket_url$socket_send_data_begin$socket_send_data");
if ($DB > 0) {echo "$SCUfile[0]<BR>\n";}
}
}
##### check if system is set to generate logfile for transfers
$stmt="SELECT enable_agc_xfer_log FROM system_settings;";
@@ -3723,7 +3756,7 @@ if ($stage == "end")
#############################################
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,queuemetrics_dispo_pause,queuemetrics_pe_phone_append FROM system_settings;";
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,queuemetrics_dispo_pause,queuemetrics_pe_phone_append,queuemetrics_socket,queuemetrics_socket_url FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00063',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
@@ -3740,6 +3773,8 @@ if ($stage == "end")
$queuemetrics_log_id = $row[5];
$queuemetrics_dispo_pause = $row[6];
$queuemetrics_pe_phone_append = $row[7];
$queuemetrics_socket = $row[8];
$queuemetrics_socket_url = $row[9];
if ($enable_queuemetrics_logging > 0)
{
@@ -4191,6 +4226,7 @@ if ($stage == "end")
if ($CLstage < 0.25) {$CLstage=0;}
$data4SQL='';
$data4SS='';
$stmt="SELECT queuemetrics_phone_environment FROM vicidial_campaigns where campaign_id='$campaign' and queuemetrics_phone_environment!='';";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00392',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -4203,6 +4239,7 @@ if ($stage == "end")
if ( ($queuemetrics_pe_phone_append > 0) and (strlen($row[0])>0) )
{$pe_append = "-$qm_extension";}
$data4SQL = ",data4='$row[0]$pe_append'";
$data4SS = "&data4=$row[0]$pe_append";
}
$stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$MDnextCID',queue='$VDcampaign_id',agent='Agent/$user',verb='COMPLETEAGENT',data1='$CLstage',data2='$length_in_sec',data3='$CLqueue_position',serverid='$queuemetrics_log_id' $data4SQL;";
@@ -4210,6 +4247,18 @@ if ($stage == "end")
$rslt=mysql_query($stmt, $linkB);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$linkB,$mel,$stmt,'00085',$user,$server_ip,$session_name,$one_mysql_log);}
$affected_rows = mysql_affected_rows($linkB);
if ( ($queuemetrics_socket == 'CONNECT_COMPLETE') and (strlen($queuemetrics_socket_url) > 10) )
{
$socket_send_data_begin='?';
$socket_send_data = "time_id=$StarTtime&call_id=$MDnextCID&queue=$VDcampaign_id&agent=Agent/$user&verb=COMPLETEAGENT&data1=$CLstage&data2=$length_in_sec&data3=$CLqueue_position$data4SS";
if (preg_match("/\?/",$queuemetrics_socket_url))
{$socket_send_data_begin='&';}
### send queue_log data to the queuemetrics_socket_url ###
if ($DB > 0) {echo "$queuemetrics_socket_url$socket_send_data_begin$socket_send_data<BR>\n";}
$SCUfile = file("$queuemetrics_socket_url$socket_send_data_begin$socket_send_data");
if ($DB > 0) {echo "$SCUfile[0]<BR>\n";}
}
}
if ($nodeletevdac < 1)
@@ -4418,6 +4467,7 @@ if ($stage == "end")
{$VDqueue_position=1;}
$data4SQL='';
$data4SS='';
$stmt="SELECT queuemetrics_phone_environment FROM vicidial_campaigns where campaign_id='$campaign' and queuemetrics_phone_environment!='';";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00393',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -4430,6 +4480,7 @@ if ($stage == "end")
if ( ($queuemetrics_pe_phone_append > 0) and (strlen($row[0])>0) )
{$pe_append = "-$qm_extension";}
$data4SQL = ",data4='$row[0]$pe_append'";
$data4SS = "&data4=$row[0]$pe_append";
}
$stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$MDnextCID',queue='$VDcampaign_id',agent='Agent/$user',verb='COMPLETEAGENT',data1='$CLstage',data2='$length_in_sec',data3='$VDqueue_position',serverid='$queuemetrics_log_id' $data4SQL;";
@@ -4437,6 +4488,18 @@ if ($stage == "end")
$rslt=mysql_query($stmt, $linkB);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$linkB,$mel,$stmt,'00094',$user,$server_ip,$session_name,$one_mysql_log);}
$affected_rows = mysql_affected_rows($linkB);
if ( ($queuemetrics_socket == 'CONNECT_COMPLETE') and (strlen($queuemetrics_socket_url) > 10) )
{
$socket_send_data_begin='?';
$socket_send_data = "time_id=$StarTtime&call_id=$MDnextCID&queue=$VDcampaign_id&agent=Agent/$user&verb=COMPLETEAGENT&data1=$CLstage&data2=$length_in_sec&data3=$VDqueue_position$data4SS";
if (preg_match("/\?/",$queuemetrics_socket_url))
{$socket_send_data_begin='&';}
### send queue_log data to the queuemetrics_socket_url ###
if ($DB > 0) {echo "$queuemetrics_socket_url$socket_send_data_begin$socket_send_data<BR>\n";}
$SCUfile = file("$queuemetrics_socket_url$socket_send_data_begin$socket_send_data");
if ($DB > 0) {echo "$SCUfile[0]<BR>\n";}
}
}
}
}
@@ -7114,7 +7177,7 @@ if ($ACTION == 'updateDISPO')
#############################################
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,queuemetrics_callstatus,queuemetrics_dispo_pause,queuemetrics_pe_phone_append FROM system_settings;";
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,queuemetrics_callstatus,queuemetrics_dispo_pause,queuemetrics_pe_phone_append,queuemetrics_socket,queuemetrics_socket_url FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00159',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
@@ -7131,6 +7194,8 @@ if ($ACTION == 'updateDISPO')
$queuemetrics_callstatus = $row[6];
$queuemetrics_dispo_pause = $row[7];
$queuemetrics_pe_phone_append = $row[8];
$queuemetrics_socket = $row[9];
$queuemetrics_socket_url = $row[10];
}
##### END QUEUEMETRICS LOGGING LOOKUP #####
###########################################
@@ -7222,6 +7287,18 @@ if ($ACTION == 'updateDISPO')
$rslt=mysql_query($stmt, $linkB);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$linkB,$mel,$stmt,'00413',$user,$server_ip,$session_name,$one_mysql_log);}
$affected_rows = mysql_affected_rows($linkB);
if ( ($queuemetrics_socket == 'CONNECT_COMPLETE') and (strlen($queuemetrics_socket_url) > 10) )
{
$socket_send_data_begin='?';
$socket_send_data = "time_id=$QLcomplete_time&call_id=$MDnextCID&queue=$stage&agent=Agent/$user&verb=COMPLETEAGENT&data1=$QLconnect_one&data2=$QLcomplete_length&data3=$QLcomplete_position&data4=$QLconnect_four";
if (preg_match("/\?/",$queuemetrics_socket_url))
{$socket_send_data_begin='&';}
### send queue_log data to the queuemetrics_socket_url ###
if ($DB > 0) {echo "$queuemetrics_socket_url$socket_send_data_begin$socket_send_data<BR>\n";}
$SCUfile = file("$queuemetrics_socket_url$socket_send_data_begin$socket_send_data");
if ($DB > 0) {echo "$SCUfile[0]<BR>\n";}
}
}
mysql_close($linkB);
+28 -4
View File
@@ -1762,6 +1762,10 @@ if (isset($_GET["pause_after_next_call"])) {$pause_after_next_call=$_GET["paus
elseif (isset($_POST["pause_after_next_call"])) {$pause_after_next_call=$_POST["pause_after_next_call"];}
if (isset($_GET["owner_populate"])) {$owner_populate=$_GET["owner_populate"];}
elseif (isset($_POST["owner_populate"])) {$owner_populate=$_POST["owner_populate"];}
if (isset($_GET["queuemetrics_socket"])) {$queuemetrics_socket=$_GET["queuemetrics_socket"];}
elseif (isset($_POST["queuemetrics_socket"])) {$queuemetrics_socket=$_POST["queuemetrics_socket"];}
if (isset($_GET["queuemetrics_socket_url"])) {$queuemetrics_socket_url=$_GET["queuemetrics_socket_url"];}
elseif (isset($_POST["queuemetrics_socket_url"])) {$queuemetrics_socket_url=$_POST["queuemetrics_socket_url"];}
if (isset($script_id)) {$script_id= strtoupper($script_id);}
@@ -2500,6 +2504,7 @@ if ($non_latin < 1)
$max_calls_action = ereg_replace("[^-_0-9a-zA-Z]","",$max_calls_action);
$in_group_dial = ereg_replace("[^-_0-9a-zA-Z]","",$in_group_dial);
$in_group_dial_select = ereg_replace("[^-_0-9a-zA-Z]","",$in_group_dial_select);
$queuemetrics_socket = ereg_replace("[^-_0-9a-zA-Z]","",$queuemetrics_socket);
### ALPHA-NUMERIC and underscore and dash and slash and dot
$menu_prompt = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$menu_prompt);
@@ -2738,6 +2743,10 @@ if ($non_latin < 1)
$qualify_sql = ereg_replace(";","",$qualify_sql);
$qualify_sql = ereg_replace("\r","",$qualify_sql);
$qualify_sql = ereg_replace("'",'"',$qualify_sql);
$queuemetrics_socket_url = ereg_replace("\\\\","",$queuemetrics_socket_url);
$queuemetrics_socket_url = ereg_replace(";","",$queuemetrics_socket_url);
$queuemetrics_socket_url = ereg_replace("\r","",$queuemetrics_socket_url);
$queuemetrics_socket_url = ereg_replace("'",'"',$queuemetrics_socket_url);
### VARIABLES TO BE mysql_real_escape_string ###
# $web_form_address
# $queuemetrics_url
@@ -3167,12 +3176,13 @@ else
# 121029-0109 - Added pause_after_next_call and owner_populate campaign options
# 121114-1923 - Added Basic Lead Management page link. Added INGROUP as a recording filename option
# 121116-1410 - Added QC functionality
# 121120-0824 - Added queuemetrics_socket functionality to system settings
#
# 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.6-382a';
$build = '121116-1410';
$admin_version = '2.6-383a';
$build = '121120-0824';
$STARTtime = date("U");
$SQLdate = date("Y-m-d H:i:s");
@@ -8561,6 +8571,16 @@ if ($ADD==99999)
<BR>
<B>QueueMetrics Phone Environment Phone Append -</B> This option, if enabled, will append the agent phone login to the data4 record in the queue log table if the Campaign Phone Environment field is populated. Default is 0 for disabled.
<BR>
<A NAME="settings-queuemetrics_socket">
<BR>
<B>QueueMetrics Socket Send -</B> This option, if enabled, will send QM data to a web page that will send it through a socket for logging. The CONNECT_COMPLETE option will send CONNECT, COMPLETEAGENT and COMPLETECALLER events to the url defined below. Default is NONE for disabled.
<BR>
<A NAME="settings-queuemetrics_socket_url">
<BR>
<B>QueueMetrics Socket Send URL -</B> If Socket Send is enabled above, this is the URL that is used to send the data to. Default is EMPTY for disabled.
<BR>
<A NAME="settings-enable_vtiger_integration">
<BR>
@@ -17517,7 +17537,7 @@ if ($ADD==411111111111111)
}
$tables_use_alt_log_db = preg_replace("/,$/","",$new_altlog_value);
$stmt="UPDATE system_settings set use_non_latin='$use_non_latin',webroot_writable='$webroot_writable',enable_queuemetrics_logging='$enable_queuemetrics_logging',queuemetrics_server_ip='$queuemetrics_server_ip',queuemetrics_dbname='$queuemetrics_dbname',queuemetrics_login='$queuemetrics_login',queuemetrics_pass='$queuemetrics_pass',queuemetrics_url='$queuemetrics_url',queuemetrics_log_id='$queuemetrics_log_id',queuemetrics_eq_prepend='$queuemetrics_eq_prepend',vicidial_agent_disable='$vicidial_agent_disable',allow_sipsak_messages='$allow_sipsak_messages',admin_home_url='$admin_home_url',enable_agc_xfer_log='$enable_agc_xfer_log',timeclock_end_of_day='$timeclock_end_of_day',vdc_header_date_format='$vdc_header_date_format',vdc_customer_date_format='$vdc_customer_date_format',vdc_header_phone_format='$vdc_header_phone_format',vdc_agent_api_active='$vdc_agent_api_active',enable_vtiger_integration='$enable_vtiger_integration',vtiger_server_ip='$vtiger_server_ip',vtiger_dbname='$vtiger_dbname',vtiger_login='$vtiger_login',vtiger_pass='$vtiger_pass',vtiger_url='$vtiger_url',qc_features_active='$qc_features_active',outbound_autodial_active='$outbound_autodial_active',outbound_calls_per_second='$outbound_calls_per_second',enable_tts_integration='$enable_tts_integration',agentonly_callback_campaign_lock='$agentonly_callback_campaign_lock',sounds_central_control_active='$sounds_central_control_active',sounds_web_server='$sounds_web_server',sounds_web_directory='$sounds_web_directory',active_voicemail_server='$active_voicemail_server',auto_dial_limit='$auto_dial_limit',user_territories_active='$user_territories_active',allow_custom_dialplan='$allow_custom_dialplan',enable_second_webform='$enable_second_webform',default_webphone='$default_webphone',default_external_server_ip='$default_external_server_ip',webphone_url='" . mysql_real_escape_string($webphone_url) . "',enable_agc_dispo_log='$enable_agc_dispo_log',custom_dialplan_entry='$custom_dialplan_entry',queuemetrics_loginout='$queuemetrics_loginout',callcard_enabled='$callcard_enabled',queuemetrics_callstatus='$queuemetrics_callstatus',default_codecs='$default_codecs',admin_web_directory='$admin_web_directory',label_title='$label_title',label_first_name='$label_first_name',label_middle_initial='$label_middle_initial',label_last_name='$label_last_name',label_address1='$label_address1',label_address2='$label_address2',label_address3='$label_address3',label_city='$label_city',label_state='$label_state',label_province='$label_province',label_postal_code='$label_postal_code',label_vendor_lead_code='$label_vendor_lead_code',label_gender='$label_gender',label_phone_number='$label_phone_number',label_phone_code='$label_phone_code',label_alt_phone='$label_alt_phone',label_security_phrase='$label_security_phrase',label_email='$label_email',label_comments='$label_comments',custom_fields_enabled='$custom_fields_enabled',slave_db_server='$slave_db_server',reports_use_slave_db='$reports_use_slave_db',webphone_systemkey='$webphone_systemkey',first_login_trigger='$first_login_trigger',default_phone_registration_password='$default_phone_registration_password',default_phone_login_password='$default_phone_login_password',default_server_password='$default_server_password',admin_modify_refresh='$admin_modify_refresh',nocache_admin='$nocache_admin',generate_cross_server_exten='$generate_cross_server_exten',queuemetrics_addmember_enabled='$queuemetrics_addmember_enabled',queuemetrics_dispo_pause='$queuemetrics_dispo_pause',label_hide_field_logs='$label_hide_field_logs',queuemetrics_pe_phone_append='$queuemetrics_pe_phone_append',test_campaign_calls='$test_campaign_calls',agents_calls_reset='$agents_calls_reset',default_voicemail_timezone='$default_voicemail_timezone',default_local_gmt='$default_local_gmt',noanswer_log='$noanswer_log',alt_log_server_ip='$alt_log_server_ip',alt_log_dbname='$alt_log_dbname',alt_log_login='$alt_log_login',alt_log_pass='$alt_log_pass',tables_use_alt_log_db='$tables_use_alt_log_db',did_agent_log='$did_agent_log',campaign_cid_areacodes_enabled='$campaign_cid_areacodes_enabled',pllb_grouping_limit='$pllb_grouping_limit',did_ra_extensions_enabled='$did_ra_extensions_enabled',expanded_list_stats='$expanded_list_stats',contacts_enabled='$contacts_enabled',call_menu_qualify_enabled='$call_menu_qualify_enabled',admin_list_counts='$admin_list_counts',allow_voicemail_greeting='$allow_voicemail_greeting';";
$stmt="UPDATE system_settings set use_non_latin='$use_non_latin',webroot_writable='$webroot_writable',enable_queuemetrics_logging='$enable_queuemetrics_logging',queuemetrics_server_ip='$queuemetrics_server_ip',queuemetrics_dbname='$queuemetrics_dbname',queuemetrics_login='$queuemetrics_login',queuemetrics_pass='$queuemetrics_pass',queuemetrics_url='$queuemetrics_url',queuemetrics_log_id='$queuemetrics_log_id',queuemetrics_eq_prepend='$queuemetrics_eq_prepend',vicidial_agent_disable='$vicidial_agent_disable',allow_sipsak_messages='$allow_sipsak_messages',admin_home_url='$admin_home_url',enable_agc_xfer_log='$enable_agc_xfer_log',timeclock_end_of_day='$timeclock_end_of_day',vdc_header_date_format='$vdc_header_date_format',vdc_customer_date_format='$vdc_customer_date_format',vdc_header_phone_format='$vdc_header_phone_format',vdc_agent_api_active='$vdc_agent_api_active',enable_vtiger_integration='$enable_vtiger_integration',vtiger_server_ip='$vtiger_server_ip',vtiger_dbname='$vtiger_dbname',vtiger_login='$vtiger_login',vtiger_pass='$vtiger_pass',vtiger_url='$vtiger_url',qc_features_active='$qc_features_active',outbound_autodial_active='$outbound_autodial_active',outbound_calls_per_second='$outbound_calls_per_second',enable_tts_integration='$enable_tts_integration',agentonly_callback_campaign_lock='$agentonly_callback_campaign_lock',sounds_central_control_active='$sounds_central_control_active',sounds_web_server='$sounds_web_server',sounds_web_directory='$sounds_web_directory',active_voicemail_server='$active_voicemail_server',auto_dial_limit='$auto_dial_limit',user_territories_active='$user_territories_active',allow_custom_dialplan='$allow_custom_dialplan',enable_second_webform='$enable_second_webform',default_webphone='$default_webphone',default_external_server_ip='$default_external_server_ip',webphone_url='" . mysql_real_escape_string($webphone_url) . "',enable_agc_dispo_log='$enable_agc_dispo_log',custom_dialplan_entry='$custom_dialplan_entry',queuemetrics_loginout='$queuemetrics_loginout',callcard_enabled='$callcard_enabled',queuemetrics_callstatus='$queuemetrics_callstatus',default_codecs='$default_codecs',admin_web_directory='$admin_web_directory',label_title='$label_title',label_first_name='$label_first_name',label_middle_initial='$label_middle_initial',label_last_name='$label_last_name',label_address1='$label_address1',label_address2='$label_address2',label_address3='$label_address3',label_city='$label_city',label_state='$label_state',label_province='$label_province',label_postal_code='$label_postal_code',label_vendor_lead_code='$label_vendor_lead_code',label_gender='$label_gender',label_phone_number='$label_phone_number',label_phone_code='$label_phone_code',label_alt_phone='$label_alt_phone',label_security_phrase='$label_security_phrase',label_email='$label_email',label_comments='$label_comments',custom_fields_enabled='$custom_fields_enabled',slave_db_server='$slave_db_server',reports_use_slave_db='$reports_use_slave_db',webphone_systemkey='$webphone_systemkey',first_login_trigger='$first_login_trigger',default_phone_registration_password='$default_phone_registration_password',default_phone_login_password='$default_phone_login_password',default_server_password='$default_server_password',admin_modify_refresh='$admin_modify_refresh',nocache_admin='$nocache_admin',generate_cross_server_exten='$generate_cross_server_exten',queuemetrics_addmember_enabled='$queuemetrics_addmember_enabled',queuemetrics_dispo_pause='$queuemetrics_dispo_pause',label_hide_field_logs='$label_hide_field_logs',queuemetrics_pe_phone_append='$queuemetrics_pe_phone_append',test_campaign_calls='$test_campaign_calls',agents_calls_reset='$agents_calls_reset',default_voicemail_timezone='$default_voicemail_timezone',default_local_gmt='$default_local_gmt',noanswer_log='$noanswer_log',alt_log_server_ip='$alt_log_server_ip',alt_log_dbname='$alt_log_dbname',alt_log_login='$alt_log_login',alt_log_pass='$alt_log_pass',tables_use_alt_log_db='$tables_use_alt_log_db',did_agent_log='$did_agent_log',campaign_cid_areacodes_enabled='$campaign_cid_areacodes_enabled',pllb_grouping_limit='$pllb_grouping_limit',did_ra_extensions_enabled='$did_ra_extensions_enabled',expanded_list_stats='$expanded_list_stats',contacts_enabled='$contacts_enabled',call_menu_qualify_enabled='$call_menu_qualify_enabled',admin_list_counts='$admin_list_counts',allow_voicemail_greeting='$allow_voicemail_greeting',queuemetrics_socket='$queuemetrics_socket',queuemetrics_socket_url='$queuemetrics_socket_url';";
$rslt=mysql_query($stmt, $link);
if ($reload_dialplan_on_servers > 0)
@@ -29899,7 +29919,7 @@ if ($ADD==311111111111111)
$ALLagent_count = $rowx[2];
}
$stmt="SELECT version,install_date,use_non_latin,webroot_writable,enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_url,queuemetrics_log_id,queuemetrics_eq_prepend,vicidial_agent_disable,allow_sipsak_messages,admin_home_url,enable_agc_xfer_log,db_schema_version,auto_user_add_value,timeclock_end_of_day,timeclock_last_reset_date,vdc_header_date_format,vdc_customer_date_format,vdc_header_phone_format,vdc_agent_api_active,qc_last_pull_time,enable_vtiger_integration,vtiger_server_ip,vtiger_dbname,vtiger_login,vtiger_pass,vtiger_url,qc_features_active,outbound_autodial_active,outbound_calls_per_second,enable_tts_integration,agentonly_callback_campaign_lock,sounds_central_control_active,sounds_web_server,sounds_web_directory,active_voicemail_server,auto_dial_limit,user_territories_active,allow_custom_dialplan,db_schema_update_date,enable_second_webform,default_webphone,default_external_server_ip,webphone_url,enable_agc_dispo_log,custom_dialplan_entry,queuemetrics_loginout,callcard_enabled,queuemetrics_callstatus,default_codecs,admin_web_directory,label_title,label_first_name,label_middle_initial,label_last_name,label_address1,label_address2,label_address3,label_city,label_state,label_province,label_postal_code,label_vendor_lead_code,label_gender,label_phone_number,label_phone_code,label_alt_phone,label_security_phrase,label_email,label_comments,custom_fields_enabled,slave_db_server,reports_use_slave_db,webphone_systemkey,first_login_trigger,default_phone_registration_password,default_phone_login_password,default_server_password,admin_modify_refresh,nocache_admin,generate_cross_server_exten,queuemetrics_addmember_enabled,queuemetrics_dispo_pause,label_hide_field_logs,queuemetrics_pe_phone_append,test_campaign_calls,agents_calls_reset,default_voicemail_timezone,default_local_gmt,noanswer_log,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db,did_agent_log,campaign_cid_areacodes_enabled,pllb_grouping_limit,did_ra_extensions_enabled,expanded_list_stats,contacts_enabled,call_menu_qualify_enabled,admin_list_counts,allow_voicemail_greeting,svn_revision from system_settings;";
$stmt="SELECT version,install_date,use_non_latin,webroot_writable,enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_url,queuemetrics_log_id,queuemetrics_eq_prepend,vicidial_agent_disable,allow_sipsak_messages,admin_home_url,enable_agc_xfer_log,db_schema_version,auto_user_add_value,timeclock_end_of_day,timeclock_last_reset_date,vdc_header_date_format,vdc_customer_date_format,vdc_header_phone_format,vdc_agent_api_active,qc_last_pull_time,enable_vtiger_integration,vtiger_server_ip,vtiger_dbname,vtiger_login,vtiger_pass,vtiger_url,qc_features_active,outbound_autodial_active,outbound_calls_per_second,enable_tts_integration,agentonly_callback_campaign_lock,sounds_central_control_active,sounds_web_server,sounds_web_directory,active_voicemail_server,auto_dial_limit,user_territories_active,allow_custom_dialplan,db_schema_update_date,enable_second_webform,default_webphone,default_external_server_ip,webphone_url,enable_agc_dispo_log,custom_dialplan_entry,queuemetrics_loginout,callcard_enabled,queuemetrics_callstatus,default_codecs,admin_web_directory,label_title,label_first_name,label_middle_initial,label_last_name,label_address1,label_address2,label_address3,label_city,label_state,label_province,label_postal_code,label_vendor_lead_code,label_gender,label_phone_number,label_phone_code,label_alt_phone,label_security_phrase,label_email,label_comments,custom_fields_enabled,slave_db_server,reports_use_slave_db,webphone_systemkey,first_login_trigger,default_phone_registration_password,default_phone_login_password,default_server_password,admin_modify_refresh,nocache_admin,generate_cross_server_exten,queuemetrics_addmember_enabled,queuemetrics_dispo_pause,label_hide_field_logs,queuemetrics_pe_phone_append,test_campaign_calls,agents_calls_reset,default_voicemail_timezone,default_local_gmt,noanswer_log,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db,did_agent_log,campaign_cid_areacodes_enabled,pllb_grouping_limit,did_ra_extensions_enabled,expanded_list_stats,contacts_enabled,call_menu_qualify_enabled,admin_list_counts,allow_voicemail_greeting,svn_revision,queuemetrics_socket,queuemetrics_socket_url from system_settings;";
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$version = $row[0];
@@ -30011,6 +30031,8 @@ if ($ADD==311111111111111)
$admin_list_counts = $row[106];
$allow_voicemail_greeting = $row[107];
$svn_revision = $row[108];
$queuemetrics_socket = $row[109];
$queuemetrics_socket_url = $row[110];
echo "<br>MODIFY VICIDIAL SYSTEM SETTINGS<form action=$PHP_SELF method=POST>\n";
echo "<input type=hidden name=ADD value=411111111111111>\n";
@@ -30338,6 +30360,8 @@ if ($ADD==311111111111111)
echo "<tr bgcolor=#99FFCC><td align=right>QueueMetrics Addmember Enabled: </td><td align=left><select size=1 name=queuemetrics_addmember_enabled><option>1</option><option>0</option><option selected>$queuemetrics_addmember_enabled</option></select>$NWB#settings-queuemetrics_addmember_enabled$NWE</td></tr>\n";
echo "<tr bgcolor=#99FFCC><td align=right>QueueMetrics Dispo Pause Code: </td><td align=left><input type=text name=queuemetrics_dispo_pause size=8 maxlength=6 value=\"$queuemetrics_dispo_pause\">$NWB#settings-queuemetrics_dispo_pause$NWE</td></tr>\n";
echo "<tr bgcolor=#99FFCC><td align=right>QueueMetrics Phone Environment Phone Append: </td><td align=left><select size=1 name=queuemetrics_pe_phone_append><option>1</option><option>0</option><option selected>$queuemetrics_pe_phone_append</option></select>$NWB#settings-queuemetrics_pe_phone_append$NWE</td></tr>\n";
echo "<tr bgcolor=#99FFCC><td align=right>QueueMetrics Socket Send: </td><td align=left><select size=1 name=queuemetrics_socket><option>NONE</option><option>CONNECT_COMPLETE</option><option selected>$queuemetrics_socket</option></select>$NWB#settings-queuemetrics_socket$NWE</td></tr>\n";
echo "<tr bgcolor=#99FFCC><td align=right>QueueMetrics Socket Send URL: </td><td align=left><input type=text name=queuemetrics_socket_url size=60 maxlength=1000 value=\"$queuemetrics_socket_url\">$NWB#settings-queuemetrics_socket_url$NWE</td></tr>\n";
echo "<tr bgcolor=#CCFFFF><td align=right>Enable Vtiger Integration: </td><td align=left><select size=1 name=enable_vtiger_integration><option>1</option><option>0</option><option selected>$enable_vtiger_integration</option></select>$NWB#settings-enable_vtiger_integration$NWE\n";
echo " &nbsp; <a href=\"./vtiger_user.php\" target=\"_blank\">Click here to Synchronize users with Vtiger</a>\n";
+1 -1
View File
@@ -51,7 +51,7 @@ if($short_header)
?>
<TD> &nbsp; <A HREF="admin.php" ALT="Users"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B>Users</B></A> &nbsp; </TD>
<TD> &nbsp; <A HREF="admin.php?ADD=10" ALT="Campaigns"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B>Campaigns</B></A> &nbsp; </TD>
<?php include 'QC_header_include02.php'; ?>
<?php include 'qc/QC_header_include02.php'; ?>
<TD> &nbsp; <A HREF="admin.php?ADD=100" ALT="Lists"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B>Lists</B></A> &nbsp; </TD>
<TD> &nbsp; <A HREF="admin.php?ADD=1000000" ALT="Scripts"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B>Scripts</B></A> &nbsp; </TD>
<TD> &nbsp; <A HREF="admin.php?ADD=10000000" ALT="Filters"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B>Filters</B></A> &nbsp; </TD>