buttons file for multiple freepbx

  1. 12 years ago

    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?

  2. admin

    19 Oct 2012 Administrator

    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,

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

  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'" )'

  5. admin

    8 Nov 2012 Administrator

    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.

  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.

  7. admin

    8 Nov 2012 Administrator

    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.

  8. Thanks! That seems to have worked!

or Sign Up to reply!