Superfecta module for CallerIDService module has a bug at line 59, with the code shown below.
53: // CallerID service returns CNAM with the following prefixes if there are errors
54: $st_error = strstr($sname, "CNAM ");
55: $st_unknown = strstr($sname, “UNKNOWN”);
56: $st_unavail = strstr($sname, “UNAVAILABLE”);
57:
58: // give up if any errors
59: if($st_error || $st_unkown || $st_unavail) {
60: $this->DebugPrint(_(“Error in Lookup.”));
61: return;
62: }
The variable $st_unknown is misspelled at line 59. In the module the variable is spelled as $st_unkown, by changing the variable to the correct spelling the module works without any problems.
Corrected code shown below:
53: // CallerID service returns CNAM with the following prefixes if there are errors
54: $st_error = strstr($sname, "CNAM ");
55: $st_unknown = strstr($sname, “UNKNOWN”);
56: $st_unavail = strstr($sname, “UNAVAILABLE”);
57:
58: // give up if any errors
59: if($st_error || $st_unknown || $st_unavail) {
60: $this->DebugPrint(_(“Error in Lookup.”));
61: return;
62: }
You should submit this on an issues ticket so that it can get fixed right.
@tm1000 Andrew and @xrobau Rob may want you to also sign the “FreePBX Sangoma” paperwork so they can use the code you’re presenting. It’s kind of a PITA, but once done, it’s done.