diff --git a/agi/agi-VDAD_ALL_inbound.agi b/agi/agi-VDAD_ALL_inbound.agi
index a95cb632..1819af57 100644
--- a/agi/agi-VDAD_ALL_inbound.agi
+++ b/agi/agi-VDAD_ALL_inbound.agi
@@ -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]";
diff --git a/agi/agi-VDAD_ALL_outbound.agi b/agi/agi-VDAD_ALL_outbound.agi
index 722860fd..1b9b7dd3 100644
--- a/agi/agi-VDAD_ALL_outbound.agi
+++ b/agi/agi-VDAD_ALL_outbound.agi
@@ -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)
{
diff --git a/bin/AST_VDsales_export.pl b/bin/AST_VDsales_export.pl
index 9e7d7a84..9c018835 100644
--- a/bin/AST_VDsales_export.pl
+++ b/bin/AST_VDsales_export.pl
@@ -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);
diff --git a/bin/Vtiger_OUT_sync2VICIDIAL_file.pl b/bin/Vtiger_OUT_sync2VICIDIAL_file.pl
index 86367839..c4acfef4 100644
--- a/bin/Vtiger_OUT_sync2VICIDIAL_file.pl
+++ b/bin/Vtiger_OUT_sync2VICIDIAL_file.pl
@@ -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";}
}
}
diff --git a/www/agc/vdc_db_query.php b/www/agc/vdc_db_query.php
index 18d8afea..7e6ba19d 100644
--- a/www/agc/vdc_db_query.php
+++ b/www/agc/vdc_db_query.php
@@ -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 "
";
### 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);}
diff --git a/www/agc/vicidial.php b/www/agc/vicidial.php
index aea6d0d5..0edf8d5b 100644
--- a/www/agc/vicidial.php
+++ b/www/agc/vicidial.php
@@ -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))
diff --git a/www/vicidial/admin_modify_lead.php b/www/vicidial/admin_modify_lead.php
index 17ae20b3..2ecbbf52 100644
--- a/www/vicidial/admin_modify_lead.php
+++ b/www/vicidial/admin_modify_lead.php
@@ -1,7 +1,7 @@
$row[3] \n";
$call_log .= "| $row[2] | \n";
$call_log .= " $row[1] | \n";
- $call_log .= " $row[15] | \n";
+ $call_log .= " $row[15] | \n";
+ $call_log .= " $row[10] | \n";
$campaign_id = $row[3];
}
@@ -615,8 +617,8 @@ echo "
\n";
echo "\n";
echo "CALLS TO THIS LEAD:\n";
-echo "\n";
-echo "| # | DATE/TIME | LENGTH | STATUS | TSR | CAMPAIGN | LIST | LEAD | HANGUP REASON |
\n";
+echo "\n";
+echo "| # | DATE/TIME | LENGTH | STATUS | TSR | CAMPAIGN | LIST | LEAD | HANGUP REASON | PHONE |
\n";
echo "$call_log\n";