Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

FOP2 Community Forum

  1. Home
  2. Support
  3. buttons file for multiple freepbx

buttons file for multiple freepbx

Scheduled Pinned Locked Moved Support
8 Posts 2 Posters 156 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C
    C
    cbsys
    wrote on last edited by
    #1

    Hi, I know its possible to link 2x asterisk boxs to fop2 by putting the 2nd PBX in the fop2.cfg file

    However, as these are Freepbx based, the buttons are configured automatically by the fop2 module for FPBX.

    I want to show the buttons from PBX2 on PBX1
    This is probably not something that can be done automatically - but could get fop2 to read the autobuttons file AND the manual buttons file??

    I could then have all PBX1 buttons created automatically, and just manually add the few extra buttons for PBX2

    Is this possible?

    1 Reply Last reply
    0
    • N
      N
      nicolas
      wrote on last edited by
      #2

      Its possible but you have to do several tweak by hand

      1. setup passwordless ssh between both servers
      2. install fop2admin on the 2nd asterisk box
      3. copy autoconfig-users-freepbx.sh and autoconfig-buttons-freepbx.sh into the 2ndary box
      4. edit those scripts to add a server=x.x.x.x line, and display only extensions to avoid name collisions with trunks/park
      5. edit autoconfig scripts on main server to run via ssh autoconfig scripts in the remote box

      We do this kind of work, for a fee. It is not that hard but it is not easy either, it takes time to set everything up.

      Best regards,

      1 Reply Last reply
      0
      • C
        C
        cbsys
        wrote on last edited by
        #3

        Thanks, I should be able to do that without too much difficulty!

        1 Reply Last reply
        0
        • C
          C
          cbsys
          wrote on last edited by
          #4

          Nicolas,

          Ive just finished setting that up, but when we run the buttons script on PBX2 from PBX1 we get this error-

          /root/autoconfig-buttons-freepbx.sh: line 41: syntax error near unexpected token <' /root/autoconfig-buttons-freepbx.sh: line 41: done < <( mysql -NB -u $DBUSER -p$DBPASS -h $DBHOST $DBNAME -e "SHOW tables FROM `$DBNAME` LIKE 'fop2users'" )'

          1 Reply Last reply
          0
          • N
            N
            nicolas
            wrote on last edited by
            #5

            If the script runs on one server, it should also run on the other. What modifications did you do? Perhaps some kind of syntax error was introduced (?). Have you installed fop2admin on that server? The particular line that gives you an error and the 3 previous lines can be removed and replaced with FOP2PLUGIN=1 if fop2admin is already installed.

            1 Reply Last reply
            0
            • C
              C
              cbsys
              wrote on last edited by
              #6

              I have fop2 admin on both servers

              Server 1 calls the script autoconfig-buttons-freepbx.sh on server 2 via SSH
              autoconfig-buttons-freepbx.sh script on server 2 has server=x.x.x.x as the first line (correct IP address though!)

              Is this incorrect? It seems to be the correct method you mentioned previously on this thread.

              1 Reply Last reply
              0
              • N
                N
                nicolas
                wrote on last edited by
                #7

                it is correct, but you can just run the script on the local machine, the error will be the same. You can modify the script as I said in the previous post, if you have fop2admin installed, just set the variable to 1 and remove the block that tests for its existence and that for some reason is giving you that error only on one of the servers.

                1 Reply Last reply
                0
                • C
                  C
                  cbsys
                  wrote on last edited by
                  #8

                  Thanks! That seems to have worked!

                  1 Reply Last reply
                  0

                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                  With your input, this post could be even better 💗

                  Register Login
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  Powered by NodeBB Contributors
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups