Freepbx 14 - Superfecta - CallerIDService module bug

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.

No problem, kind of new here but been working with FreePBX for about 10 to 15 years.

Just let me know what you need.

Steve

I’m sure one of the Sangoma guys will weigh in here shortly, even though it is 4/20.

1 Like

DOOD! I am like totally all over this man. Like months ago.

https://issues.freepbx.org/browse/FREEPBX-15787

fixed in 13.0.4.7 and 14.0.6

3 Likes

Just for a note, it was not fixed in 14.0.2

Apparently it’s 4/20 everywhere…

:slight_smile:

2 Likes

Isn’t module versions being started at top and goes all the way down? Apparently he’s right.
Looking for more green…

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.