System Upgrade Issues

I'm having some problems with FOP2 after running some updates on our FreePBX system.

We were originally running FreePBX 2.210.63 with FOP2 2.27, and were using the FOP2Admin plugin. Our system has around 900 virtual extensions which act as voicemail boxes, and around 20 physical extensions and around 20 queues. On the old system, the 20 physical extensions were split into two groups, which were then displayed within the FOP panel. A subset of the queues were also displayed.

Last week we upgraded to FreePBX 3.211.63, and in the process had to remove the FOP2Admin plugin as it was causing issues with the upgrade procedure. Once up and running, i've installed the FOP2 Manager instead and tried to use that to configure things as they were before, but it doesnt seem to work properly.

For example, one of our extensions "200" doesnt seem to accept a password. Regardless of what i type into the password box within the manager, it doesnt allow that user to log in.
More critically however, it wont allow me to create the subset groups of extensions to display. It loads up showing all 900 extensions in a massive list, despite me having created two groups in the manager, and disabling "All extensions" from the users template which means its basically unusable.

I'm wondering if theres some remnants of the old config from FOP2Admin still lurking around which is conflicting with what the new manager is trying to do?

Comments

  • Hi,

    You will have to look at your fop2.cfg to see if you have a user=200 lines defined manually, perhaps that is getting in the way? Another thing to check is the output from autoconfig-users.sh or autoconfig-users-freepbx.sh, I believe you will have the later if you did not upgrade FOP2 to 2.28. Run that script, what is the output? Does it look "sane"? or it produces any errors? Do you see a line user=200:xxxx there? The xxxx would be the password you will have to use to log as such.

    As for groups, why it does not let you create groups? What happens when you try to create a group? Or groups were created but the user still sees everything? It is not clear from your description. If you created a group with say, 20 extensions, and assigned that group and only that group to a user, then check the output from the above script and see the user=xxx line, the 4th field is the group it has assigned. Also look from group=xxxx lines to see if the group is defined.

    It could be that you have some remanents for old tables that are getting in the way, but if you edit via FOP2 Manager then data should be 'correct' itself.

    I am online at the live help if you want to chat.

    Best regards,
  • I will run the scripts you mention and check what the output is. I'm not near the system just now, but i might be able to RDP into the office tonight and check the output and maybe get some screenshots of whats happening.

    The groups are created just fine in the manager interface, and can be assigned to a user, but they do not show up when that user logs in, and it doesnt let me remove the "all extensions" or "all queues" view either, so when someone logs in they see all the extensions and the group isnt there. Even if in the interface a user has only the group checked, when they login they can still see both the queues and extensions lists, and the group isnt there. It also doesnt seem to respond to me removing permissions for the buttons along the top.

    Oddly, i found that if i went into "Buttons" and typed something (i used "test") into the "group" field for each button, then a group would then appear called "test" containing the buttons that i'd added "test" to, even though there was no group called test defined anywhere.

    I guess we should upgrade to the latest version of FOP2 anyway, but i'm not sure if that would cure the issue or if something else is causing it.

    Regards
    Kevin
  • Ok, some clarifications as you are confusing a couple of things:

    The Groups section in the FOP2 Manager it is *NOT* to visually group extensions on the switchboard. To visually group them, you have to go to the Buttons section and fill the "group" field for each button. So what you experienced is perfectly fine, only that your expectations were different.

    The Groups section has a set of predefined groups that cannot be removed, they are there as shortcuts so you do not have to mantain groups whenever you add or remove an extension, or queue, or trunk, to your backend.

    So if your intention is to visually separate extensions in separate containers, then do not create any groups in the Groups tab, but go to the Buttons tab and populate the group field appropriately.

    One thing I forgot to mention that might be important.. when you upgrade FOP2, your fop2.cfg file is preserved. Now, if you upgrade from pre 2.27 to post 2.27, there is an important change as it executes a different script for getting user/button configurations. So my suggestion for you is to copy fop2.cfg.new as fop2.cfg and set the manager_user and manager_secret correctly after that. That way you will be running a fop2.cfg file matching your fop2 server version.

    Best regards,
  • Ah ok, thanks for the update.

    If the "groups"/containers can only be set inside the buttons menu, how can i set which user sees which containers?

    IE i want a "Front Office" and a "Back Office" container, some people get to see both, and some people only get to see one or the other, while also hiding the large "Extensions" group.

    I've not yet had a chance to investigate the other issues. I will try to do that this week.
  • Ok, further confusion.

    I've had a bit of time this morning, and i'm finding that changes i'm making are not being reflected in the panel.

    For instance i went thru and correctly tagged the buttons with the "group" i wanted them to show, however when i log into the panel, what i see is exactly as it was before, with two people in the "test" group and one person in "back office"

    I've somehow managed to get some users to only show the normal phones in the extensions group, but its unclear how i've managed this.

    Some further tinkering shows that if i manually restart FOP2 from the commandline (/etc/init.d/fop2 restart) then the changes are properly reflected. Pressing the reload button in the web interface however does nothing...
  • One thing is visual grouping (done by filling the group field on the Buttons tab). Another different thing is group filtering, done by creating groups in the Groups tab and then assigning whatever group to whatever users.

    As for the FOP2 reload not working, there are a couple of things to check. Reload is done via the configonreload plugin that is added by default, that plugin has a setting that you can change in its configuration, pointing to a php script (update_conf.php), that must be run whenever you reload asterisk or fop2.

    If the plugin is not installed, or the script location is incorrect, or the update_conf.php script fails to run for some reason, then reloads will not happen via web (you can force them via command line with the command 'service fop2 reload', there is no need to restart).

    Best regards,
  • Thanks, we're getting somewhere now. With only the physical extensions in a Group called "office" that then hides the voicemail stuff from the main "Extensions" panel. With the Group setting inside the buttons i've now got it correctly showing the front and back designations.

    Just the reload issue to fix now. We have a plugin called "FOP2 Autoconfiguration Plugin" which as a setting which points at:
    /usr/bin/php -f /var/www/html/fop2/admin/update_conf.php

    I can manually run that command, and it reports no errors, but it doesnt actually reload anything. No changes appear in the panel until i manually do "service fop2 reload" at the command line.

    Furthermore, that script overwrites changes i've made within the manager. For instance if i go into the "Buttons" menu and input peoples names instead of "Phone 200", "Phone 201" etc, then when i run that script it puts all of the original names back.

    Regards
    Kevin
  • I will try to explain how reloading works.

    * Running the update_conf.php script only updates the FOP2 backend database. It does not perform any actual reload on running services.

    * When you select Reload Asterisk or Reload FOP2 from the FOP2 Manager, then from the FOP2 Manager a UserEvent is generated via the Asterisk Management Interface. That UserEvent is then "consumed" by the FOP2 server process and when detected, it will run the autoconfig script and then perform a configuration reload.

    * When asterisk itself is reloaded, *in some asterisk versions* (as there was a regression bug on many many versions that prevented reload events from being fired) an AMI event is generated, that can also be consumed by the FOP2 server to run the auto config script and reload itself.

    So, if you have an Asterisk version that fires a Reload event over AMI (non bugged version), then whenever you make a change in your backend (like FreePBX) and reload your backend, then FOP2 should pick up the asterisk reload event and reload itself. If you have a bugged Asterisk version (notably most 11.x versions), then you must manually reload FOP2 from the FOP2 Manager.

    Perhaps, I am just speculating here, your manager user does not allow UserEvents from being fired. If that is the case, not only you will have issues with reloads, but with many other FOP2 features that relies on UserEvents from working (like chat).

    You can start FOP2 in debug mode, with level 1 debug, and then try to do reloads from the FOP2 Manager and see if you notice the Reload UserEvents in AMI.


  • Thanks.

    So i need to modify that script to stop it updating the names then, i think i can see the section at the end thats doing that.

    The FOP2 manager user has these permissions:

    read = system,call,log,verbose,command,agent,user,config,command,dtmf,reporting,cdr,dialplan,originate
    write = system,call,log,verbose,command,agent,user,config,command,dtmf,reporting,cdr,dialplan,originate

    Its the same user FreePBX itself is using.

    We are using Asterisk 11.4.0, however from what i've seen, if we force a reload thru freepbx, it DOES reload the FOP2 interface. Its only the buttons within the FOP2 Manager that dont work.

    I will try debug mode.
Sign In or Register to comment.