-
Type:
Bug
-
Status: Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 15.0.17.55
-
Fix Version/s: None
-
Component/s: CID Superfecta
-
Labels:None
-
Distro Version:15.0.17.64
-
Distro:FreePBX Distro
The Who-Called UK module (WhoCalled_UK.module) doesn't handle a "Negative" average response from the website.
Plugin code is here: https://git.freepbx.org/projects/FREEPBX/repos/superfecta/browse/sources/source-WhoCalled_UK.module
The plugin contains a code block around line 87 which parses these responses:
switch (strtolower($average_rate)) {
case "dangerous":
if($number_of_searches <= $run_param['Search_Number_Threshold'] || $number_of_comments <= $run_param['Comment_Number_Threshold']) {
$this->DebugPrint("Number flagged as Dangerous, but comment/search threshold not met");
} else {
$this->DebugPrint("Number flagged as Dangerous, comment/search threshold met, setting call as SPAM");
$this->spam = true;
}
break;
To handle the negative case, a new case statement needs to be introduced – this should be handled the same as Dangerous or Harassing.
If there was a desire to clean up the code, Dangerous, Harassing and Negative could be all combined into the same 'case' statement body, as they are handled the same way.