added option for 3way calling dial prefix to campaigns
added full mysql error logging to vicidial agent web interface git-svn-id: svn://192.168.202.10@995 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -210,6 +210,8 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom
|
||||
statistics to the agent performance detail report. Also added an option to
|
||||
force agents to enter a pause code(this is a campaign option)
|
||||
|
||||
47. Added full MySQL error logging to vicidial agent web interface. Logs are
|
||||
written to the webserver.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -87,6 +87,7 @@
|
||||
# 81020-0237 - Added term_reason logging for all possible exits of the script
|
||||
# 81021-2315 - Changed and add queue_log logging
|
||||
# 81024-0006 - Changed LOOKUP to insert new lead if phone_number < 3 digits, changed queue_sec calculation
|
||||
# 81104-0301 - Changed code to alter callerIDnumber for remote agents to the number of the caller
|
||||
#
|
||||
|
||||
$script = 'agi-VDAD_ALL_inbound.agi';
|
||||
@@ -1045,9 +1046,9 @@ if ($agent_search_method =~ /^SO|^LO/)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
|
||||
$VDADconf_exten = "$aryA[0]";
|
||||
$VDADuser = "$aryA[1]";
|
||||
$VDADextension = "$aryA[2]";
|
||||
$VDADconf_exten = "$aryA[0]";
|
||||
$VDADuser = "$aryA[1]";
|
||||
$VDADextension = "$aryA[2]";
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
@@ -1087,9 +1088,9 @@ if ($agent_search_method =~ /^SO|^LO/)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
|
||||
$VDADconf_exten = "$aryA[0]";
|
||||
$VDADuser = "$aryA[1]";
|
||||
$VDADextension = "$aryA[2]";
|
||||
$VDADconf_exten = "$aryA[0]";
|
||||
$VDADuser = "$aryA[1]";
|
||||
$VDADextension = "$aryA[2]";
|
||||
|
||||
$cbc++;
|
||||
}
|
||||
@@ -1188,6 +1189,21 @@ if ($agent_search_method =~ /^SO|^LO/)
|
||||
if ($min < 10) {$min = "0$min";}
|
||||
if ($sec < 10) {$sec = "0$sec";}
|
||||
|
||||
if ($VDADextension =~ /^R\//)
|
||||
{
|
||||
### set the callerid to the ACQS value(calleridname)
|
||||
## use these two lines for Asterisk 1.2 tree
|
||||
$newcallerid = "\"$callerid <$phone_number>\"";
|
||||
$AGI->set_callerid($newcallerid);
|
||||
## use these two lines for Asterisk 1.0 tree
|
||||
# print "SET CALLERID \"$calleridname\" <0000000000>\n";
|
||||
# print "SET CALLERIDNAME \"$calleridname\"\n";
|
||||
|
||||
print STDERR "Setting CID \"$newcallerid\"\n";
|
||||
checkresult($result);
|
||||
if ($AGILOG) {$agi_string = "callerID changed: \"$callerid\" \<$phone_number\>"; &agi_output;}
|
||||
}
|
||||
|
||||
$stmtA = "UPDATE vicidial_closer_log set queue_seconds='$drop_timer' where lead_id = '$insert_lead_id' and call_date='$SQLdate';";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG) {$agi_string = "-- VDCL vcl update: |$affected_rows|$insert_lead_id|$insert_close_id|\n|$stmtA|"; &agi_output;}
|
||||
@@ -1326,10 +1342,10 @@ if ($agent_search_method =~ /^LO|^LB/)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
|
||||
$VDADconf_exten = "$aryA[0]";
|
||||
$VDADuser = "$aryA[1]";
|
||||
$VDADextension = "$aryA[2]";
|
||||
$VDADserver_ip = "$aryA[3]";
|
||||
$VDADconf_exten = "$aryA[0]";
|
||||
$VDADuser = "$aryA[1]";
|
||||
$VDADextension = "$aryA[2]";
|
||||
$VDADserver_ip = "$aryA[3]";
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
@@ -1369,10 +1385,10 @@ if ($agent_search_method =~ /^LO|^LB/)
|
||||
while ($sthArows > $cbc)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$VDADconf_exten = "$aryA[0]";
|
||||
$VDADuser = "$aryA[1]";
|
||||
$VDADextension = "$aryA[2]";
|
||||
$VDADserver_ip = "$aryA[3]";
|
||||
$VDADconf_exten = "$aryA[0]";
|
||||
$VDADuser = "$aryA[1]";
|
||||
$VDADextension = "$aryA[2]";
|
||||
$VDADserver_ip = "$aryA[3]";
|
||||
$cbc++;
|
||||
}
|
||||
$sthA->finish();
|
||||
@@ -1480,6 +1496,21 @@ if ($agent_search_method =~ /^LO|^LB/)
|
||||
if ($min < 10) {$min = "0$min";}
|
||||
if ($sec < 10) {$sec = "0$sec";}
|
||||
|
||||
if ($VDADextension =~ /^R\//)
|
||||
{
|
||||
### set the callerid to the ACQS value(calleridname)
|
||||
## use these two lines for Asterisk 1.2 tree
|
||||
$newcallerid = "\"$callerid <$phone_number>\"";
|
||||
$AGI->set_callerid($newcallerid);
|
||||
## use these two lines for Asterisk 1.0 tree
|
||||
# print "SET CALLERID \"$calleridname\" <0000000000>\n";
|
||||
# print "SET CALLERIDNAME \"$calleridname\"\n";
|
||||
|
||||
print STDERR "Setting CID \"$newcallerid\"\n";
|
||||
checkresult($result);
|
||||
if ($AGILOG) {$agi_string = "callerID changed: \"$callerid\" \<$phone_number\>"; &agi_output;}
|
||||
}
|
||||
|
||||
$stmtA = "UPDATE vicidial_closer_log set queue_seconds='$drop_timer' where lead_id = '$insert_lead_id' and call_date='$SQLdate';";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG) {$agi_string = "-- VDCL vcl update: |$affected_rows|$insert_lead_id|\n|$stmtA|"; &agi_output;}
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
# 80831-0353 - Added logging of alt_dial field
|
||||
# 80909-0603 - Added campaign-specific dnc option for outbound survey
|
||||
# 81020-0235 - Fixed Drop hangup bug and other small bugs
|
||||
# 81104-0255 - Changed code to alter callerIDnumber for remote agents to the number of the caller
|
||||
#
|
||||
|
||||
$script = 'agi-VDAD_ALL_outbound.agi';
|
||||
@@ -907,9 +908,9 @@ if ($agent_search_method =~ /^SO|^LO/)
|
||||
while ($sthArows > $rec_count)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$VDADconf_exten = "$aryA[0]";
|
||||
$VDADuser = "$aryA[1]";
|
||||
$VDADextension = "$aryA[2]";
|
||||
$VDADconf_exten = "$aryA[0]";
|
||||
$VDADuser = "$aryA[1]";
|
||||
$VDADextension = "$aryA[2]";
|
||||
$rec_count++;
|
||||
}
|
||||
$sthA->finish();
|
||||
@@ -933,9 +934,9 @@ if ($agent_search_method =~ /^SO|^LO/)
|
||||
while ($sthArows > $rec_count)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$VDADconf_exten = "$aryA[0]";
|
||||
$VDADuser = "$aryA[1]";
|
||||
$VDADextension = "$aryA[2]";
|
||||
$VDADconf_exten = "$aryA[0]";
|
||||
$VDADuser = "$aryA[1]";
|
||||
$VDADextension = "$aryA[2]";
|
||||
$rec_count++;
|
||||
}
|
||||
$sthA->finish();
|
||||
@@ -944,6 +945,21 @@ if ($agent_search_method =~ /^SO|^LO/)
|
||||
}
|
||||
}
|
||||
|
||||
if ($VDADextension =~ /^R\//)
|
||||
{
|
||||
### set the callerid to the ACQS value(calleridname)
|
||||
## use these two lines for Asterisk 1.2 tree
|
||||
$newcallerid = "\"$calleridname <$VDADphone>\"";
|
||||
$AGI->set_callerid($newcallerid);
|
||||
## use these two lines for Asterisk 1.0 tree
|
||||
# print "SET CALLERID \"$calleridname\" <0000000000>\n";
|
||||
# print "SET CALLERIDNAME \"$calleridname\"\n";
|
||||
|
||||
print STDERR "Setting CID \"$newcallerid\"\n";
|
||||
checkresult($result);
|
||||
if ($AGILOG) {$agi_string = "callerID changed: \"$calleridname\" \<$VDADphone\>"; &agi_output;}
|
||||
}
|
||||
|
||||
$stmtA = "UPDATE vicidial_auto_calls set status='XFER', stage='XFER-$drop_timer' where callerid='$callerid';";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG) {$agi_string = "-- VDAD XFER : |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
|
||||
@@ -1059,10 +1075,10 @@ if ($rec_countWAITrem < $concurrent_transfers)
|
||||
while ($sthArows > $rec_count)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$VDADconf_exten = "$aryA[0]";
|
||||
$VDADuser = "$aryA[1]";
|
||||
$VDADextension = "$aryA[2]";
|
||||
$VDADserver_ip = "$aryA[3]";
|
||||
$VDADconf_exten = "$aryA[0]";
|
||||
$VDADuser = "$aryA[1]";
|
||||
$VDADextension = "$aryA[2]";
|
||||
$VDADserver_ip = "$aryA[3]";
|
||||
$rec_count++;
|
||||
}
|
||||
$sthA->finish();
|
||||
@@ -1086,10 +1102,10 @@ if ($rec_countWAITrem < $concurrent_transfers)
|
||||
while ($sthArows > $rec_count)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$VDADconf_exten = "$aryA[0]";
|
||||
$VDADuser = "$aryA[1]";
|
||||
$VDADextension = "$aryA[2]";
|
||||
$VDADserver_ip = "$aryA[3]";
|
||||
$VDADconf_exten = "$aryA[0]";
|
||||
$VDADuser = "$aryA[1]";
|
||||
$VDADextension = "$aryA[2]";
|
||||
$VDADserver_ip = "$aryA[3]";
|
||||
$rec_count++;
|
||||
}
|
||||
$sthA->finish();
|
||||
@@ -1102,6 +1118,21 @@ if ($rec_countWAITrem < $concurrent_transfers)
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG) {$agi_string = "-- VDAD XFER REMOTE: |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;}
|
||||
|
||||
if ($VDADextension =~ /^R\//)
|
||||
{
|
||||
### set the callerid to the ACQS value(calleridname)
|
||||
## use these two lines for Asterisk 1.2 tree
|
||||
$newcallerid = "\"$calleridname <$VDADphone>\"";
|
||||
$AGI->set_callerid($newcallerid);
|
||||
## use these two lines for Asterisk 1.0 tree
|
||||
# print "SET CALLERID \"$calleridname\" <0000000000>\n";
|
||||
# print "SET CALLERIDNAME \"$calleridname\"\n";
|
||||
|
||||
print STDERR "Setting CID \"$newcallerid\"\n";
|
||||
checkresult($result);
|
||||
if ($AGILOG) {$agi_string = "callerID changed: \"$calleridname\" \<$VDADphone\>"; &agi_output;}
|
||||
}
|
||||
|
||||
$dbhA->disconnect();
|
||||
|
||||
if ($enable_queuemetrics_logging > 0)
|
||||
|
||||
+18
-5
@@ -953,7 +953,7 @@ while($one_day_interval > 0)
|
||||
{
|
||||
if (length($KLserver_ip[$kill_vac]) > 7)
|
||||
{
|
||||
$end_epoch=0; $CLuniqueid=''; $start_epoch=0;
|
||||
$end_epoch=0; $CLuniqueid=''; $start_epoch=0; $CLlast_update_time=0;
|
||||
$KLcalleridCHECK[$kill_vac]=$KLcallerid[$kill_vac];
|
||||
$KLcalleridCHECK[$kill_vac] =~ s/\W//gi;
|
||||
|
||||
@@ -997,7 +997,7 @@ while($one_day_interval > 0)
|
||||
|
||||
$CLlead_id=''; $auto_call_id=''; $CLstatus=''; $CLcampaign_id=''; $CLphone_number=''; $CLphone_code='';
|
||||
|
||||
$stmtA = "SELECT auto_call_id,lead_id,phone_number,status,campaign_id,phone_code,alt_dial,stage,call_type FROM vicidial_auto_calls where callerid='$KLcallerid[$kill_vac]'";
|
||||
$stmtA = "SELECT auto_call_id,lead_id,phone_number,status,campaign_id,phone_code,alt_dial,stage,call_type,UNIX_TIMESTAMP(last_update_time) FROM vicidial_auto_calls where callerid='$KLcallerid[$kill_vac]'";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
@@ -1015,6 +1015,7 @@ while($one_day_interval > 0)
|
||||
$CLalt_dial = "$aryA[6]";
|
||||
$CLstage = "$aryA[7]";
|
||||
$CLcall_type = "$aryA[8]";
|
||||
$CLlast_update_time = "$aryA[9]";
|
||||
$rec_count++;
|
||||
}
|
||||
$sthA->finish();
|
||||
@@ -1089,7 +1090,7 @@ while($one_day_interval > 0)
|
||||
&event_logger;
|
||||
}
|
||||
|
||||
$stmtA = "UPDATE vicidial_live_agents set status='PAUSED',random_id='10' where callerid='$KLcallerid[$kill_vac]';";
|
||||
$stmtA = "UPDATE vicidial_live_agents set status='PAUSED',random_id='10' where callerid='$KLcallerid[$kill_vac]';";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
|
||||
$event_string = "| dead call vla agent PAUSED $affected_rows|$CLlead_id|$CLphone_number|$CLstatus|";
|
||||
@@ -1372,8 +1373,20 @@ while($one_day_interval > 0)
|
||||
}
|
||||
else
|
||||
{
|
||||
$event_string = "| dead call vac XFERd do nothing|$CLlead_id|$CLphone_number|$CLstatus|";
|
||||
&event_logger;
|
||||
if ( ($KLcallerid[$kill_vac] =~ /^M\d\d\d\d\d\d\d\d\d\d/) && ($CLlast_update_time < $TDtarget) )
|
||||
{
|
||||
$stmtA = "DELETE from vicidial_auto_calls where auto_call_id='$auto_call_id'";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
|
||||
$event_string = "| M dead call vac deleted|$auto_call_id|$CLlead_id|$KLcallerid[$kill_vac]|$end_epoch|$affected_rows|$KLchannel[$kill_vac]|$CLcall_type|$CLlast_update_time < $XDtarget|";
|
||||
&event_logger;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$event_string = "| dead call vac XFERd do nothing|$CLlead_id|$CLphone_number|$CLstatus|";
|
||||
&event_logger;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -147,6 +147,12 @@ exten => _9727NXXXXXX,3,Hangup
|
||||
exten => _91NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
|
||||
exten => _91NXXNXXXXXX,2,Dial(${TRUNKX}/${EXTEN:1},,To)
|
||||
exten => _91NXXNXXXXXX,3,Hangup
|
||||
|
||||
; This is a loopback dialaround to allow for hearing of ringing for 3way calls
|
||||
exten => _881NXXNXXXXXX,1,Answer
|
||||
exten => _881NXXNXXXXXX,2,Dial(${TRUNKloop}/9${EXTEN:2},,To)
|
||||
exten => _881NXXNXXXXXX,3,Hangup
|
||||
|
||||
; dial a long distance outbound number through BINFONE
|
||||
; exten => _91NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
|
||||
; exten => _91NXXNXXXXXX,2,Dial(${TRUNKIAX}/${EXTEN:1},55,To)
|
||||
|
||||
@@ -147,6 +147,12 @@ exten => _9727NXXXXXX,3,Hangup
|
||||
exten => _91NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
|
||||
exten => _91NXXNXXXXXX,2,Dial(${TRUNKX}/${EXTEN:1},,To)
|
||||
exten => _91NXXNXXXXXX,3,Hangup
|
||||
|
||||
; This is a loopback dialaround to allow for hearing of ringing for 3way calls
|
||||
exten => _881NXXNXXXXXX,1,Answer
|
||||
exten => _881NXXNXXXXXX,2,Dial(${TRUNKloop}/9${EXTEN:2},,To)
|
||||
exten => _881NXXNXXXXXX,3,Hangup
|
||||
|
||||
; dial a long distance outbound number through BINFONE
|
||||
; exten => _91NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
|
||||
; exten => _91NXXNXXXXXX,2,Dial(${TRUNKIAX}/${EXTEN:1},55,To)
|
||||
|
||||
@@ -594,7 +594,8 @@ manual_dial_filter VARCHAR(50) default 'NONE',
|
||||
agent_clipboard_copy VARCHAR(50) default 'NONE',
|
||||
agent_extended_alt_dial ENUM('Y','N') default 'N',
|
||||
use_campaign_dnc ENUM('Y','N') default 'N',
|
||||
three_way_call_cid ENUM('CAMPAIGN','CUSTOMER','AGENT_PHONE') default 'CAMPAIGN'
|
||||
three_way_call_cid ENUM('CAMPAIGN','CUSTOMER','AGENT_PHONE') default 'CAMPAIGN',
|
||||
three_way_dial_prefix VARCHAR(20) default ''
|
||||
);
|
||||
|
||||
CREATE TABLE vicidial_lists (
|
||||
@@ -1345,7 +1346,7 @@ CREATE INDEX phone_number on vicidial_xfer_log (phone_number);
|
||||
CREATE INDEX phone_number on vicidial_closer_log (phone_number);
|
||||
CREATE INDEX date_user on vicidial_closer_log (call_date,user);
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1115';
|
||||
UPDATE system_settings SET db_schema_version='1116';
|
||||
|
||||
GRANT RELOAD ON *.* TO cron@'%';
|
||||
GRANT RELOAD ON *.* TO cron@localhost;
|
||||
|
||||
@@ -522,3 +522,7 @@ UPDATE system_settings SET db_schema_version='1114';
|
||||
ALTER TABLE vicidial_campaigns MODIFY agent_pause_codes_active ENUM('Y','N','FORCE') default 'N';
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1115';
|
||||
|
||||
ALTER TABLE vicidial_campaigns ADD three_way_dial_prefix VARCHAR(20) default '';
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1116';
|
||||
|
||||
@@ -334,6 +334,8 @@ To disable the On Hold Prompt, set the interval to 0||
|
||||
3-Way Call Outbound CallerID:||
|
||||
INBOUND_MAN allows the agent to place manual dial calls from a campaign list while being able to take inbound calls between manual dial calls||
|
||||
FORCE will force the agents to choose a PAUSE code if they click on the PAUSE button||
|
||||
3-Way Call Dial Prefix -<\/B> This defines what is used as the dial prefix for 3-way calls, default is empty so the campaign dial prefix is used, passthru so you can hear ringing is 88||
|
||||
3-Way Call Dial Prefix||
|
||||
|
||||
|
||||
############################################################ CLIENT
|
||||
|
||||
@@ -38,8 +38,14 @@
|
||||
# 80424-0442 - Added non_latin lookup from system_settings
|
||||
# 80519-1425 - Added calls-in-queue tally
|
||||
# 80703-1106 - Added API functionality for Hangup and Dispo
|
||||
# 81104-0229 - Added mysql error logging capability
|
||||
#
|
||||
|
||||
$version = '2.0.4-14';
|
||||
$build = '81104-0229';
|
||||
$mysql_error_logging=1;
|
||||
$mysql_log_count=13;
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
### If you have globals turned off uncomment these lines
|
||||
@@ -75,6 +81,7 @@ header ("Pragma: no-cache"); // HTTP/1.0
|
||||
##### START SYSTEM_SETTINGS LOOKUP #####
|
||||
$stmt = "SELECT use_non_latin FROM system_settings;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'03001',$VD_login,$server_ip,$session_name);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$qm_conf_ct = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
@@ -102,8 +109,6 @@ $Alogin='N';
|
||||
$RingCalls='N';
|
||||
$DiaLCalls='N';
|
||||
|
||||
$version = '2.0.4-12';
|
||||
$build = '71122-0205';
|
||||
$StarTtime = date("U");
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
@@ -116,6 +121,7 @@ $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' a
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'03002',$VD_login,$server_ip,$session_name);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
@@ -137,6 +143,7 @@ $auth=$row[0];
|
||||
$stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'03002',$VD_login,$server_ip,$session_name);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$SNauth=$row[0];
|
||||
if($SNauth==0)
|
||||
@@ -185,6 +192,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
$stmt="SELECT count(*) from vicidial_live_agents where user='$user' and server_ip='$server_ip';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'03003',$VD_login,$server_ip,$session_name);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$Acount=$row[0];
|
||||
|
||||
@@ -193,6 +201,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
$stmt="SELECT status from vicidial_live_agents where user='$user' and server_ip='$server_ip';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'03004',$VD_login,$server_ip,$session_name);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$Astatus=$row[0];
|
||||
}
|
||||
@@ -209,6 +218,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
$stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'03005',$VD_login,$server_ip,$session_name);}
|
||||
|
||||
if ($campagentstdisp == 'YES')
|
||||
{
|
||||
@@ -216,6 +226,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
$stmt="SELECT status,campaign_id,closer_campaigns from vicidial_live_agents where user='$user' and server_ip='$server_ip';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'03006',$VD_login,$server_ip,$session_name);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$Alogin=$row[0];
|
||||
$Acampaign=$row[1];
|
||||
@@ -227,6 +238,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
$stmt="SELECT count(*) from vicidial_auto_calls where status IN('LIVE') and ( (campaign_id='$Acampaign') or (campaign_id IN('$AccampSQL')) );";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'03007',$VD_login,$server_ip,$session_name);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$RingCalls=$row[0];
|
||||
if ($RingCalls > 0) {$RingCalls = "<font class=\"queue_text_red\">Calls in Queue: $RingCalls</font>";}
|
||||
@@ -236,6 +248,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
$stmt="SELECT count(*) from vicidial_auto_calls where status NOT IN('XFER') and ( (campaign_id='$Acampaign') or (campaign_id IN('$AccampSQL')) );";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'03008',$VD_login,$server_ip,$session_name);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$DiaLCalls=$row[0];
|
||||
|
||||
@@ -257,6 +270,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
$stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'03009',$VD_login,$server_ip,$session_name);}
|
||||
|
||||
}
|
||||
|
||||
@@ -264,6 +278,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
$stmt="SELECT external_hangup,external_status from vicidial_live_agents where user='$user' and server_ip='$server_ip';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'03010',$VD_login,$server_ip,$session_name);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$external_hangup = $row[0];
|
||||
$external_status = $row[1];
|
||||
@@ -279,6 +294,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'03011',$VD_login,$server_ip,$session_name);}
|
||||
if ($rslt) {$sip_list = mysql_num_rows($rslt);}
|
||||
# echo "$sip_list|";
|
||||
$loop_count=0;
|
||||
@@ -292,6 +308,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and extension = '$conf_exten';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'03012',$VD_login,$server_ip,$session_name);}
|
||||
if ($rslt) {$channels_list = mysql_num_rows($rslt);}
|
||||
# echo "$channels_list|";
|
||||
$loop_count=0;
|
||||
@@ -334,6 +351,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
$stmt="UPDATE conferences set extension='$exten' where server_ip = '$server_ip' and conf_exten = '$conf_exten';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'03013',$VD_login,$server_ip,$session_name);}
|
||||
}
|
||||
echo "Conference $conf_exten has been registered to $exten\n";
|
||||
}
|
||||
@@ -350,4 +368,24 @@ if ($format=='debug')
|
||||
|
||||
exit;
|
||||
|
||||
|
||||
##### MySQL Error Logging #####
|
||||
function mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,$query_id,$user,$server_ip,$session_name)
|
||||
{
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
# mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'00001',$user,$server_ip,$session_name);
|
||||
$errno=''; $error='';
|
||||
if ($mysql_error_logging > 0)
|
||||
{
|
||||
$errno = mysql_errno($link);
|
||||
if ( ($errno > 0) or ($mysql_error_logging > 1) )
|
||||
{
|
||||
$error = mysql_error($link);
|
||||
$efp = fopen ("./vicidial_mysql_errors.txt", "a");
|
||||
fwrite ($efp, "$NOW_TIME|conf_check |$query_id|$errno|$error|$stmt|$user|$server_ip|$session_name|\n");
|
||||
fclose($efp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
+107
-7
@@ -77,8 +77,14 @@
|
||||
# 80915-1755 - Rewrote leave-3way functions for external calling
|
||||
# 81011-1404 - Fixed bugs in leave3way when transferring a manual dial call
|
||||
# 81020-1459 - Fixed bugs in queue_log logging
|
||||
# 81104-0203 - Added mysql error logging capability
|
||||
#
|
||||
|
||||
$version = '2.0.5-35';
|
||||
$build = '81104-0203';
|
||||
$mysql_error_logging=1;
|
||||
$mysql_log_count=82;
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
### These are variable assignments for PHP globals off
|
||||
@@ -161,6 +167,7 @@ header ("Pragma: no-cache"); // HTTP/1.0
|
||||
##### START SYSTEM_SETTINGS LOOKUP #####
|
||||
$stmt = "SELECT use_non_latin FROM system_settings;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02001',$VD_login,$server_ip,$session_name);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$qm_conf_ct = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
@@ -185,8 +192,6 @@ if (!isset($ACTION)) {$ACTION="Originate";}
|
||||
if (!isset($format)) {$format="alert";}
|
||||
if (!isset($ext_priority)) {$ext_priority="1";}
|
||||
|
||||
$version = '2.0.5-34';
|
||||
$build = '81020-1459';
|
||||
$StarTtime = date("U");
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
@@ -197,6 +202,7 @@ $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' a
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02002',$VD_login,$server_ip,$session_name);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
@@ -218,6 +224,7 @@ $auth=$row[0];
|
||||
$stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02003',$VD_login,$server_ip,$session_name);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$SNauth=$row[0];
|
||||
if($SNauth==0)
|
||||
@@ -267,6 +274,7 @@ if ($ACTION=="SysCIDOriginate")
|
||||
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $queryCID','','','','','');";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02004',$VD_login,$server_ip,$session_name);}
|
||||
echo "Originate command sent for Exten $exten Channel $channel on $server_ip\n";
|
||||
}
|
||||
}
|
||||
@@ -294,6 +302,7 @@ if ($ACTION=="OriginateName")
|
||||
$stmt="SELECT dialplan_number FROM phones where server_ip = '$server_ip' and extension='$extenName';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02005',$VD_login,$server_ip,$session_name);}
|
||||
$name_count = mysql_num_rows($rslt);
|
||||
if ($name_count>0)
|
||||
{
|
||||
@@ -323,6 +332,7 @@ if ($ACTION=="OriginateNameVmail")
|
||||
$stmt="SELECT voicemail_id FROM phones where server_ip = '$server_ip' and extension='$extenName';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02006',$VD_login,$server_ip,$session_name);}
|
||||
$name_count = mysql_num_rows($rslt);
|
||||
if ($name_count>0)
|
||||
{
|
||||
@@ -363,6 +373,7 @@ if ($ACTION=="Originate")
|
||||
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $outCID','','','','','');";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02007',$VD_login,$server_ip,$session_name);}
|
||||
echo "Originate command sent for Exten $exten Channel $channel on $server_ip\n";
|
||||
}
|
||||
}
|
||||
@@ -390,12 +401,14 @@ if ($ACTION=="HangupConfDial")
|
||||
$stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02008',$VD_login,$server_ip,$session_name);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if ($row > 0)
|
||||
{
|
||||
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02009',$VD_login,$server_ip,$session_name);}
|
||||
$rowx=mysql_fetch_row($rslt);
|
||||
$channel=$rowx[0];
|
||||
$ACTION="Hangup";
|
||||
@@ -414,6 +427,7 @@ if ($ACTION=="Hangup")
|
||||
$stmt="UPDATE vicidial_live_agents SET external_hangup='0' where user='$user';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02010',$VD_login,$server_ip,$session_name);}
|
||||
|
||||
$row=''; $rowx='';
|
||||
$channel_live=1;
|
||||
@@ -447,6 +461,7 @@ $rslt=mysql_query($stmt, $link);
|
||||
$stmt="SELECT count(*) FROM vicidial_auto_calls where channel='$channel' and callerid='$CalLCID';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02011',$VD_login,$server_ip,$session_name);}
|
||||
$rowx=mysql_fetch_row($rslt);
|
||||
if ($rowx[0]==0)
|
||||
{
|
||||
@@ -455,6 +470,7 @@ $rslt=mysql_query($stmt, $link);
|
||||
$stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel' and extension LIKE \"%$exten\";";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02012',$VD_login,$server_ip,$session_name);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if ($row[0]==0)
|
||||
{
|
||||
@@ -474,6 +490,7 @@ $rslt=mysql_query($stmt, $link);
|
||||
{
|
||||
$stmt="SELECT count(*) FROM vicidial_auto_calls where callerid='$CalLCID';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02013',$VD_login,$server_ip,$session_name);}
|
||||
$rowx=mysql_fetch_row($rslt);
|
||||
if ($format=='debug') {echo "\n<!-- $rowx[0]|$stmt -->";}
|
||||
if ($rowx[0] > 0)
|
||||
@@ -482,6 +499,7 @@ $rslt=mysql_query($stmt, $link);
|
||||
##### START QUEUEMETRICS LOGGING LOOKUP #####
|
||||
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02014',$VD_login,$server_ip,$session_name);}
|
||||
if ($format=='debug') {echo "\n<!-- $rowx[0]|$stmt -->";}
|
||||
$qm_conf_ct = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
@@ -505,6 +523,7 @@ $rslt=mysql_query($stmt, $link);
|
||||
|
||||
$stmt="SELECT count(*) from queue_log where call_id='$CalLCID' and verb='CONNECT';";
|
||||
$rslt=mysql_query($stmt, $linkB);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$linkB,$mysql_error_logging,$stmt,'02015',$VD_login,$server_ip,$session_name);}
|
||||
$VAC_cn_ct = mysql_num_rows($rslt);
|
||||
if ($VAC_cn_ct > 0)
|
||||
{
|
||||
@@ -517,6 +536,7 @@ $rslt=mysql_query($stmt, $link);
|
||||
### grab call lead information needed for QM logging
|
||||
$stmt="SELECT auto_call_id,lead_id,phone_number,status,campaign_id,phone_code,alt_dial,stage,callerid,uniqueid from vicidial_auto_calls where callerid='$CalLCID' order by call_time limit 1;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02016',$VD_login,$server_ip,$session_name);}
|
||||
$VAC_qm_ct = mysql_num_rows($rslt);
|
||||
if ($VAC_qm_ct > 0)
|
||||
{
|
||||
@@ -539,6 +559,7 @@ $rslt=mysql_query($stmt, $link);
|
||||
|
||||
$stmt="SELECT count(*) from queue_log where call_id='$CalLCID' and verb='COMPLETECALLER' and queue='$CLcampaign_id';";
|
||||
$rslt=mysql_query($stmt, $linkB);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$linkB,$mysql_error_logging,$stmt,'02017',$VD_login,$server_ip,$session_name);}
|
||||
$VAC_cc_ct = mysql_num_rows($rslt);
|
||||
if ($VAC_cc_ct > 0)
|
||||
{
|
||||
@@ -552,6 +573,7 @@ $rslt=mysql_query($stmt, $link);
|
||||
$time_id=0;
|
||||
$stmt="SELECT time_id from queue_log where call_id='$CalLCID' and verb='ENTERQUEUE' and queue='$CLcampaign_id';";
|
||||
$rslt=mysql_query($stmt, $linkB);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$linkB,$mysql_error_logging,$stmt,'02018',$VD_login,$server_ip,$session_name);}
|
||||
$VAC_eq_ct = mysql_num_rows($rslt);
|
||||
if ($VAC_eq_ct > 0)
|
||||
{
|
||||
@@ -565,6 +587,7 @@ $rslt=mysql_query($stmt, $link);
|
||||
if ($format=='debug') {echo "\n<!-- $caller_complete|$stmt -->";}
|
||||
$stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$CalLCID',queue='$CLcampaign_id',agent='Agent/$user',verb='COMPLETEAGENT',data1='$CLstage',data2='$secondS',data3='1',serverid='$queuemetrics_log_id';";
|
||||
$rslt=mysql_query($stmt, $linkB);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$linkB,$mysql_error_logging,$stmt,'02019',$VD_login,$server_ip,$session_name);}
|
||||
$affected_rows = mysql_affected_rows($linkB);
|
||||
if ($format=='debug') {echo "\n<!-- $affected_rows|$stmt -->";}
|
||||
}
|
||||
@@ -576,6 +599,7 @@ $rslt=mysql_query($stmt, $link);
|
||||
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Hangup','$queryCID','Channel: $channel','','','','','','','','','');";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02020',$VD_login,$server_ip,$session_name);}
|
||||
echo "Hangup command sent for Channel $channel on $call_server_ip\n";
|
||||
}
|
||||
}
|
||||
@@ -610,24 +634,28 @@ if ($ACTION=="RedirectVD")
|
||||
$stmt = "select count(*) from vicidial_campaigns where campaign_id='$campaign' and campaign_allow_inbound='Y';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02021',$VD_login,$server_ip,$session_name);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if ($row[0] > 0)
|
||||
{
|
||||
$stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where lead_id='$lead_id' order by start_epoch desc limit 1;";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02022',$VD_login,$server_ip,$session_name);}
|
||||
}
|
||||
if ($auto_dial_level < 1)
|
||||
{
|
||||
$stmt = "UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where uniqueid='$uniqueid';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02023',$VD_login,$server_ip,$session_name);}
|
||||
}
|
||||
else
|
||||
{
|
||||
$stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02024',$VD_login,$server_ip,$session_name);}
|
||||
}
|
||||
$ACTION="Redirect";
|
||||
}
|
||||
@@ -654,6 +682,7 @@ if ($ACTION=="RedirectToPark")
|
||||
$stmt = "INSERT INTO parked_channels values('$channel','$server_ip','','$extenName','$parkedby','$NOW_TIME');";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02025',$VD_login,$server_ip,$session_name);}
|
||||
$ACTION="Redirect";
|
||||
}
|
||||
}
|
||||
@@ -677,6 +706,7 @@ if ($ACTION=="RedirectFromPark")
|
||||
$stmt = "DELETE FROM parked_channels where server_ip='$server_ip' and channel='$channel';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02026',$VD_login,$server_ip,$session_name);}
|
||||
$ACTION="Redirect";
|
||||
}
|
||||
}
|
||||
@@ -699,6 +729,7 @@ if ($ACTION=="RedirectName")
|
||||
$stmt="SELECT dialplan_number FROM phones where server_ip = '$server_ip' and extension='$extenName';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02027',$VD_login,$server_ip,$session_name);}
|
||||
$name_count = mysql_num_rows($rslt);
|
||||
if ($name_count>0)
|
||||
{
|
||||
@@ -728,6 +759,7 @@ if ($ACTION=="RedirectNameVmail")
|
||||
$stmt="SELECT voicemail_id FROM phones where server_ip = '$server_ip' and extension='$extenName';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02028',$VD_login,$server_ip,$session_name);}
|
||||
$name_count = mysql_num_rows($rslt);
|
||||
if ($name_count>0)
|
||||
{
|
||||
@@ -778,16 +810,19 @@ if ($ACTION=="RedirectXtraCXNeW")
|
||||
$stmtA="SELECT count(*) FROM vicidial_conferences where server_ip='$server_ip' and ((extension='') or (extension is null)) and conf_exten != '$session_id';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmtA -->";}
|
||||
$rslt=mysql_query($stmtA, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmtA,'02029',$VD_login,$server_ip,$session_name);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if ($row[0] > 1)
|
||||
{
|
||||
$stmtB="UPDATE vicidial_conferences set extension='$protocol/$extension$NOWnum', leave_3way='0' where server_ip='$server_ip' and ((extension='') or (extension is null)) and conf_exten != '$session_id' limit 1;";
|
||||
if ($format=='debug') {echo "\n<!-- $stmtB -->";}
|
||||
$rslt=mysql_query($stmtB, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmtB,'02030',$VD_login,$server_ip,$session_name);}
|
||||
|
||||
$stmtC="SELECT conf_exten from vicidial_conferences where server_ip='$server_ip' and extension='$protocol/$extension$NOWnum' and conf_exten != '$session_id';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmtC -->";}
|
||||
$rslt=mysql_query($stmtC, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmtC,'02031',$VD_login,$server_ip,$session_name);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$exten = $row[0];
|
||||
|
||||
@@ -799,25 +834,30 @@ if ($ACTION=="RedirectXtraCXNeW")
|
||||
$stmtD="UPDATE vicidial_conferences set extension='$protocol/$extension' where server_ip='$server_ip' and conf_exten='$exten' limit 1;";
|
||||
if ($format=='debug') {echo "\n<!-- $stmtD -->";}
|
||||
$rslt=mysql_query($stmtD, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmtD,'02032',$VD_login,$server_ip,$session_name);}
|
||||
|
||||
$stmtE="UPDATE vicidial_conferences set leave_3way='1', leave_3way_datetime='$NOW_TIME', extension='3WAY_$user' where server_ip='$server_ip' and conf_exten='$session_id';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmtE -->";}
|
||||
$rslt=mysql_query($stmtE, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmtE,'02033',$VD_login,$server_ip,$session_name);}
|
||||
|
||||
$queryCID = "CXAR24$NOWnum";
|
||||
$stmtF="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $agentchannel','Context: $ext_context','Exten: $exten','Priority: 1','CallerID: $queryCID','','','','','');";
|
||||
if ($format=='debug') {echo "\n<!-- $stmtF -->";}
|
||||
$rslt=mysql_query($stmtF, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmtF,'02034',$VD_login,$server_ip,$session_name);}
|
||||
|
||||
$stmtG="UPDATE vicidial_live_agents set conf_exten='$exten' where server_ip='$server_ip' and user='$user';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmtG -->";}
|
||||
$rslt=mysql_query($stmtG, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmtG,'02035',$VD_login,$server_ip,$session_name);}
|
||||
|
||||
if ($auto_dial_level < 1)
|
||||
{
|
||||
$stmtH = "DELETE from vicidial_auto_calls where lead_id='$lead_id' and callerid LIKE \"M%\";";
|
||||
if ($format=='debug') {echo "\n<!-- $stmtH -->";}
|
||||
$rslt=mysql_query($stmtH, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmtH,'02036',$VD_login,$server_ip,$session_name);}
|
||||
}
|
||||
|
||||
// $fp = fopen ("./vicidial_debug_3way.txt", "a");
|
||||
@@ -842,12 +882,14 @@ if ($ACTION=="RedirectXtraCXNeW")
|
||||
$stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02037',$VD_login,$server_ip,$session_name);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if ($row[0]==0)
|
||||
{
|
||||
$stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02038',$VD_login,$server_ip,$session_name);}
|
||||
$rowx=mysql_fetch_row($rslt);
|
||||
if ($rowx[0]==0)
|
||||
{
|
||||
@@ -859,12 +901,14 @@ if ($ACTION=="RedirectXtraCXNeW")
|
||||
$stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02039',$VD_login,$server_ip,$session_name);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if ($row[0]==0)
|
||||
{
|
||||
$stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$extrachannel';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02040',$VD_login,$server_ip,$session_name);}
|
||||
$rowx=mysql_fetch_row($rslt);
|
||||
if ($rowx[0]==0)
|
||||
{
|
||||
@@ -878,6 +922,7 @@ if ($ACTION=="RedirectXtraCXNeW")
|
||||
$stmt="SELECT count(*) FROM vicidial_live_agents where lead_id='$lead_id' and user!='$user';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02041',$VD_login,$server_ip,$session_name);}
|
||||
$rowx=mysql_fetch_row($rslt);
|
||||
if ($rowx[0] < 1)
|
||||
{
|
||||
@@ -890,6 +935,7 @@ if ($ACTION=="RedirectXtraCXNeW")
|
||||
$stmt="SELECT server_ip,conf_exten,user FROM vicidial_live_agents where lead_id='$lead_id' and user!='$user';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02042',$VD_login,$server_ip,$session_name);}
|
||||
$rowx=mysql_fetch_row($rslt);
|
||||
$dest_server_ip = $rowx[0];
|
||||
$dest_session_id = $rowx[1];
|
||||
@@ -910,10 +956,12 @@ if ($ACTION=="RedirectXtraCXNeW")
|
||||
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $dest_dialstring','Priority: $ext_priority','CallerID: $queryCID','','','','','');";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02043',$VD_login,$server_ip,$session_name);}
|
||||
|
||||
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','$queryCID','Channel: $extrachannel','','','','','','','','','');";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02044',$VD_login,$server_ip,$session_name);}
|
||||
|
||||
echo "RedirectXtraCX command sent for Channel $channel on $call_server_ip and \nHungup $extrachannel on $server_ip\n";
|
||||
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel on $call_server_ip, Hungup $extrachannel on $server_ip";}
|
||||
@@ -989,41 +1037,49 @@ if ($ACTION=="RedirectXtraNeW")
|
||||
$stmt="SELECT count(*) FROM vicidial_conferences where server_ip='$server_ip' and ((extension='') or (extension is null)) and conf_exten != '$session_id';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02045',$VD_login,$server_ip,$session_name);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if ($row[0] > 1)
|
||||
{
|
||||
$stmt="UPDATE vicidial_conferences set extension='$protocol/$extension$NOWnum', leave_3way='0' where server_ip='$server_ip' and ((extension='') or (extension is null)) and conf_exten != '$session_id' limit 1;";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02046',$VD_login,$server_ip,$session_name);}
|
||||
|
||||
$stmt="SELECT conf_exten from vicidial_conferences where server_ip='$server_ip' and extension='$protocol/$extension$NOWnum' and conf_exten != '$session_id';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02047',$VD_login,$server_ip,$session_name);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$exten = $row[0];
|
||||
|
||||
$stmt="UPDATE vicidial_conferences set extension='$protocol/$extension' where server_ip='$server_ip' and conf_exten='$exten' limit 1;";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02048',$VD_login,$server_ip,$session_name);}
|
||||
|
||||
$stmt="UPDATE vicidial_conferences set leave_3way='1', leave_3way_datetime='$NOW_TIME', extension='3WAY_$user' where server_ip='$server_ip' and conf_exten='$session_id';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02049',$VD_login,$server_ip,$session_name);}
|
||||
|
||||
$queryCID = "CXAR23$NOWnum";
|
||||
$stmtB="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $agentchannel','Context: $ext_context','Exten: $exten','Priority: 1','CallerID: $queryCID','','','','','');";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmtB, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02050',$VD_login,$server_ip,$session_name);}
|
||||
|
||||
$stmt="UPDATE vicidial_live_agents set conf_exten='$exten' where server_ip='$server_ip' and user='$user';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02051',$VD_login,$server_ip,$session_name);}
|
||||
|
||||
if ($auto_dial_level < 1)
|
||||
{
|
||||
$stmt = "DELETE from vicidial_auto_calls where lead_id='$lead_id' and callerid LIKE \"M%\";";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02052',$VD_login,$server_ip,$session_name);}
|
||||
}
|
||||
|
||||
echo "NeWSessioN|$exten|\n";
|
||||
@@ -1044,12 +1100,14 @@ if ($ACTION=="RedirectXtraNeW")
|
||||
$stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02053',$VD_login,$server_ip,$session_name);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if ( ($row[0]==0) && (!ereg("SECOND",$filename)) )
|
||||
{
|
||||
$stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02054',$VD_login,$server_ip,$session_name);}
|
||||
$rowx=mysql_fetch_row($rslt);
|
||||
if ($rowx[0]==0)
|
||||
{
|
||||
@@ -1061,12 +1119,14 @@ if ($ACTION=="RedirectXtraNeW")
|
||||
$stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02055',$VD_login,$server_ip,$session_name);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if ( ($row[0]==0) && (!ereg("SECOND",$filename)) )
|
||||
{
|
||||
$stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$extrachannel';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02056',$VD_login,$server_ip,$session_name);}
|
||||
$rowx=mysql_fetch_row($rslt);
|
||||
if ($rowx[0]==0)
|
||||
{
|
||||
@@ -1082,6 +1142,7 @@ if ($ACTION=="RedirectXtraNeW")
|
||||
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $channel','ExtraChannel: $extrachannel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','');";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02057',$VD_login,$server_ip,$session_name);}
|
||||
|
||||
echo "RedirectXtra command sent for Channel $channel and \nExtraChannel $extrachannel\n to $exten on $server_ip\n";
|
||||
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel and $extrachannel to $exten on $server_ip";}
|
||||
@@ -1103,10 +1164,12 @@ if ($ACTION=="RedirectXtraNeW")
|
||||
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $dest_dialstring','Priority: $ext_priority','CallerID: $queryCID','','','','','');";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02058',$VD_login,$server_ip,$session_name);}
|
||||
|
||||
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $extrachannel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','','');";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02059',$VD_login,$server_ip,$session_name);}
|
||||
|
||||
echo "RedirectXtra command sent for Channel $channel on $call_server_ip and \nExtraChannel $extrachannel\n to $exten on $server_ip\n";
|
||||
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel/$call_server_ip and $extrachannel/$server_ip to $exten";}
|
||||
@@ -1443,12 +1506,14 @@ if ($ACTION=="Redirect")
|
||||
$stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02060',$VD_login,$server_ip,$session_name);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if ($row > 0)
|
||||
{
|
||||
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02061',$VD_login,$server_ip,$session_name);}
|
||||
$rowx=mysql_fetch_row($rslt);
|
||||
$channel=$rowx[0];
|
||||
$channel = eregi_replace("1$","2",$channel);
|
||||
@@ -1475,12 +1540,14 @@ if ($ACTION=="Redirect")
|
||||
$stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$channel';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02062',$VD_login,$server_ip,$session_name);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if ($row[0]==0)
|
||||
{
|
||||
$stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$channel';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02063',$VD_login,$server_ip,$session_name);}
|
||||
$rowx=mysql_fetch_row($rslt);
|
||||
if ($rowx[0]==0)
|
||||
{
|
||||
@@ -1493,6 +1560,7 @@ if ($ACTION=="Redirect")
|
||||
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','','');";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02064',$VD_login,$server_ip,$session_name);}
|
||||
|
||||
echo "Redirect command sent for Channel $channel on $server_ip\n";
|
||||
}
|
||||
@@ -1523,12 +1591,14 @@ if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") )
|
||||
$stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$channel';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02065',$VD_login,$server_ip,$session_name);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if ($row[0]==0)
|
||||
{
|
||||
$stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$channel';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02066',$VD_login,$server_ip,$session_name);}
|
||||
$rowx=mysql_fetch_row($rslt);
|
||||
if ($rowx[0]==0)
|
||||
{
|
||||
@@ -1541,15 +1611,18 @@ if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") )
|
||||
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','$ACTION','$queryCID','Channel: $channel','$SQLfile','','','','','','','','');";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02067',$VD_login,$server_ip,$session_name);}
|
||||
|
||||
if ($ACTION=="Monitor")
|
||||
{
|
||||
$stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename','$lead_id','$user')";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02068',$VD_login,$server_ip,$session_name);}
|
||||
|
||||
$stmt="SELECT recording_id FROM recording_log where filename='$filename'";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02069',$VD_login,$server_ip,$session_name);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$recording_id = $row[0];
|
||||
@@ -1558,6 +1631,7 @@ if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") )
|
||||
{
|
||||
$stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename'";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02070',$VD_login,$server_ip,$session_name);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rec_count = mysql_num_rows($rslt);
|
||||
if ($rec_count>0)
|
||||
@@ -1572,6 +1646,7 @@ if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") )
|
||||
$stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename'";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02071',$VD_login,$server_ip,$session_name);}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1609,10 +1684,12 @@ if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") )
|
||||
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$filename','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $filename','','','','','');";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02072',$VD_login,$server_ip,$session_name);}
|
||||
|
||||
$stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename','$lead_id','$user')";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02073',$VD_login,$server_ip,$session_name);}
|
||||
$RLaffected_rows = mysql_affected_rows($link);
|
||||
if ($RLaffected_rows > 0)
|
||||
{
|
||||
@@ -1625,6 +1702,7 @@ if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") )
|
||||
$VLA_inOUT='NONE';
|
||||
$stmt="SELECT comments FROM vicidial_live_agents where user='$user' order by last_update_time desc limit 1;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02074',$VD_login,$server_ip,$session_name);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$VLA_inOUT_ct = mysql_num_rows($rslt);
|
||||
if ($VLA_inOUT_ct > 0)
|
||||
@@ -1645,6 +1723,7 @@ if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") )
|
||||
$stmt="SELECT uniqueid FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_id';";
|
||||
}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02075',$VD_login,$server_ip,$session_name);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$VM_mancall_ct = mysql_num_rows($rslt);
|
||||
if ($VM_mancall_ct > 0)
|
||||
@@ -1655,6 +1734,7 @@ if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") )
|
||||
$stmt = "UPDATE recording_log SET vicidial_id='$VDvicidial_id' where recording_id='$recording_id';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02076',$VD_login,$server_ip,$session_name);}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1669,6 +1749,7 @@ if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") )
|
||||
### find the value to put in the vicidial_id field if this was an inbound call
|
||||
$stmt="SELECT closecallid from vicidial_closer_log where lead_id='$lead_id' and call_date > \"$four_hours_ago\" order by call_date desc limit 1;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02077',$VD_login,$server_ip,$session_name);}
|
||||
$VAC_qm_ct = mysql_num_rows($rslt);
|
||||
if ($VAC_qm_ct > 0)
|
||||
{
|
||||
@@ -1684,6 +1765,7 @@ if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") )
|
||||
|
||||
$stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename'";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02078',$VD_login,$server_ip,$session_name);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rec_count = mysql_num_rows($rslt);
|
||||
if ($rec_count>0)
|
||||
@@ -1698,12 +1780,14 @@ if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") )
|
||||
$stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' $uniqueidSQL where filename='$filename'";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02079',$VD_login,$server_ip,$session_name);}
|
||||
}
|
||||
|
||||
# find and hang up all recordings going on in this conference # and extension = '$exten'
|
||||
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$channel%\" and channel LIKE \"%,1\";";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02080',$VD_login,$server_ip,$session_name);}
|
||||
# $rec_count = intval(mysql_num_rows($rslt) / 2);
|
||||
$rec_count = mysql_num_rows($rslt);
|
||||
$h=0;
|
||||
@@ -1719,6 +1803,7 @@ if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") )
|
||||
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH12345$StarTtime$i','Channel: $HUchannel[$i]','','','','','','','','','');";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02081',$VD_login,$server_ip,$session_name);}
|
||||
$i++;
|
||||
}
|
||||
|
||||
@@ -1754,6 +1839,7 @@ if ($ACTION=="VolumeControl")
|
||||
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $volume_local_channel','Context: $ext_context','Exten: 8300','Priority: 1','Callerid: $queryCID','','','','$channel','$exten');";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'02082',$VD_login,$server_ip,$session_name);}
|
||||
echo "Volume command sent for Conference $exten, Stage $stage Channel $channel on $server_ip\n";
|
||||
}
|
||||
}
|
||||
@@ -1776,9 +1862,23 @@ if ($format=='debug') {echo "\n</body>\n</html>\n";}
|
||||
|
||||
exit;
|
||||
|
||||
|
||||
##### MySQL Error Logging #####
|
||||
function mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,$query_id,$user,$server_ip,$session_name)
|
||||
{
|
||||
# mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'00001',$user,$server_ip,$session_name);
|
||||
$errno=''; $error='';
|
||||
if ($mysql_error_logging > 0)
|
||||
{
|
||||
$errno = mysql_errno($link);
|
||||
if ( ($errno > 0) or ($mysql_error_logging > 1) )
|
||||
{
|
||||
$error = mysql_error($link);
|
||||
$efp = fopen ("./vicidial_mysql_errors.txt", "a");
|
||||
fwrite ($efp, "$NOW_TIME|manager_send|$query_id|$errno|$error|$stmt|$user|$server_ip|$session_name|\n");
|
||||
fclose($efp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+222
-14
File diff suppressed because it is too large
Load Diff
+86
-15
@@ -201,10 +201,14 @@
|
||||
# 81020-1501 - Fixed bugs in queue_log logging
|
||||
# 81023-0411 - Added compatibility for dial-in agents using AGI, bug fixes
|
||||
# 81030-0403 - Added option to force Pause Codes on PAUSE
|
||||
# 81103-1427 - Added 3way call dial prefix
|
||||
# 81104-0140 - Added mysql error logging capability
|
||||
#
|
||||
|
||||
$version = '2.0.5-180';
|
||||
$build = '81030-0403';
|
||||
$version = '2.0.5-182';
|
||||
$build = '81104-0140';
|
||||
$mysql_error_logging = 1; # Mysql error log logging for on the web server
|
||||
$mysql_log_count=51;
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
@@ -278,6 +282,7 @@ $random = (rand(1000000, 9999999) + 10000000);
|
||||
##### START SYSTEM_SETTINGS LOOKUP #####
|
||||
$stmt = "SELECT use_non_latin,vdc_header_date_format,vdc_customer_date_format,vdc_header_phone_format,webroot_writable FROM system_settings;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01001',$VD_login,$server_ip,$session_name);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$qm_conf_ct = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
@@ -397,11 +402,13 @@ if ($relogin == 'YES')
|
||||
$stmt="SELECT user_group from vicidial_users where user='$VD_login' and pass='$VD_pass'";
|
||||
if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01002',$VD_login,$server_ip,$session_name);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$VU_user_group=$row[0];
|
||||
|
||||
$stmt="SELECT allowed_campaigns from vicidial_user_groups where user_group='$VU_user_group';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01003',$VD_login,$server_ip,$session_name);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if ( (!eregi("ALL-CAMPAIGNS",$row[0])) )
|
||||
{
|
||||
@@ -414,6 +421,7 @@ if ($relogin == 'YES')
|
||||
$stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where active='Y' $LOGallowed_campaignsSQL order by campaign_id";
|
||||
if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01004',$VD_login,$server_ip,$session_name);}
|
||||
$camps_to_print = mysql_num_rows($rslt);
|
||||
|
||||
$o=0;
|
||||
@@ -578,6 +586,7 @@ if ($user_login_first == 1)
|
||||
$stmt="SELECT phone_login,phone_pass from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01005',$VD_login,$server_ip,$session_name);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$phone_login=$row[0];
|
||||
$phone_pass=$row[1];
|
||||
@@ -663,6 +672,7 @@ $VDloginDISPLAY=0;
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01006',$VD_login,$server_ip,$session_name);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
@@ -673,6 +683,7 @@ $VDloginDISPLAY=0;
|
||||
##### grab the full name of the agent
|
||||
$stmt="SELECT full_name,user_level,hotkeys_active,agent_choose_ingroups,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,closer_default_blended,user_group,vicidial_recording_override,alter_custphone_override from vicidial_users where user='$VD_login' and pass='$VD_pass'";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01007',$VD_login,$server_ip,$session_name);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$LOGfullname=$row[0];
|
||||
$user_level=$row[1];
|
||||
@@ -699,6 +710,7 @@ $VDloginDISPLAY=0;
|
||||
|
||||
$stmt="SELECT allowed_campaigns from vicidial_user_groups where user_group='$VU_user_group';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01008',$VD_login,$server_ip,$session_name);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$LOGallowed_campaigns =$row[0];
|
||||
|
||||
@@ -731,6 +743,7 @@ $VDloginDISPLAY=0;
|
||||
$stmt="SELECT count(*) FROM vicidial_campaigns where campaign_id='$VD_campaign' and active='Y';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01009',$VD_login,$server_ip,$session_name);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$CAMPactive=$row[0];
|
||||
if($CAMPactive>0)
|
||||
@@ -742,6 +755,7 @@ $VDloginDISPLAY=0;
|
||||
##### grab the statuses that can be used for dispositioning by an agent
|
||||
$stmt="SELECT status,status_name FROM vicidial_statuses WHERE $selectableSQL status != 'NEW' order by status limit 50;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01010',$VD_login,$server_ip,$session_name);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$VD_statuses_ct = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
@@ -756,8 +770,9 @@ $VDloginDISPLAY=0;
|
||||
}
|
||||
|
||||
##### grab the campaign-specific statuses that can be used for dispositioning by an agent
|
||||
$stmt="SELECT status,status_name FROM vicidial_campaign_statuses WHERE $selectableSQL status != 'NEW' and campaign_id='$VD_campaign' order by status limit 50;";
|
||||
$stmt="SELECT status,status_name FROM vicidial_campaign_statuses WHERE $selectableSQL status != 'NEW' and campaign_id='$VD_campaign' order by status limit 80;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01011',$VD_login,$server_ip,$session_name);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$VD_statuses_camp = mysql_num_rows($rslt);
|
||||
$j=0;
|
||||
@@ -778,6 +793,7 @@ $VDloginDISPLAY=0;
|
||||
##### grab the campaign-specific HotKey statuses that can be used for dispositioning by an agent
|
||||
$stmt="SELECT hotkey,status,status_name FROM vicidial_campaign_hotkeys WHERE selectable='Y' and status != 'NEW' and campaign_id='$VD_campaign' order by hotkey limit 9;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01012',$VD_login,$server_ip,$session_name);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$HK_statuses_camp = mysql_num_rows($rslt);
|
||||
$w=0;
|
||||
@@ -806,8 +822,9 @@ $VDloginDISPLAY=0;
|
||||
$HKstatusnames = substr("$HKstatusnames", 0, -1);
|
||||
|
||||
##### grab the campaign settings
|
||||
$stmt="SELECT park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,agent_pause_codes_active,no_hopper_leads_logins,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,use_campaign_dnc,three_way_call_cid,dial_method FROM vicidial_campaigns where campaign_id = '$VD_campaign';";
|
||||
$stmt="SELECT park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,agent_pause_codes_active,no_hopper_leads_logins,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,use_campaign_dnc,three_way_call_cid,dial_method,three_way_dial_prefix FROM vicidial_campaigns where campaign_id = '$VD_campaign';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01013',$VD_login,$server_ip,$session_name);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$park_ext = $row[0];
|
||||
@@ -850,6 +867,7 @@ $VDloginDISPLAY=0;
|
||||
$use_campaign_dnc = $row[37];
|
||||
$three_way_call_cid = $row[38];
|
||||
$dial_method = $row[39];
|
||||
$three_way_dial_prefix = $row[40];
|
||||
|
||||
if ( (!ereg('DISABLED',$VU_vicidial_recording_override)) and ($VU_vicidial_recording > 0) )
|
||||
{
|
||||
@@ -862,6 +880,8 @@ $VDloginDISPLAY=0;
|
||||
{$campaign_recording='NEVER';}
|
||||
if ($VU_alter_custphone_override=='ALLOW_ALTER')
|
||||
{$disable_alter_custphone='N';}
|
||||
if (strlen($three_way_dial_prefix) < 1)
|
||||
{$three_way_dial_prefix = $dial_prefix ;}
|
||||
if ($alt_number_dialing=='Y')
|
||||
{$alt_phone_dialing='1';}
|
||||
else
|
||||
@@ -883,6 +903,7 @@ $VDloginDISPLAY=0;
|
||||
##### grab the pause codes for this campaign
|
||||
$stmt="SELECT pause_code,pause_code_name FROM vicidial_pause_codes WHERE campaign_id='$VD_campaign' order by pause_code limit 50;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01014',$VD_login,$server_ip,$session_name);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$VD_pause_codes = mysql_num_rows($rslt);
|
||||
$j=0;
|
||||
@@ -908,6 +929,7 @@ $VDloginDISPLAY=0;
|
||||
$VARingroups='';
|
||||
$stmt="select group_id from vicidial_inbound_groups where active = 'Y' and group_id IN($closer_campaigns) order by group_id limit 60;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01015',$VD_login,$server_ip,$session_name);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$closer_ct = mysql_num_rows($rslt);
|
||||
$INgrpCT=0;
|
||||
@@ -931,6 +953,7 @@ $VDloginDISPLAY=0;
|
||||
$VARxfergroups='';
|
||||
$stmt="select group_id,group_name from vicidial_inbound_groups where active = 'Y' and group_id IN($xfer_groups) order by group_id limit 60;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01016',$VD_login,$server_ip,$session_name);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$xfer_ct = mysql_num_rows($rslt);
|
||||
$XFgrpCT=0;
|
||||
@@ -949,6 +972,7 @@ $VDloginDISPLAY=0;
|
||||
##### grab the number of leads in the hopper for this campaign
|
||||
$stmt="SELECT count(*) FROM vicidial_hopper where campaign_id = '$VD_campaign' and status='READY';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01017',$VD_login,$server_ip,$session_name);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$campaign_leads_to_call = $row[0];
|
||||
@@ -1014,6 +1038,7 @@ $VDloginDISPLAY=0;
|
||||
$alias_found=0;
|
||||
$stmt="select count(*) from phones_alias where alias_id = '$phone_login';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01018',$VD_login,$server_ip,$session_name);}
|
||||
$alias_ct = mysql_num_rows($rslt);
|
||||
if ($alias_ct > 0)
|
||||
{
|
||||
@@ -1024,6 +1049,7 @@ if ($alias_found > 0)
|
||||
{
|
||||
$stmt="select alias_name,logins_list from phones_alias where alias_id = '$phone_login' limit 1;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01019',$VD_login,$server_ip,$session_name);}
|
||||
$alias_ct = mysql_num_rows($rslt);
|
||||
if ($alias_ct > 0)
|
||||
{
|
||||
@@ -1055,6 +1081,7 @@ $authphone=0;
|
||||
$stmt="SELECT count(*) from phones where $phoneSQL and active = 'Y';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01020',$VD_login,$server_ip,$session_name);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$authphone=$row[0];
|
||||
if (!$authphone)
|
||||
@@ -1106,27 +1133,28 @@ else
|
||||
if ($DB) {echo "|$stmtx|\n";}
|
||||
if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
|
||||
$rslt=mysql_query($stmtx, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01021',$VD_login,$server_ip,$session_name);}
|
||||
$rowx=mysql_fetch_row($rslt);
|
||||
|
||||
### get number of agents logged in to each server
|
||||
$stmt="SELECT count(*) from vicidial_live_agents where server_ip = '$rowx[0]';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01022',$VD_login,$server_ip,$session_name);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
|
||||
### find out whether the server is set to active
|
||||
$stmt="SELECT count(*) from servers where server_ip = '$rowx[0]' and active='Y';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01023',$VD_login,$server_ip,$session_name);}
|
||||
$rowy=mysql_fetch_row($rslt);
|
||||
|
||||
### find out whether the server_updater is running
|
||||
$stmt="SELECT count(*) from server_updater where server_ip = '$rowx[0]' and last_update > '$past_minutes_date';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01024',$VD_login,$server_ip,$session_name);}
|
||||
$rowz=mysql_fetch_row($rslt);
|
||||
|
||||
$pb_log .= "$phones_auto[$pb]|$rowx[0]|$row[0]|$rowy[0]|$rowz[0]| ";
|
||||
@@ -1148,6 +1176,7 @@ else
|
||||
$stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01025',$VD_login,$server_ip,$session_name);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$extension=$row[0];
|
||||
$dialplan_number=$row[1];
|
||||
@@ -1218,16 +1247,16 @@ else
|
||||
{
|
||||
$stmt="UPDATE phones SET computer_ip='$ip' where login='$phone_login' and pass='$phone_pass' and active = 'Y';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01026',$VD_login,$server_ip,$session_name);}
|
||||
}
|
||||
}
|
||||
if ($PhoneSComPIP == '2')
|
||||
{
|
||||
$stmt="UPDATE phones SET computer_ip='$ip' where login='$phone_login' and pass='$phone_pass' and active = 'Y';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01027',$VD_login,$server_ip,$session_name);}
|
||||
}
|
||||
if ($clientDST)
|
||||
{
|
||||
@@ -1248,6 +1277,7 @@ else
|
||||
$stmt="SELECT asterisk_version from servers where server_ip='$server_ip';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01028',$VD_login,$server_ip,$session_name);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$asterisk_version=$row[0];
|
||||
|
||||
@@ -1301,10 +1331,12 @@ else
|
||||
$stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'vicidial';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01029',$VD_login,$server_ip,$session_name);}
|
||||
|
||||
$stmt="INSERT INTO web_client_sessions values('$extension','$server_ip','vicidial','$NOW_TIME','$session_name');";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01030',$VD_login,$server_ip,$session_name);}
|
||||
|
||||
if ( ($campaign_allow_inbound == 'Y') || ($campaign_leads_to_call > 0) || (ereg('Y',$no_hopper_leads_logins)) )
|
||||
{
|
||||
@@ -1312,10 +1344,12 @@ else
|
||||
$stmt = "INSERT INTO vicidial_user_log (user,event,campaign_id,event_date,event_epoch,user_group) values('$VD_login','LOGIN','$VD_campaign','$NOW_TIME','$StarTtimE','$VU_user_group')";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01031',$VD_login,$server_ip,$session_name);}
|
||||
|
||||
##### check to see if the user has a conf extension already, this happens if they previously exited uncleanly
|
||||
$stmt="SELECT conf_exten FROM vicidial_conferences where extension='$SIP_user' and server_ip = '$server_ip' LIMIT 1;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01032',$VD_login,$server_ip,$session_name);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$prev_login_ct = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
@@ -1333,16 +1367,19 @@ else
|
||||
$stmt="SELECT count(*) FROM vicidial_conferences where server_ip='$server_ip' and ((extension='') or (extension is null));";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01033',$VD_login,$server_ip,$session_name);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if ($row[0] > 0)
|
||||
{
|
||||
$stmt="UPDATE vicidial_conferences set extension='$SIP_user', leave_3way='0' where server_ip='$server_ip' and ((extension='') or (extension is null)) limit 1;";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01034',$VD_login,$server_ip,$session_name);}
|
||||
|
||||
$stmt="SELECT conf_exten from vicidial_conferences where server_ip='$server_ip' and ( (extension='$SIP_user') or (extension='$user') );";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01035',$VD_login,$server_ip,$session_name);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$session_id = $row[0];
|
||||
}
|
||||
@@ -1353,24 +1390,28 @@ else
|
||||
$stmt="UPDATE vicidial_list set status='ERI', user='' where status IN('QUEUE','INCALL') and user ='$VD_login';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01036',$VD_login,$server_ip,$session_name);}
|
||||
$affected_rows = mysql_affected_rows($link);
|
||||
print "<!-- old QUEUE and INCALL reverted list: |$affected_rows| -->\n";
|
||||
|
||||
$stmt="DELETE from vicidial_hopper where status IN('QUEUE','INCALL','DONE') and user ='$VD_login';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01037',$VD_login,$server_ip,$session_name);}
|
||||
$affected_rows = mysql_affected_rows($link);
|
||||
print "<!-- old QUEUE and INCALL reverted hopper: |$affected_rows| -->\n";
|
||||
|
||||
$stmt="DELETE from vicidial_live_agents where user ='$VD_login';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01038',$VD_login,$server_ip,$session_name);}
|
||||
$affected_rows = mysql_affected_rows($link);
|
||||
print "<!-- old vicidial_live_agents records cleared: |$affected_rows| -->\n";
|
||||
|
||||
$stmt="DELETE from vicidial_live_inbound_agents where user ='$VD_login';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01039',$VD_login,$server_ip,$session_name);}
|
||||
$affected_rows = mysql_affected_rows($link);
|
||||
print "<!-- old vicidial_live_inbound_agents records cleared: |$affected_rows| -->\n";
|
||||
|
||||
@@ -1384,6 +1425,7 @@ else
|
||||
##### START SYSTEM_SETTINGS LOOKUP #####
|
||||
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,vicidial_agent_disable,allow_sipsak_messages FROM system_settings;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01040',$VD_login,$server_ip,$session_name);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$qm_conf_ct = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
@@ -1415,6 +1457,7 @@ else
|
||||
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$SIqueryCID','Channel: $SIP_user_DiaL','Context: $ext_context','Exten: $session_id','Priority: 1','Callerid: $SIqueryCID','','','','','');";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01041',$VD_login,$server_ip,$session_name);}
|
||||
$affected_rows = mysql_affected_rows($link);
|
||||
print "<!-- call placed to session_id: $session_id from phone: $SIP_user $SIP_user_DiaL -->\n";
|
||||
|
||||
@@ -1425,6 +1468,7 @@ else
|
||||
##### grab the campaign_weight and number of calls today on that campaign for the agent
|
||||
$stmt="SELECT campaign_weight,calls_today FROM vicidial_campaign_agents where user='$VD_login' and campaign_id = '$VD_campaign';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01042',$VD_login,$server_ip,$session_name);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$vca_ct = mysql_num_rows($rslt);
|
||||
if ($vca_ct > 0)
|
||||
@@ -1441,6 +1485,7 @@ else
|
||||
$stmt="INSERT INTO vicidial_campaign_agents (user,campaign_id,campaign_rank,campaign_weight,calls_today) values('$VD_login','$VD_campaign','0','0','$calls_today');";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01043',$VD_login,$server_ip,$session_name);}
|
||||
$affected_rows = mysql_affected_rows($link);
|
||||
print "<!-- new vicidial_campaign_agents record inserted: |$affected_rows| -->\n";
|
||||
}
|
||||
@@ -1448,6 +1493,7 @@ else
|
||||
$stmt="INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,lead_id,campaign_id,uniqueid,callerid,channel,random_id,last_call_time,last_update_time,last_call_finish,closer_campaigns,user_level,campaign_weight,calls_today) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$closer_chooser_string','$user_level','$campaign_weight','$calls_today');";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01044',$VD_login,$server_ip,$session_name);}
|
||||
$affected_rows = mysql_affected_rows($link);
|
||||
print "<!-- new vicidial_live_agents record inserted: |$affected_rows| -->\n";
|
||||
|
||||
@@ -1459,12 +1505,14 @@ else
|
||||
$stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='NONE',agent='Agent/$VD_login',verb='AGENTLOGIN',data1='$VD_login@agents',serverid='$queuemetrics_log_id';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $linkB);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$linkB,$mysql_error_logging,$stmt,'01045',$VD_login,$server_ip,$session_name);}
|
||||
$affected_rows = mysql_affected_rows($linkB);
|
||||
print "<!-- queue_log AGENTLOGIN entry added: $VD_login|$affected_rows -->\n";
|
||||
|
||||
$stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='NONE',agent='Agent/$VD_login',verb='PAUSEALL',serverid='$queuemetrics_log_id';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $linkB);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$linkB,$mysql_error_logging,$stmt,'01046',$VD_login,$server_ip,$session_name);}
|
||||
$affected_rows = mysql_affected_rows($linkB);
|
||||
print "<!-- queue_log PAUSE entry added: $VD_login|$affected_rows -->\n";
|
||||
|
||||
@@ -1485,6 +1533,7 @@ else
|
||||
$stmt="INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,lead_id,campaign_id,uniqueid,callerid,channel,random_id,last_call_time,last_update_time,last_call_finish,user_level) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$user_level');";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01047',$VD_login,$server_ip,$session_name);}
|
||||
$affected_rows = mysql_affected_rows($link);
|
||||
print "<!-- new vicidial_live_agents record inserted: |$affected_rows| -->\n";
|
||||
|
||||
@@ -1496,12 +1545,14 @@ else
|
||||
$stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='$VD_campaign',agent='Agent/$VD_login',verb='AGENTLOGIN',data1='$VD_login@agents',serverid='$queuemetrics_log_id';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $linkB);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$linkB,$mysql_error_logging,$stmt,'01048',$VD_login,$server_ip,$session_name);}
|
||||
$affected_rows = mysql_affected_rows($linkB);
|
||||
print "<!-- queue_log AGENTLOGIN entry added: $VD_login|$affected_rows -->\n";
|
||||
|
||||
$stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='NONE',agent='Agent/$VD_login',verb='PAUSEALL',serverid='$queuemetrics_log_id';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $linkB);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$linkB,$mysql_error_logging,$stmt,'01049',$VD_login,$server_ip,$session_name);}
|
||||
$affected_rows = mysql_affected_rows($linkB);
|
||||
print "<!-- queue_log PAUSE entry added: $VD_login|$affected_rows -->\n";
|
||||
|
||||
@@ -1576,6 +1627,7 @@ else
|
||||
$stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch,user_group,sub_status) values('$VD_login','$server_ip','$NOW_TIME','$VD_campaign','$StarTtimE','0','$StarTtimE','$VU_user_group','LOGIN');";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01050',$VD_login,$server_ip,$session_name);}
|
||||
$affected_rows = mysql_affected_rows($link);
|
||||
$agent_log_id = mysql_insert_id($link);
|
||||
print "<!-- vicidial_agent_log record inserted: |$affected_rows|$agent_log_id| -->\n";
|
||||
@@ -1595,6 +1647,7 @@ else
|
||||
##### grab the datails of all active scripts in the system
|
||||
$stmt="SELECT script_id,script_name,script_text FROM vicidial_scripts WHERE active='Y' order by script_id limit 100;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mysql_error_logging > 0) {mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'01051',$VD_login,$server_ip,$session_name);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$MM_scripts = mysql_num_rows($rslt);
|
||||
$e=0;
|
||||
@@ -1886,6 +1939,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
var starting_dial_level = '<? echo $auto_dial_level ?>';
|
||||
var dial_timeout = '<? echo $dial_timeout ?>';
|
||||
var dial_prefix = '<? echo $dial_prefix ?>';
|
||||
var three_way_dial_prefix = '<? echo $three_way_dial_prefix ?>';
|
||||
var campaign_cid = '<? echo $campaign_cid ?>';
|
||||
var campaign_vdad_exten = '<? echo $campaign_vdad_exten ?>';
|
||||
var campaign_leads_to_call = '<? echo $campaign_leads_to_call ?>';
|
||||
@@ -2261,8 +2315,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
{
|
||||
if (document.vicidial_form.xferoverride.checked==false)
|
||||
{
|
||||
if (dial_prefix == 'X') {var temp_dial_prefix = '';}
|
||||
else {var temp_dial_prefix = dial_prefix;}
|
||||
if (three_way_dial_prefix == 'X') {var temp_dial_prefix = '';}
|
||||
else {var temp_dial_prefix = three_way_dial_prefix;}
|
||||
if (omit_phone_code == 'Y') {var temp_phone_code = '';}
|
||||
else {var temp_phone_code = document.vicidial_form.phone_code.value;}
|
||||
|
||||
@@ -2883,8 +2937,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
{
|
||||
if (document.vicidial_form.xferoverride.checked==false)
|
||||
{
|
||||
if (dial_prefix == 'X') {var temp_dial_prefix = '';}
|
||||
else {var temp_dial_prefix = dial_prefix;}
|
||||
if (three_way_dial_prefix == 'X') {var temp_dial_prefix = '';}
|
||||
else {var temp_dial_prefix = three_way_dial_prefix;}
|
||||
if (omit_phone_code == 'Y') {var temp_phone_code = '';}
|
||||
else {var temp_phone_code = document.vicidial_form.phone_code.value;}
|
||||
|
||||
@@ -3149,7 +3203,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
}
|
||||
if (xmlhttp)
|
||||
{
|
||||
manDiaLlog_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlogCaLL&stage=" + taskMDstage + "&uniqueid=" + document.vicidial_form.uniqueid.value +
|
||||
manDiaLlog_query = "format=text&server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlogCaLL&stage=" + taskMDstage + "&uniqueid=" + document.vicidial_form.uniqueid.value +
|
||||
"&user=" + user + "&pass=" + pass + "&campaign=" + campaign +
|
||||
"&lead_id=" + document.vicidial_form.lead_id.value +
|
||||
"&list_id=" + document.vicidial_form.list_id.value +
|
||||
@@ -3165,7 +3219,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
|
||||
{
|
||||
var MDlogResponse = null;
|
||||
// alert(xmlhttp.responseText);
|
||||
// alert(xmlhttp.responseText);
|
||||
MDlogResponse = xmlhttp.responseText;
|
||||
var MDlogResponse_array=MDlogResponse.split("\n");
|
||||
MDlogLINE = MDlogResponse_array[0];
|
||||
@@ -7772,6 +7826,23 @@ else
|
||||
exit;
|
||||
|
||||
|
||||
##### MySQL Error Logging #####
|
||||
function mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,$query_id,$user,$server_ip,$session_name)
|
||||
{
|
||||
# mysql_error_logging($NOW_TIME,$link,$mysql_error_logging,$stmt,'00001',$user,$server_ip,$session_name);
|
||||
$errno=''; $error='';
|
||||
if ($mysql_error_logging > 0)
|
||||
{
|
||||
$errno = mysql_errno($link);
|
||||
if ( ($errno > 0) or ($mysql_error_logging > 1) )
|
||||
{
|
||||
$error = mysql_error($link);
|
||||
$efp = fopen ("./vicidial_mysql_errors.txt", "a");
|
||||
fwrite ($efp, "$NOW_TIME|vicidial |$query_id|$errno|$error|$stmt|$user|$server_ip|$session_name|\n");
|
||||
fclose($efp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
+17
-4
@@ -845,6 +845,8 @@ if (isset($_GET["delete_inbound_dids"])) {$delete_inbound_dids=$_GET["delete_i
|
||||
elseif (isset($_POST["delete_inbound_dids"])) {$delete_inbound_dids=$_POST["delete_inbound_dids"];}
|
||||
if (isset($_GET["three_way_call_cid"])) {$three_way_call_cid=$_GET["three_way_call_cid"];}
|
||||
elseif (isset($_POST["three_way_call_cid"])) {$three_way_call_cid=$_POST["three_way_call_cid"];}
|
||||
if (isset($_GET["three_way_dial_prefix"])) {$three_way_dial_prefix=$_GET["three_way_dial_prefix"];}
|
||||
elseif (isset($_POST["three_way_dial_prefix"])) {$three_way_dial_prefix=$_POST["three_way_dial_prefix"];}
|
||||
|
||||
|
||||
if (isset($script_id)) {$script_id= strtoupper($script_id);}
|
||||
@@ -1093,6 +1095,7 @@ $survey_no_response_action = ereg_replace("[^0-9a-zA-Z]","",$survey_no_response_
|
||||
$survey_ni_status = ereg_replace("[^0-9a-zA-Z]","",$survey_ni_status);
|
||||
$qc_get_record_launch = ereg_replace("[^0-9a-zA-Z]","",$qc_get_record_launch);
|
||||
$agent_pause_codes_active = ereg_replace("[^0-9a-zA-Z]","",$agent_pause_codes_active);
|
||||
$three_way_dial_prefix = ereg_replace("[^0-9a-zA-Z]","",$three_way_dial_prefix);
|
||||
|
||||
### DIGITS and Dots
|
||||
$server_ip = ereg_replace("[^\.0-9]","",$server_ip);
|
||||
@@ -1461,11 +1464,12 @@ $survey_camp_record_dir = ereg_replace(";","",$survey_camp_record_dir);
|
||||
# 81012-1725 - Added INBOUND_MAN dial method allowing for manual list dialing with inbound calls
|
||||
# 81030-0348 - Added campaign pause code force option
|
||||
# 81030-2228 - Fixed DIDs creation issue
|
||||
# 81103-1408 - Added 3way call dial prefix option
|
||||
#
|
||||
# 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.0.5-147';
|
||||
$build = '81030-2228';
|
||||
$admin_version = '2.0.5-148';
|
||||
$build = '81103-1408';
|
||||
|
||||
$STARTtime = date("U");
|
||||
$SQLdate = date("Y-m-d H:i:s");
|
||||
@@ -2941,6 +2945,11 @@ echo "<TABLE WIDTH=98% BGCOLOR=#E6E6E6 cellpadding=2 cellspacing=0><TR><TD ALIGN
|
||||
<BR>
|
||||
<B>3-Way Call Outbound CallerID -</B> This defines what is sent out as the outbound callerID number from 3-way calls placed by the agent, CAMPAIGN uses the custom campaign callerID, CUSTOMER uses the number of the customer that is active on the agents screen and AGENT_PHONE uses the callerID for the phone that the agent is logged into.
|
||||
|
||||
<BR>
|
||||
<A NAME="vicidial_campaigns-three_way_dial_prefix">
|
||||
<BR>
|
||||
<B>3-Way Call Dial Prefix -</B> This defines what is used as the dial prefix for 3-way calls, default is empty so the campaign dial prefix is used, passthru so you can hear ringing is 88.
|
||||
|
||||
<BR>
|
||||
<A NAME="vicidial_campaigns-qc_enabled">
|
||||
<BR>
|
||||
@@ -6254,7 +6263,7 @@ if ($ADD==20)
|
||||
{
|
||||
echo "<br><B>CAMPAIGN COPIED: $campaign_id copied from $source_campaign_id</B>\n";
|
||||
|
||||
$stmt="INSERT INTO vicidial_campaigns (campaign_name,campaign_id,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid) SELECT \"$campaign_name\",\"$campaign_id\",\"N\",dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,\"DISABLED\",campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid from vicidial_campaigns where campaign_id='$source_campaign_id';";
|
||||
$stmt="INSERT INTO vicidial_campaigns (campaign_name,campaign_id,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix) SELECT \"$campaign_name\",\"$campaign_id\",\"N\",dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,\"DISABLED\",campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix from vicidial_campaigns where campaign_id='$source_campaign_id';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
|
||||
$stmtA="INSERT INTO vicidial_campaign_stats (campaign_id) values('$campaign_id');";
|
||||
@@ -7643,7 +7652,7 @@ if ($ADD==41)
|
||||
if ( (!ereg("DISABLED",$list_order_mix)) and ($hopper_level < 100) )
|
||||
{$hopper_level='100';}
|
||||
|
||||
$stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',allow_closers='$allow_closers',hopper_level='$hopper_level', $adlSQL next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', dial_prefix='$dial_prefix', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten', web_form_address='" . mysql_real_escape_string($web_form_address) . "', park_ext='$park_ext', park_file_name='$park_file_name', campaign_rec_exten='$campaign_rec_exten', campaign_recording='$campaign_recording', campaign_rec_filename='$campaign_rec_filename', campaign_script='$script_id', get_call_launch='$get_call_launch', am_message_exten='$am_message_exten', amd_send_to_vmx='$amd_send_to_vmx', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number',xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',lead_filter_id='$lead_filter_id',alt_number_dialing='$alt_number_dialing',scheduled_callbacks='$scheduled_callbacks',drop_action='$drop_action',drop_call_seconds='$drop_call_seconds',safe_harbor_exten='$safe_harbor_exten',wrapup_seconds='$wrapup_seconds',wrapup_message='$wrapup_message',closer_campaigns='$groups_value',use_internal_dnc='$use_internal_dnc',allcalls_delay='$allcalls_delay',omit_phone_code='$omit_phone_code',dial_method='$dial_method',available_only_ratio_tally='$available_only_ratio_tally',adaptive_dropped_percentage='$adaptive_dropped_percentage',adaptive_maximum_level='$adaptive_maximum_level',adaptive_latest_server_time='$adaptive_latest_server_time',adaptive_intensity='$adaptive_intensity',adaptive_dl_diff_target='$adaptive_dl_diff_target',concurrent_transfers='$concurrent_transfers',auto_alt_dial='$auto_alt_dial',agent_pause_codes_active='$agent_pause_codes_active',campaign_description='$campaign_description',campaign_changedate='$SQLdate',campaign_stats_refresh='$campaign_stats_refresh',disable_alter_custdata='$disable_alter_custdata',no_hopper_leads_logins='$no_hopper_leads_logins',list_order_mix='$list_order_mix',campaign_allow_inbound='$campaign_allow_inbound',manual_dial_list_id='$manual_dial_list_id',default_xfer_group='$default_xfer_group',xfer_groups='$XFERgroups_value',queue_priority='$queue_priority',drop_inbound_group='$drop_inbound_group',disable_alter_custphone='$disable_alter_custphone',display_queue_count='$display_queue_count',manual_dial_filter='$manual_dial_filter',agent_clipboard_copy='$agent_clipboard_copy',agent_extended_alt_dial='$agent_extended_alt_dial',use_campaign_dnc='$use_campaign_dnc',three_way_call_cid='$three_way_call_cid' where campaign_id='$campaign_id';";
|
||||
$stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',allow_closers='$allow_closers',hopper_level='$hopper_level', $adlSQL next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', dial_prefix='$dial_prefix', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten', web_form_address='" . mysql_real_escape_string($web_form_address) . "', park_ext='$park_ext', park_file_name='$park_file_name', campaign_rec_exten='$campaign_rec_exten', campaign_recording='$campaign_recording', campaign_rec_filename='$campaign_rec_filename', campaign_script='$script_id', get_call_launch='$get_call_launch', am_message_exten='$am_message_exten', amd_send_to_vmx='$amd_send_to_vmx', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number',xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',lead_filter_id='$lead_filter_id',alt_number_dialing='$alt_number_dialing',scheduled_callbacks='$scheduled_callbacks',drop_action='$drop_action',drop_call_seconds='$drop_call_seconds',safe_harbor_exten='$safe_harbor_exten',wrapup_seconds='$wrapup_seconds',wrapup_message='$wrapup_message',closer_campaigns='$groups_value',use_internal_dnc='$use_internal_dnc',allcalls_delay='$allcalls_delay',omit_phone_code='$omit_phone_code',dial_method='$dial_method',available_only_ratio_tally='$available_only_ratio_tally',adaptive_dropped_percentage='$adaptive_dropped_percentage',adaptive_maximum_level='$adaptive_maximum_level',adaptive_latest_server_time='$adaptive_latest_server_time',adaptive_intensity='$adaptive_intensity',adaptive_dl_diff_target='$adaptive_dl_diff_target',concurrent_transfers='$concurrent_transfers',auto_alt_dial='$auto_alt_dial',agent_pause_codes_active='$agent_pause_codes_active',campaign_description='$campaign_description',campaign_changedate='$SQLdate',campaign_stats_refresh='$campaign_stats_refresh',disable_alter_custdata='$disable_alter_custdata',no_hopper_leads_logins='$no_hopper_leads_logins',list_order_mix='$list_order_mix',campaign_allow_inbound='$campaign_allow_inbound',manual_dial_list_id='$manual_dial_list_id',default_xfer_group='$default_xfer_group',xfer_groups='$XFERgroups_value',queue_priority='$queue_priority',drop_inbound_group='$drop_inbound_group',disable_alter_custphone='$disable_alter_custphone',display_queue_count='$display_queue_count',manual_dial_filter='$manual_dial_filter',agent_clipboard_copy='$agent_clipboard_copy',agent_extended_alt_dial='$agent_extended_alt_dial',use_campaign_dnc='$use_campaign_dnc',three_way_call_cid='$three_way_call_cid',three_way_dial_prefix='$three_way_dial_prefix' where campaign_id='$campaign_id';";
|
||||
$rslt=mysql_query($stmtA, $link);
|
||||
|
||||
if ($reset_hopper == 'Y')
|
||||
@@ -11061,6 +11070,7 @@ if ($ADD==31)
|
||||
$agent_extended_alt_dial = $row[94];
|
||||
$use_campaign_dnc = $row[95];
|
||||
$three_way_call_cid = $row[96];
|
||||
$three_way_dial_prefix = $row[97];
|
||||
|
||||
if (ereg("DISABLED",$list_order_mix))
|
||||
{$DEFlistDISABLE = ''; $DEFstatusDISABLED=0;}
|
||||
@@ -11492,6 +11502,9 @@ if ($ADD==31)
|
||||
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>3-Way Call Outbound CallerID: </td><td align=left><select size=1 name=three_way_call_cid><option>CAMPAIGN</option><option>CUSTOMER</option><option>AGENT_PHONE</option><option SELECTED>$three_way_call_cid</option></select>$NWB#vicidial_campaigns-three_way_call_cid$NWE</td></tr>\n";
|
||||
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>3-Way Call Dial Prefix: </td><td align=left><input type=text name=three_way_dial_prefix size=15 maxlength=20 value=\"$three_way_dial_prefix\">$NWB#vicidial_campaigns-three_way_dial_prefix$NWE</td></tr>\n";
|
||||
|
||||
|
||||
if ($campaign_allow_inbound == 'Y')
|
||||
{
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Allowed Inbound Groups: <BR>";
|
||||
|
||||
Reference in New Issue
Block a user