Blacklist 14.0.3. frontend empty after update

Hi,

FreePBX 14 had all our modules updated as well as system updates on Centos 7 were done.
Now is FreePBX 14.0.16.4. Asterisk 13.38.1.

Problem is with Black list module. Now version 14.0.3.
I can put a number on it via gui, it is visible in cli>database show blacklist and works! Everything seems fine, but when I try to check BL records via Freepbx www i see blank page like there is nothing in the database, "no results found’. When I export BL by Bulk Handler I get empty file. Again like there is nothing in BL database but there are plenty! I see over 160 blocked numbers in database and over 10 blocked calls every day.

What might be a cause? Anyone?

Is this a manual install, or the distro?

Distro:

Current System Version:
12.7.8-2012-1.sng7

similar problem
Blacklist 15.0.2.12
FreePBX 15.0.17.17

1 Like

No idea what’s going on here, but two reports (and only two) makes me think there is a bug, but it’s obscure enough to only show up in rare cases. My first thought is there is a special character in one of the blacklist entries causing display issues. If you can share a blacklist dump via paste bin (privately if you wish) that might yield a clue:

 asterisk -x "database show blacklist"  | pastebin
1 Like
[root@pbx ~]# asterisk -x "database show blacklist"
/blacklist/79388756389                            : 1
/blacklist/79655362774                            : 1
/blacklist/blocked                                : 1
3 results found.

Dead end there, your entries look clean. On the blacklist page, there is a display filter box in the upper right. Is it possible the browser is auto-populating that box with something that filters out all entries?

the filter is empty in this form

also the module does not display the settings (but the module settings are in working)


when adding a number to the blacklist via the web interface, the number appears in the database

See what the module returns from the cli…
php -r 'include "/etc/freepbx.conf"; print_r(FreePBX::Blacklist()->getBlacklist());'

2 Likes
[root@pbx ~]# php -r 'include "/etc/freepbx.conf";
> print_r(FreePBX::Blacklist()->getBlacklist());'
Array
(
)

next step down the rabbit hole…

php -r 'include "/etc/freepbx.conf"; print_r(FreePBX::Create()->astman->database_show('blacklist'));'
[root@pbx ~]# php -r 'include "/etc/freepbx.conf";    print_r(FreePBX::Create()->astman->database_show('blacklist'));'
Array
(
)

If I didn’t know better i would say you are looking at 2 different machines. The last snippit is the same as running database show blacklist in the CLI. This information should be exactly the same or throw up a nasty error about permissions/connectivity etc. Being that you are running the command through php as root it also eliminates most potential permissions problems. I dare say this is impossible but weirder things have happened.

Lastly incase it is a weird parsing thing which I think is unlikely

php -r 'include "/etc/freepbx.conf"; print_r(FreePBX::Create()->astman->command("database show blacklist"));'

That runs the raw command with no processing of the returned data.

[root@pbx ~]# php -r 'include "/etc/freepbx.conf";

print_r(FreePBX::Create()->astman->command(“database show blacklist”));’
Array
(
[Response] => Success
[Message] => Command output follows
[data] => Privilege: Command
/blacklist/79066724131 : 1
/blacklist/79388756389 : 1
/blacklist/79655362774 : 1
/blacklist/blocked : 1
/blacklist/dest : app-blackhole,hangup,1
5 results found.
)

i have only one active server now

I noticed my quoting was wrong above which may have given bad results. Can you try this again
php -r 'include "/etc/freepbx.conf"; print_r(FreePBX::Create()->astman->database_show("blacklist"));'

The last command shows it may be a parsing thing

[root@pbx ~]# php -r 'include "/etc/freepbx.conf";
> print_r(FreePBX::Create()->astman->database_show("blacklist"));'
Array
(
)

What is output of

asterisk -x "manager show user admin"

note the </> button when posting, it will format code properly for you

Visually speaking the output from “database show” is correct unless there is a hidden character or something. Basically it looks like the parsing in astman->database_show is falling on its face. That said I cannot duplicate this in FreePBX 15 and with asterisk 16/17/18 it all “works here”

I would make sure framework is up to date but otherwise this will require some deep digging by someone who has some in depth knowledge

[root@pbx ~]# asterisk -x "manager show user admin"

          username: admin
            secret: <Set>
               ACL: yes
         read perm: system,call,log,verbose,command,agent,user,config,dtmf,reporting,cdr,dialplan,originate,message
        write perm: system,call,log,verbose,command,agent,user,config,dtmf,reporting,cdr,dialplan,originate,message
   displayconnects: no
allowmultiplelogin: yes
         Variables:
ACL: (unnamed)
---------------------------------------------
  0:  deny - 0.0.0.0/0.0.0.0
  1: allow - 127.0.0.0/255.255.255.0

I’m out of ideas as well. Drastic, but nuke from orbit and start over maybe? From Asterisk console

 database deltree blacklist

and then enter numbers and settings again via the GUI.