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. no buttons and extension in Elastix 1.6-14

no buttons and extension in Elastix 1.6-14

Scheduled Pinned Locked Moved Support
6 Posts 3 Posters 88 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.
  • L
    L
    logtech
    wrote on last edited by
    #1

    I am able to login but it says NO BUTTONS and there are no extensions

    Please advice,

    LOG

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

      Run

      /usr/local/fop2/autoconfig-buttons-freepbx.sh

      And look at the output.

      Did you make some changes to fop2.cfg ? Did you install the fop2admin module ?

      1 Reply Last reply
      0
      • S
        S
        seowphin
        wrote on last edited by
        #3

        Hi,

        I have run /usr/local/fop2/autoconfig_buttons_freepbx.sh both with and without fop2admin.

        When the fop2admin plugin installed, I can't see any extensions except ZAP/G0 and ZAP/G1.

        When the fop2admin plugin uninstalled, I can see all the extension buttons.

        I looked into the shell script /usr/local/fop2/autoconfigure_buttons_freepbx.sh and I realized that the script
        actually retrieve the extension buttons from the table fop2buttons when it found there is fop2admin plugin as shown below:-

        mysql -ENB -u $DBUSER -p$DBPASS -h $DBHOST $DBNAME -e
        "SELECT device AS channel,type,if(type<>'trunk',exten,'') AS extension,
        label,mailbox,context,'$QUEUECONTEXT' as queuecontext,concat('',mailbox) AS extenvoicemail,
        privacy,`group`,IF(type='trunk',IF(email<>'',concat('splitme-',email),''),email) as email,
        queuechannel,originatechannel FROM fop2buttons WHERE device NOT LIKE 'USER/%' AND device<>''
        ORDER BY type,exten" | sed '/**/d' | sed 's/: /=/g' | sed '/.
        =$/d' | while read LINEA

        So, I open and view the data in the table fop2buttons, and I noticed that there only 3 records which are the
        ZAP/G0, ZAP/G1 and Park/default? Where are the extensions? I can only found them in table fop2users???

        Can anyone please advise me what is gone here?

        Thankyou and best regards,
        Chu

        1 Reply Last reply
        0
        • S
          S
          seowphin
          wrote on last edited by
          #4

          HI
          I have realised the real issue that actually causing all extensions gone.

          That is the "Apply Configure change" red button on top screwed up the whole thing!!! (I am running on FreePBX 2.2.1)

          When I select fop2admin from Module Admin and click on "process", and then click on "confirm" button to complete the installation, I immediately login into mysql and look into table fop2buttons and I can see all the extensions are there. However, when I click on the red button "Apply configuration changes" on top, and I try view the table again, all extension are gone except the last 3 records??? how come like that?

          Regards,
          Chu

          1 Reply Last reply
          0
          • S
            S
            seowphin
            wrote on last edited by
            #5

            Hi guys,

            I have finally fixed my problem by editing the PHP script in /var/www/html/admin/modules/fop2admin.
            In the PHP file functions.inc.php, I comment the following statement, then ev erything is working fine for now.
            Cheers!
            Best regards,
            Chu

                   // fop2_del_button($boton_id_a_borrar);
            

            <?php

            function fop2admin_get_config($engine) {
            // Executed on APPLY in FreePBX, we regenerate the fop2buttons if needed
            global $amp_conf, $db, $active_modules;

            $fopbutton        = fop2_all_freepbx_buttons();
            $botonesdefinidos = fop2_list_botones();
            
            foreach ($botonesdefinidos as $devname => $datarray) {
               if(!array_key_exists($devname,$fopbutton)) {
                   $results = sql("SELECT id FROM fop2buttons WHERE device='$devname'","getRow",DB_FETCHMODE_ASSOC);
                   $boton_id_a_borrar  = $results['id'];
                   // fop2_del_button($boton_id_a_borrar);[/color:14yvsbpm]
               }
            }
            
            1 Reply Last reply
            0
            • S
              S
              seowphin
              wrote on last edited by
              #6

              Hi guys,

              Another issue is the user deletion, when I delete FOP user, it did not delete user from the fop2uttons.
              So, I have edit the functions.inc.php again to look for the function statement fop2_del_user($id),
              and I added a new line to delete the user from fop2buttons using the exten field.
              Cheers!

              Regards,
              Chu

              function fop2_del_user($id) {
              $id = intval($id);
              $thisItem = fop2_get_user($id);
              $exten = $thisItem['exten'];
              $results = sql("DELETE FROM fop2UserGroup WHERE exten = '$exten'","query");
              $results = sql("DELETE FROM fop2users WHERE id = '$id'","query");
              $results = sql("DELETE FROM fop2buttons WHERE exten = '$exten'","query");[/color:3pgvj4ls]

              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