BUG: Superfecta scheme is being reset?


(PbxNoob) #1

Weird bug : my superfecta scheme for my inbound routes is being reset…at first I thought it was a weird anomaly but I’ve just noticed it’s happened again. I’ve got a number of inbound routes and they are tied to specific superfecta schemes - they keep reverting to the default ALL instead of the specific ones?
Should I report this on Github ?


(Lorne Gaetz) #2

You would report to https://issues.freepbx.org/ but before you do, can you provide steps to reproduce? Include version numbers of Superfecta, Framework and Core modules.


(PbxNoob) #3

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


(Lorne Gaetz) #4

You didn’t include steps to reproduce. I have set specific non-default schemes on my 14 system for an inbound route, and the setting remains when I edit the route again.


(PbxNoob) #5

Included now (attached a small movie, very short!) sorry for forgetting it earlier.


(Lorne Gaetz) #6

As indicated in the ticket, this appears to be some issue peculiar to your specific config, we are unable to reproduce. When you successfully set a Superfecta scheme on an inbound route, it will write the scheme name to mysql. You can verify the setting is recorded by entering mysql with:

fwconsole mysql

and doing the query:

select * from superfecta_to_incoming;

My system shows:

MariaDB [asterisk]> select * from superfecta_to_incoming;
+---------------------------+------------+--------+--------------+
| superfecta_to_incoming_id | extension  | cidnum | scheme       |
+---------------------------+------------+--------+--------------+
|                        22 | 902xxxxx51 |        | base_scheme2 |
|                        23 | 902yyyyy50 |        | base_scheme3 |
|                        25 | 902zzzzz52 |        | base_scheme1 |
+---------------------------+------------+--------+--------------+
3 rows in set (0.00 sec)

In your case those values are not being written. Noteworthy here is that the settings use the extension and cidnum (corresponding to inbound route ‘DID Number’ and ‘CallerID’ Number fields), so it’s possible if you have two inbound routes with matching DID/DID values, there will be a conflict.


(PbxNoob) #7

Couldn’t get the paste to look as nice as yours, Lorne, the spacing was all scrambled.

Interestingly, it looks as it should…but the GUI and the actual call flow don’t look as they should

I did just do a big module admin update of a load of modules in need of updating.

The module update DID bring in a couple of problems with signatures (allegedly tampered files):

“/var/www/html/admin/modules/iotserver/node/npm-shrinkwrap.json altered”
and
IoTServer also needed to be redownloaded, whatever that is - it’s the module that keeps emailing twice daily that it needs a license.

52


(PbxNoob) #8

SO weird! The data is definitely getting set correctly in the mqsql db but isn’t being ‘read’ or acted upon by the rendered GUI webpage, and isn’t being adhered to by the call flow logic.


(PbxNoob) #9

Does anyone know how I can reasonably debug this issue? It’s very very odd because the db is being set, but it seems the page is incapable of reading the change. It’s not just the page, though, call flow is ignoring the settings. It seems like it should be possible to pinpoint precisely where this is going wrong but I’m out of ideas now that the db has been shown to be being set correctly by the GUI.


#10

I’ve only seen that happen when the inbound route has been set to not use superfecta, that is when the scheme gets reset to ALL no matter what.


(PbxNoob) #11

hmm. Thanks for the reply. The inbound route IS set to use superfecta. I’ll try setting it ‘off’ then setting it back ‘on’ again. I’d uninstall then reinstall superfecta but I’m concerned I’ll lose my lists and how they’re configured. Not that at the moment they’re working.


(PbxNoob) #12

OK @kgupta1 and @lgaetz interesting debugging info perhaps.

I turned off superfecta across ALL inbound routes (I have 15).
I did an ‘apply config’.
I renabled superfecta for one route: cell phones. I set that route to use the superfecta scheme 'cell phones'.
I saved and went back in to check it had ‘stuck’. It had!
Then I went back into my ‘catchall’ group and enabled superfecta and set it to ‘all’. Suddenly cell phones had lost its setting and has gone back to ALL.

Talk about weird?!


(Lorne Gaetz) #13

I tested over and over again on my own system. 4 inbound routes, one set to Any/Any. As long as I select yes to “Enable Superfecta Lookup” and choose a scheme, the scheme chosen always shows in the GUI. If I don’t select yes to enable and only choose scheme, that is when the scheme is set to all, which is expected behavior.


(PbxNoob) #14

Thank you Lorne I’m grateful to you for that. I appreciate that your system is doing something different to mine, I just wondered what I would/could next do to determine why mine is being so odd.
As I say, superfecta IS set to yes/enable and it’s still doing bonkers stuff.
I just thought there can’t be that many places to check why the system isn’t cooperating. But maybe I’m way out there! :slight_smile:


(PbxNoob) #15

Failing a method of debugging why it’s doing what it’s doing, I wonder if I upgraded my system to FreePBX 15 if that might make the problem sort of ‘go away’? The problem came from nowhere…actually it began during lockdown when I sent all inbound calls to an announcement…so it might go back from whence it came?!


(PbxNoob) #16

Lorne I’m wondering about doing the upgrade from 14-15 as a possible way out of this situation. I’ve performed the pre-upgrade checks and aside from the permissions being wacky on my www directory for some reason it’s passed.

Can I ask how this ‘live’ upgrade compares in terms of risk to doing a backup/restore from 14-15 like I’ve just done for another installation elsewhere? The backup/restore on that system was quite the process in the end as I encountered various wee hiccups along the way that I had to navigate. I’d love to do the live upgrade but I’m wary that I don’t want to break a 99% working system


(Lorne Gaetz) #17

I’ve done a small number of upgrades (about a dozen) from 14 without issue. Compared to the 13->14 upgrade process, the upgrade to 15 is trivial. There is no OS level updates for the upgrade to 15, only PBX modules.

Since we don’t know the cause of the superfecta issue, no idea if an upgrade will resolve. I rather doubt it.


(PbxNoob) #18

Thanks Lorne I really appreciate your help.

Is there ANYTHING I can do from my end to try to diagnose the issue? In a way it’s a simple issue, I am wondering if there’s anything in Chrome’s developer view which might help…it’s so bizarre. I would have thought that somehow tracing back the problem and ruling things out (as in, basically what troubleshooting is) would do. I tried to have a look at the config file itself using nano
freepbxIP/admin/config.php?display=did&view=form
but failed to find any mentioned of superfecta.
I wonder if the page is subloaded from /var/www/html/admin/libraries but again I don’t know which file to open.


(Lorne Gaetz) #19

All the superfecta code is in /var/www/html/admin/modules/superfecta. Can you do a bulk export of your inbound routes (DIDs) using bulk handler and share with me via PM, I will see if I can repo using your routes.


(PbxNoob) #20

cheers Lorne, done!