Fix for dispo call url bug related to dialed number and label

git-svn-id: svn://192.168.202.10@1457 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2010-06-24 18:06:46 +00:00
parent 02e19a87b6
commit 9bd5c9d8f5
2 changed files with 58 additions and 6 deletions
@@ -235,10 +235,11 @@
# 100207-1110 - Changed Pause Codes function to allow for multiple pause codes per pause period
# 100301-1342 - Changed Available agents output for AGENTDIRECT selection
# 100413-1342 - Fixes for extended alt-dial
# 100624-1400 - Fix for dispo call url bug related to dialed number and label
#
$version = '2.2.0-143';
$build = '100413-1342';
$version = '2.2.0-144';
$build = '100624-1400';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=310;
$one_mysql_log=0;
@@ -4899,6 +4900,7 @@ if ($ACTION == 'updateDISPO')
$row=mysql_fetch_row($rslt);
if ($row[0] > 0)
{
$call_type='IN';
$stmt = "UPDATE vicidial_closer_log set status='$dispo_choice' where lead_id='$lead_id' and user='$user' order by closecallid desc limit 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
@@ -4918,6 +4920,7 @@ if ($ACTION == 'updateDISPO')
}
else
{
$call_type='OUT';
$four_hours_ago = date("Y-m-d H:i:s", mktime(date("H")-4,date("i"),date("s"),date("m"),date("d"),date("Y")));
if ( ($auto_dial_level < 1) or (preg_match('/^M/',$MDnextCID)) )
@@ -5801,7 +5804,30 @@ if ($ACTION == 'updateDISPO')
if (strlen($status_name) < 1) {$status_name = $dispo_choice;}
}
$dispo_name = urlencode(trim($status_name));
if (eregi('--A--dialed_',$dispo_call_url))
{
$dialed_number = $phone_number;
$dialed_label = 'NONE';
if ($call_type=='OUT')
{
### find the dialed number and label for this call
$stmt = "SELECT phone_number,alt_dial from vicidial_log where lead_id='$lead_id' order by call_date desc limit 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
$vl_dialed_ct = mysql_num_rows($rslt);
if ($vl_dialed_ct > 0)
{
$row=mysql_fetch_row($rslt);
$dialed_number = $row[0];
$dialed_label = $row[1];
}
}
}
##### grab the data from vicidial_list for the lead_id