Fixed bugs relating to alt number dialing transfers, dispo variable assignment and the agent sidebar
git-svn-id: svn://192.168.202.10@1181 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -96,6 +96,7 @@
|
||||
# 90623-0724 - Changed prompts to multi-file prompts, changed agent alert exten to a prompt
|
||||
# 90627-0546 - Added no-agent-no-queue options
|
||||
# 90702-2129 - Fixed rare agent alert bug, added option to send to remote agent as phone*vendor_id
|
||||
# 90709-1648 - Fixed alt-number transfers
|
||||
#
|
||||
|
||||
$script = 'agi-VDAD_ALL_inbound.agi';
|
||||
@@ -665,7 +666,8 @@ else
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$campaign = "$channel_group";
|
||||
$phone_number = "$aryA[0]";
|
||||
if (length($phone_number) < 10)
|
||||
{$phone_number = "$aryA[0]";}
|
||||
$phone_code = "$aryA[1]";
|
||||
$insert_lead_id = "$CIDlead_id";
|
||||
$fronter = "$aryA[2]";
|
||||
|
||||
@@ -457,6 +457,8 @@ if ($affected_rows > 0)
|
||||
$t++;
|
||||
}
|
||||
|
||||
if ($AGILOG) {$agi_string = "-- TTS : |$t|$TTS_filename[0]|$TTS_filename[1]|$TTS_filename[2]|$TTS_filename[3]|$TTS_filename[4]|"; &agi_output;}
|
||||
|
||||
### if there are TTS audio files run this
|
||||
if ($t > 0)
|
||||
{
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
# 90106-2309 - Added email sending
|
||||
# 90620-0900 - Formatting fixes
|
||||
# 90627-0757 - Added time addition when transfer recordings is enabled
|
||||
# 90710-0514 - Fixes for data output formatting changes
|
||||
#
|
||||
|
||||
$txt = '.txt';
|
||||
@@ -762,10 +763,10 @@ sub select_format_loop
|
||||
$ivr_location .= "|";
|
||||
}
|
||||
$ivr_id .= "$aryB[0]";
|
||||
$ivr_filename .= "$aryB[1]";
|
||||
$ivr_location .= "$aryB[2]";
|
||||
@ivr_path = split(/\//,$ivr_location);
|
||||
$path_file = $ivr_path[$#ivr_path];
|
||||
$ivr_filename .= "$path_file";
|
||||
$rec_countB++;
|
||||
if ($ftp_audio_transfer > 0)
|
||||
{
|
||||
@@ -811,10 +812,10 @@ sub select_format_loop
|
||||
$ivr_location .= "|";
|
||||
}
|
||||
$ivr_id .= "$aryB[0]";
|
||||
$ivr_filename .= "$aryB[1]";
|
||||
$ivr_location .= "$aryB[2]";
|
||||
@ivr_path = split(/\//,$ivr_location);
|
||||
$path_file = $ivr_path[$#ivr_path];
|
||||
$ivr_filename .= "$path_file";
|
||||
$rec_countB++;
|
||||
if ($ftp_audio_transfer > 0)
|
||||
{
|
||||
@@ -954,6 +955,7 @@ sub select_format_loop
|
||||
|
||||
$uniqueid =~ s/\D//gi;
|
||||
@call_date_array = split(/ /,$call_date);
|
||||
while (length($phone_number)>10) {$phone_number =~ s/^.//gi;}
|
||||
$phone_areacode = substr($phone_number, 0, 3);
|
||||
if (length($closer) < 1) {$closer = $user;}
|
||||
$application = substr($did_name, 0, 4);
|
||||
|
||||
@@ -125,6 +125,7 @@ if (length($ARGV[0])>1)
|
||||
print " [--vt-sales-update-alldate] = updates the Vtiger account custom sales fields based upon all sales order data\n";
|
||||
print " [--vt-timezone-update] = updates the Vtiger account custom timezone field based upon ViciDial timezone/state\n";
|
||||
print " [--vt-territory-update] = updates the Vtiger account tickersymbol field based upon ViciDial user territory\n";
|
||||
print " [--vt-territory-restrict=3] = if above flag is present, will only update these records owned by this user_id\n";
|
||||
print " report generation options:\n";
|
||||
print " [--report-call-file] = generates a spec call file from vicidial records\n";
|
||||
print " [--report-hours-file] = generates a spec agent hours file from vicidial records\n";
|
||||
@@ -221,6 +222,16 @@ if (length($ARGV[0])>1)
|
||||
$vt_territory_update=1;
|
||||
if ($q < 1) {print "\n----- VTIGER USER TERRITORY UPDATE -----\n\n";}
|
||||
}
|
||||
|
||||
if ($args =~ /--vt-territory-restrict=/i)
|
||||
{
|
||||
@data_in = split(/--vt-territory-restrict=/,$args);
|
||||
$vtur_user = $data_in[1];
|
||||
$vtur_user =~ s/ .*//gi;
|
||||
if ($q < 1) {print "\n----- TERRITORY UPDATE RESTRICTION: $vtur_user -----\n\n";}
|
||||
$VCuser_territory_update_restrictionSQL = " and smownerid='$vtur_user'";
|
||||
$VTuser_territory_update_restrictionSQL = " and user_id='$vtur_user'";
|
||||
}
|
||||
if ($args =~ /--report-call-file/i)
|
||||
{
|
||||
$report_call_file=1;
|
||||
@@ -765,11 +776,11 @@ while ($sthBrowsC > $i)
|
||||
|
||||
if (length($user_id)>0)
|
||||
{
|
||||
$stmtB = "UPDATE vtiger_crmentity SET smownerid='$user_id',smcreatorid='$user_id',modifiedby='$user_id' where crmid='$crmid[$i]';";
|
||||
$stmtB = "UPDATE vtiger_crmentity SET smownerid='$user_id',smcreatorid='$user_id',modifiedby='$user_id' where crmid='$crmid[$i]' $VCuser_territory_update_restrictionSQL;";
|
||||
if ($T < 1) {$affected_rowsB = $dbhB->do($stmtB) or die "Couldn't execute query: |$stmtB|\n";}
|
||||
if($DB){print "|$affected_rowsB|$stmtB|\n";}
|
||||
|
||||
$stmtB = "UPDATE vtiger_tracker SET user_id='$user_id' where item_id='$crmid[$i]';";
|
||||
$stmtB = "UPDATE vtiger_tracker SET user_id='$user_id' where item_id='$crmid[$i]' $VTuser_territory_update_restrictionSQL;";
|
||||
if ($T < 1) {$affected_rowsB = $dbhB->do($stmtB) or die "Couldn't execute query: |$stmtB|\n";}
|
||||
if($DB){print "|$affected_rowsB|$stmtB|\n";}
|
||||
$n++;
|
||||
@@ -1189,7 +1200,7 @@ while ($sthBrowsC > $i)
|
||||
if ($i =~ /70$/i) {print STDERR "| $i\r";}
|
||||
if ($i =~ /80$/i) {print STDERR "+ $i\r";}
|
||||
if ($i =~ /90$/i) {print STDERR "0 $i\r";}
|
||||
if ($i =~ /00$/i) {print "$i|$b|$c|$d|$e|$f|$g|$h|$crmid[$i]|$phone_number|\n";}
|
||||
if ($i =~ /00$/i) {print "$i|$b|$c|$d|$e|$f|$g|$h|$n|$crmid[$i]|$phone_number|\n";}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4544,7 +4544,7 @@ if ($ACTION == 'AGENTSview')
|
||||
if ($row[1] == 'Y')
|
||||
{$agent_status_view_time=1;}
|
||||
$andSQL='';
|
||||
if (ereg("ALL-CAMPAIGNS",$agent_status_viewable_groups))
|
||||
if (ereg("ALL-GROUPS",$agent_status_viewable_groups))
|
||||
{$AGENTviewSQL = "";}
|
||||
else
|
||||
{
|
||||
@@ -4553,6 +4553,7 @@ if ($ACTION == 'AGENTSview')
|
||||
if (ereg("CAMPAIGN-AGENTS",$agent_status_viewable_groups))
|
||||
{$AGENTviewSQL = "($AGENTviewSQL or (campaign_id='$campaign'))";}
|
||||
$andSQL=' and';
|
||||
$AGENTviewSQL = "and $AGENTviewSQL";
|
||||
}
|
||||
if ($comments=='AgentXferViewSelect')
|
||||
{$AGENTviewSQL .= "$andSQL (vla.closer_campaigns LIKE \"%AGENTDIRECT%\")";}
|
||||
@@ -4560,7 +4561,7 @@ if ($ACTION == 'AGENTSview')
|
||||
|
||||
echo "<TABLE CELLPADDING=0 CELLSPACING=1>";
|
||||
### Gather agents data and statuses
|
||||
$stmt="SELECT vla.user,vla.status,vu.full_name,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish) from vicidial_live_agents vla,vicidial_users vu where vla.user=vu.user and $AGENTviewSQL order by vu.full_name;";
|
||||
$stmt="SELECT vla.user,vla.status,vu.full_name,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish) from vicidial_live_agents vla,vicidial_users vu where vla.user=vu.user $AGENTviewSQL order by vu.full_name;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00227',$VD_login,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($rslt) {$agents_count = mysql_num_rows($rslt);}
|
||||
|
||||
@@ -236,10 +236,11 @@
|
||||
# 90628-0655 - Added Quick Transfer button and Preset Prepopulate option
|
||||
# 90705-1400 - Added Agent view sidebar option
|
||||
# 90706-1432 - Added Agent view transfer selection
|
||||
# 90709-1649 - Fixed alt-number transfers and dispo variable reset for webform
|
||||
#
|
||||
|
||||
$version = '2.2.0-214';
|
||||
$build = '90706-1432';
|
||||
$version = '2.2.0-215';
|
||||
$build = '90709-1649';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=61;
|
||||
$one_mysql_log=0;
|
||||
@@ -2780,7 +2781,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
if (Ctasknum.length < 2)
|
||||
{Ctasknum = '990009';}
|
||||
var XfeRSelecT = document.getElementById("XfeRGrouP");
|
||||
tasknum = Ctasknum + "*" + XfeRSelecT.value + '*CXFER*' + document.vicidial_form.lead_id.value + '**' + document.vicidial_form.phone_number.value + '*' + user + '*';
|
||||
tasknum = Ctasknum + "*" + XfeRSelecT.value + '*CXFER*' + document.vicidial_form.lead_id.value + '**' + dialed_number + '*' + user + '*';
|
||||
|
||||
CustomerData_update();
|
||||
|
||||
@@ -3521,7 +3522,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
var XfeRSelecT = document.getElementById("XfeRGrouP");
|
||||
var queryCID = "XLvdcW" + epoch_sec + user_abb;
|
||||
// "90009*$group**$lead_id**$phone_number*$user*$agent_only*";
|
||||
var redirectdestination = closerxferinternal + '90009*' + XfeRSelecT.value + '**' + document.vicidial_form.lead_id.value + '**' + document.vicidial_form.phone_number.value + '*' + user + '*' + document.vicidial_form.xfernumber.value + '*';
|
||||
var redirectdestination = closerxferinternal + '90009*' + XfeRSelecT.value + '**' + document.vicidial_form.lead_id.value + '**' + dialed_number + '*' + user + '*' + document.vicidial_form.xfernumber.value + '*';
|
||||
|
||||
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS + "&session_id=" + session_id;
|
||||
}
|
||||
@@ -4462,6 +4463,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
var genderIndex = document.getElementById("gender_list").selectedIndex;
|
||||
var genderValue = document.getElementById('gender_list').options[genderIndex].value;
|
||||
document.vicidial_form.gender.value = genderValue;
|
||||
LeaDDispO='';
|
||||
|
||||
var regWFAcustom = new RegExp("^VAR","ig");
|
||||
if (VDIC_web_form_address.match(regWFAcustom))
|
||||
@@ -5393,7 +5395,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
var genderIndex = document.getElementById("gender_list").selectedIndex;
|
||||
var genderValue = document.getElementById('gender_list').options[genderIndex].value;
|
||||
document.vicidial_form.gender.value = genderValue;
|
||||
|
||||
LeaDDispO='';
|
||||
|
||||
var regWFAcustom = new RegExp("^VAR","ig");
|
||||
if (VDIC_web_form_address.match(regWFAcustom))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
# admin_modify_lead.php
|
||||
#
|
||||
# AST GUI database administration modify lead in vicidial_list
|
||||
# ViciDial database administration modify lead in vicidial_list
|
||||
# admin_modify_lead.php
|
||||
#
|
||||
# this is the administration lead information modifier screen, the administrator
|
||||
@@ -30,6 +30,7 @@
|
||||
# 81210-1529 - Added server recording display options
|
||||
# 90309-1829 - Added admin_log logging
|
||||
# 90508-0644 - Changed to PHP long tags
|
||||
# 90708-1549 - Added phone number dialed to outbound log
|
||||
#
|
||||
|
||||
require("dbconnect.php");
|
||||
@@ -364,7 +365,8 @@ else
|
||||
$call_log .= "<td align=right><font size=2> $row[3] </td>\n";
|
||||
$call_log .= "<td align=right><font size=2> $row[2] </td>\n";
|
||||
$call_log .= "<td align=right><font size=2> $row[1] </td>\n";
|
||||
$call_log .= "<td align=right><font size=2> $row[15] </td></tr>\n";
|
||||
$call_log .= "<td align=right><font size=2> $row[15] </td>\n";
|
||||
$call_log .= "<td align=right><font size=2> $row[10] </td></tr>\n";
|
||||
|
||||
$campaign_id = $row[3];
|
||||
}
|
||||
@@ -615,8 +617,8 @@ echo "<br><br>\n";
|
||||
echo "<center>\n";
|
||||
|
||||
echo "<B>CALLS TO THIS LEAD:</B>\n";
|
||||
echo "<TABLE width=650 cellspacing=0 cellpadding=1>\n";
|
||||
echo "<tr><td><font size=1># </td><td><font size=2>DATE/TIME </td><td align=left><font size=2>LENGTH</td><td align=left><font size=2> STATUS</td><td align=left><font size=2> TSR</td><td align=right><font size=2> CAMPAIGN</td><td align=right><font size=2> LIST</td><td align=right><font size=2> LEAD</td><td align=right><font size=2> HANGUP REASON</td></tr>\n";
|
||||
echo "<TABLE width=750 cellspacing=0 cellpadding=1>\n";
|
||||
echo "<tr><td><font size=1># </td><td><font size=2>DATE/TIME </td><td align=left><font size=2>LENGTH</td><td align=left><font size=2> STATUS</td><td align=left><font size=2> TSR</td><td align=right><font size=2> CAMPAIGN</td><td align=right><font size=2> LIST</td><td align=right><font size=2> LEAD</td><td align=right><font size=2> HANGUP REASON</td><td align=right><font size=2> PHONE</td></tr>\n";
|
||||
|
||||
echo "$call_log\n";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user