Vanilla Asterisk - FOP2 and FOP2 Manager Module

  1. 8 years ago

    Hi,

    I'm confuse on FOP2 and Vanilla. I have commented the last line with the exec autoconfig-users.sh and I have created two users with a button files :

    user=213:213:all
    user=221:221:all
    buttonfile=buttons.cfg

    Then In the button files I have created 6 extensions + 3 queues + 2 trunk. This is all working fine.

    Now I needed the have the Queue Alarm plugin, from what I understand I needed to use the FOP2 Manager to install the plugin. At first I could install the plugin but when I tried to check the "Globally Enable" check box. It didn't work for some reason. I have created a MySQL database for FOP2 manager and edited the configuration files to use that database. Now it seem to be working, the plugin is installed and enabled. But...

    Now if I go to the button and users sections, FOP2 Manager imported some of my peers but they are all mess up. For example, like 30% of my user are defined with the type trunk instead of extensions. And I can't seem to edit thoses ???

    Also, how do I created a new button manually ???
    How are the button populated ??? (Which script is run ?)

    Anyway, I decided to try to login in FOP2 as a user to see the result, but it's not working. Which context is fop2 manager using to create the buttons/users ? How to access the "tenant" created by FOP2 Manager 9 (http://192.168.1.X/fop2/?context=XXXX) ?

    Finally, how to I enable a plugin on a user if I'm using command line (no fop2 manager) to a user ?

    Thx for reading my wall of text but I'm sure if some take the time to answer my questions, this will help a lots of people because the documentation is not complete if you want to use fop2 manager + Vanilla Asterisk.

    Thx

  2. admin

    23 Sep 2016 Administrator

    You cannot expect nothing done in the manager to work if you use manual configuration.

    My suggestion is you change your fop2.cfg back to use #exec autoconfig-users.sh instead of any manual entries you had defined. Remove your user=xxx lines, remove your buttonfile=xxx line.

    Then if you have a buttons.cfg, rename it to buttons-custom.cfg

    Then log into the fop2 manager and you should see the buttons defined in the buttons tab.

    Go ahead and create some users, enable plugins for them.

    Restart fop2 , and everything (including plugins) will work fine.

    Best regards,

  3. Hi,

    I have done what you said but I still see 150 buttons (which see to be imported from somewhere.

    1. Why do I need to have #exec autoconfig-users.sh ? I'm running a vanilla Asterisk and this script doesn't really seem to understand the way I create my peer. Can't I just disable this script completely and create the button in the fop2manager ?

    2. If I understand well, the button need to be generated by script and the fop2manager is using the file button-custom.cfg to load the button ?

    Thx !

  4. admin

    23 Sep 2016 Administrator

    If you see 150 buttons imported, then the fop2 manager custom functions (probably functions-astdb.php) are picking them up from standard locations, and doing a good job by default in your case. Are those buttons totally random? Or something you know in your system?

    Why you want to run autoconfig-users.sh ? Because you want to use the FOP2 Manager... I recommend to use the FOP2 Manager myself as you will be able to use the full potential of FOP2, including permissions, groups and plugins, without the need to do everything by hand.

    The only thing you must finally decide is how to get the buttons populated. And that is done with simple php functions that can be tweaked, and if you do not like them, change them.

    Look at functions-astdb.php (probably the auto detected function it is being used, you can see that on the engine part on the fop 2manager dashboard). You can edit config.php and change the engine to "custom" and i twill use functions-custom.php instead... in that way you can edit that file and tweak it, like modify it to read peers from a database, or from sip.conf, or a combination, or NEITHER.

    The manager also reads buttons_custom.cfg and will insert those into its database, so that is the way to add custom buttons in the manager, by adding them into buttons_custom.cfg.

    Best regards,

or Sign Up to reply!