Bugs to fix in next versions
Posted: Wed May 17, 2023 9:10 am
Hi!
some bugs vdc_db_query.php:
$version = '2.14-426';
$build = '230418-1354';
1.. if ($ACTION == 'manDiaLlogCaLL')
line 8093
$stmt = "UPDATE vicidial_auto_calls SET uniqueid='$uniqueid' where lead_id='$lead_id';";
Protection against dropping two calls on one lead_id
If a multi-channel client is calling, for example, another contact center, then such UPDATE droped call for the agent
who is already talking to the client. It is impossible for two operators to call one lead_id.
Solution:
Before performing the UPDATE, find out the callerid and complete the condition.
$rslt=mysql_to_mysqli("SELECT callerid FROM vicidial_live_agents WHERE user = '$user';", $link);
$row=mysqli_fetch_row($rslt);
$lead_callerid = $row[0];
//$stmt = "UPDATE vicidial_auto_calls SET uniqueid='$uniqueid' where lead_id='$lead_id';";
$stmt = "UPDATE vicidial_auto_calls SET uniqueid='$uniqueid' where lead_id='$lead_id' and callerid='$lead_callerid';";
if ( ($ACTION == 'VDADpause') or ($ACTION == 'VDADready') or ($pause_trigger == 'PAUSE') )
line 16333
The more operators, the more often it appears.
Droped the call if the event of transition of operators to READY coincides with the QUEUE status.
Solution:
Remove the symbol ";" at the end and add the status condition.
//$stmt="UPDATE vicidial_live_agents set uniqueid=0,callerid='',channel='', random_id='$random',comments='',last_state_change='$NOW_TIME' $vla_autodialSQL $vla_pausecodeSQL where user='$user' and server_ip='$server_ip';";
$stmt="UPDATE vicidial_live_agents set uniqueid=0,callerid='',channel='', random_id='$random',comments='',last_state_change='$NOW_TIME' $vla_autodialSQL $vla_pausecodeSQL where user='$user' and server_ip='$server_ip'";
if ($ACTION == 'VDADready') $stmt .= " and status <> 'QUEUE';";
3. if ( ($ACTION == 'VDADpause') or ($ACTION == 'VDADready') or ($pause_trigger == 'PAUSE') )
line 16435
If there are calls in the queue and the operator in the pause state presses button "Take call", then two READY events are forced consecutively.
As a result, the pause time is doubled. This is critical in the case of BREAK type pauses.
Solution:
Add a condition when calculating the time
if ( (preg_match("/NULL/i",$row[4])) or ($row[4] < 1000) ){
//$pause_sec = (($StarTtime - $row[0]) + $row[1]);
$pause_sec = (($StarTtime - $row[0]) + ($comments == 'NO_STATUS_CHANGE' && $row[1] > 0 ? 0 : $row[1]));
}else{
//$pause_sec = (($row[4] - $row[0]) + $row[1]);
$pause_sec = (($row[4] - $row[0]) + ($comments == 'NO_STATUS_CHANGE' && $row[1] > 0 ? 0 : $row[1]));
}
vicidial.php
$version = '2.14-686c';
$build = '230420-2015';
1. line 18308
var CFN_value = vcFormIFrame.document.form_custom_fields[CFN_field].value;
If there is a custom list, but the CFN_field value is null then everything crashes here. The workplace becomes DISABLED button images and you only need required logout close tab.
Solution:
Add "try catch" and disable field_parsed.
try{
var CFN_value = vcFormIFrame.document.form_custom_fields[CFN_field].value;
//field_parsed=1;
}catch(e){ }
2. line 18368
var SCcomments = encodeURIComponent(document.vicidial_form.comments.value);
The field value can sometimes be a URL, in which case encodeURIComponent destroys the reference.
Solution:
Remove encodeURIComponent.
//var SCcomments = encodeURIComponent(document.vicidial_form.comments.value);
var SCcomments = document.vicidial_form.comments.value;
3. line 1449 (for version '2.14-419' )
echo "<tr><td align=\"center\" colspan=\"2\"><input type=\"submit\" name=\"SUBMIT\" value=\""._QXZ("SUBMIT")."\" /> \n";
Operators press a button very quickly several times per second or do a DoubleClick. This is done by the wrong login.
Solution:
Add ID to submit button and lock the button after the first click.
echo "<tr><td align=\"center\" colspan=\"2\"><input type=\"submit\" name=\"SUBMIT\" value=\""._QXZ("SUBMIT")."\" id=\"submitBlock\"/> \n";
echo "<script>var fstClick = true; submitBlock.onclick = function() { if(!fstClick) return false; else fstClick = false; };</script>";
4. line 2006
$agent_fullscreen = $row[12];
Often it needs to be enabled globally for the entire system not for each user_group.
Solution:
Move the options.php file connection below line 1008 after the agent_fullscreen.
if (file_exists('options.php')){require_once('options.php');}
some bugs vdc_db_query.php:
$version = '2.14-426';
$build = '230418-1354';
1.. if ($ACTION == 'manDiaLlogCaLL')
line 8093
$stmt = "UPDATE vicidial_auto_calls SET uniqueid='$uniqueid' where lead_id='$lead_id';";
Protection against dropping two calls on one lead_id
If a multi-channel client is calling, for example, another contact center, then such UPDATE droped call for the agent
who is already talking to the client. It is impossible for two operators to call one lead_id.
Solution:
Before performing the UPDATE, find out the callerid and complete the condition.
$rslt=mysql_to_mysqli("SELECT callerid FROM vicidial_live_agents WHERE user = '$user';", $link);
$row=mysqli_fetch_row($rslt);
$lead_callerid = $row[0];
//$stmt = "UPDATE vicidial_auto_calls SET uniqueid='$uniqueid' where lead_id='$lead_id';";
$stmt = "UPDATE vicidial_auto_calls SET uniqueid='$uniqueid' where lead_id='$lead_id' and callerid='$lead_callerid';";
if ( ($ACTION == 'VDADpause') or ($ACTION == 'VDADready') or ($pause_trigger == 'PAUSE') )
line 16333
The more operators, the more often it appears.
Droped the call if the event of transition of operators to READY coincides with the QUEUE status.
Solution:
Remove the symbol ";" at the end and add the status condition.
//$stmt="UPDATE vicidial_live_agents set uniqueid=0,callerid='',channel='', random_id='$random',comments='',last_state_change='$NOW_TIME' $vla_autodialSQL $vla_pausecodeSQL where user='$user' and server_ip='$server_ip';";
$stmt="UPDATE vicidial_live_agents set uniqueid=0,callerid='',channel='', random_id='$random',comments='',last_state_change='$NOW_TIME' $vla_autodialSQL $vla_pausecodeSQL where user='$user' and server_ip='$server_ip'";
if ($ACTION == 'VDADready') $stmt .= " and status <> 'QUEUE';";
3. if ( ($ACTION == 'VDADpause') or ($ACTION == 'VDADready') or ($pause_trigger == 'PAUSE') )
line 16435
If there are calls in the queue and the operator in the pause state presses button "Take call", then two READY events are forced consecutively.
As a result, the pause time is doubled. This is critical in the case of BREAK type pauses.
Solution:
Add a condition when calculating the time
if ( (preg_match("/NULL/i",$row[4])) or ($row[4] < 1000) ){
//$pause_sec = (($StarTtime - $row[0]) + $row[1]);
$pause_sec = (($StarTtime - $row[0]) + ($comments == 'NO_STATUS_CHANGE' && $row[1] > 0 ? 0 : $row[1]));
}else{
//$pause_sec = (($row[4] - $row[0]) + $row[1]);
$pause_sec = (($row[4] - $row[0]) + ($comments == 'NO_STATUS_CHANGE' && $row[1] > 0 ? 0 : $row[1]));
}
vicidial.php
$version = '2.14-686c';
$build = '230420-2015';
1. line 18308
var CFN_value = vcFormIFrame.document.form_custom_fields[CFN_field].value;
If there is a custom list, but the CFN_field value is null then everything crashes here. The workplace becomes DISABLED button images and you only need required logout close tab.
Solution:
Add "try catch" and disable field_parsed.
try{
var CFN_value = vcFormIFrame.document.form_custom_fields[CFN_field].value;
//field_parsed=1;
}catch(e){ }
2. line 18368
var SCcomments = encodeURIComponent(document.vicidial_form.comments.value);
The field value can sometimes be a URL, in which case encodeURIComponent destroys the reference.
Solution:
Remove encodeURIComponent.
//var SCcomments = encodeURIComponent(document.vicidial_form.comments.value);
var SCcomments = document.vicidial_form.comments.value;
3. line 1449 (for version '2.14-419' )
echo "<tr><td align=\"center\" colspan=\"2\"><input type=\"submit\" name=\"SUBMIT\" value=\""._QXZ("SUBMIT")."\" /> \n";
Operators press a button very quickly several times per second or do a DoubleClick. This is done by the wrong login.
Solution:
Add ID to submit button and lock the button after the first click.
echo "<tr><td align=\"center\" colspan=\"2\"><input type=\"submit\" name=\"SUBMIT\" value=\""._QXZ("SUBMIT")."\" id=\"submitBlock\"/> \n";
echo "<script>var fstClick = true; submitBlock.onclick = function() { if(!fstClick) return false; else fstClick = false; };</script>";
4. line 2006
$agent_fullscreen = $row[12];
Often it needs to be enabled globally for the entire system not for each user_group.
Solution:
Move the options.php file connection below line 1008 after the agent_fullscreen.
if (file_exists('options.php')){require_once('options.php');}