Custom GUI add USER

Hi all,

I am writing a Web Gui and I will integrate the FOP2 dispatcher console in it.
In the Admin part of the gui I would like to add the tab to add FOPusers instead of using FOP admin console.
Till now I added the user in the table mysql database asterisk.fop2users and sqlite database fop2settings.db, but when I try to login to the dispatcher console the login is unsuccessful.

If I add the same user with the same password using FOP2/Admin console the login works.
Can someone explain me how the procedure of adding new users works ?

Thank you

Br
Simon

Comments

  • You do not need to add anything to the sqlite fop2settings.db, it is not used for authentication and it will be populated by fop2 as soon as a user logs into fop2 and open up preferences from the GUI.

    You only need to add the entry to the fop2users table, but also all related tables (fop2plugins, fop2groups, fop2UserGroup, fop2UserPlugin) if you want to add groups and plugins to some user.

    Run /usr/local/fop2/autconfig-users.sh and inspect the output from when you add a user manually to the fop2users table, compare with a user created directly via the manager.

    In any case, your approach might be not the best. The FOP2 Manager can be configured to support custom backends, and do it the other way around. The FOP2 Manager can read your backend data and generate the proper buttons and user entries. When you reload Asterisk, fop2 will run the FOP2 Manager update conf script and retrieve any modifications into its own tables. That is how it works with all supported backends (FreePBX, MiRTA, Elastix 4, Thirdlane, etc).

    Best regards,
Sign In or Register to comment.