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. Plugins
  3. Call History - SELECT command denied to user

Call History - SELECT command denied to user

Scheduled Pinned Locked Moved Plugins
10 Posts 7 Posters 1.5k 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.
  • M
    M
    milos
    wrote on last edited by
    #1

    I am working with a fresh install of FreePBX and am having trouble getting call history to display on any user panel or operator panel. I get the following error on FOP2:

    SELECT command denied to user ‘’@‘localhost’ for table ‘cdr’
    Thanks for any suggestions you can provide.

    1 Reply Last reply
    0
    • J
      J
      joshuamarius
      wrote on last edited by
      #2

      Make sure when you post that you specify the version you are using as that can help us troubleshoot better.

      This worked for me:
      Configure the file /var/www/html/fop2/config.php with the credentials to the Asterisk Database.
      I found the credentials to my system in the file: /etc/freepbx.conf
      Make sure the following line also exists in: /var/www/html/fop2/config.php
      $CDRDBTABLE = "asteriskcdrdb.cdr";
      After editing this, I restarted the service and all worked (you may also try a reboot)

      1 Reply Last reply
      0
      • J
        J
        Jay
        wrote on last edited by
        #3

        Hi joshuamarius,
        Do you have any idea with integrate yeastar PBX? I faced no record when I tried to check call history, I know it is via plugin and FOP2 server will save AMI cdr event to local database and also I have change file /var/www/html/fop2/config.php to details as show in the photo, I still not able to get cdr, also it's none saved in database when I access mysql to check.

        1 Reply Last reply
        0
        • J
          J
          Jay
          wrote on last edited by
          #4



          the database pruebacdr is created automatically when I configure plugin CDR to DataBase on fop2 manager, but the table cdr is not created automatically while other 3 tables created automatically and when I add contact on user profile, it added in visual_phonebook table, any idea for my problem?
          It's great appreciation if somebody would check this.

          1 Reply Last reply
          0
          • J
            J
            joshuamarius
            wrote on last edited by
            #5

            I'm sorry; I've only worked with FreePBX. Maybe the forum Admin can help you.

            1 Reply Last reply
            0
            • B
              B
              bayyou
              wrote on last edited by
              #6

              Just like milos said, you have to make sure you put database setting in your pbx into your fop2. in here whe you use freepbx you can find database setting (dbname, user, password) in the /etc/freepbx.conf and change fop2 database setting, you can find in the /var/www/html/fop2/config.php.

              1 Reply Last reply
              0
              • D
                D
                develissimo
                wrote on last edited by
                #7

                @bayyou This is not fixed yet on FOP2 v 2.31.29 after upgrade from FOP2 v 2.31.25 to v 2.31.29!
                This should not be an issue with DB settings in /var/www/html/fop2/config.php due to the fact, that the DB settings are programmatically and correctly fetched with this procedure in /var/www/html/fop2/config.php:
                if(function_exists('mysqli_connect')) {

                    $db = new dbcon($DBHOST, $DBUSER, $DBPASS, $DBNAME, false, true, $FORCE_UTF8);
                
                    if(!$db->is_connected()) {
                        // Database connection details from amportal 
                        if (is_readable("/etc/amportal.conf")) {
                            $amp_conf = parse_amportal_conf("/etc/amportal.conf");
                            $DBHOST = $amp_conf['AMPDBHOST'];
                            $DBNAME = $amp_conf['AMPDBNAME'];
                            $DBUSER = $amp_conf['AMPDBUSER'];
                            $DBPASS = $amp_conf['AMPDBPASS'];
                        } else if (is_readable("/etc/freepbx/freepbx.conf")) {
                            $amp_conf = parse_amportal_conf("/etc/freepbx/freepbx.conf");
                            $DBHOST = $amp_conf['AMPDBHOST'];
                            $DBNAME = $amp_conf['AMPDBNAME'];
                            $DBUSER = $amp_conf['AMPDBUSER'];
                            $DBPASS = $amp_conf['AMPDBPASS'];
                        } else if (is_readable("/etc/freepbx.conf")) {
                            $amp_conf = parse_amportal_conf("/etc/freepbx.conf");
                            $DBHOST = $amp_conf['AMPDBHOST'];
                            $DBNAME = $amp_conf['AMPDBNAME'];
                            $DBUSER = $amp_conf['AMPDBUSER'];
                            $DBPASS = $amp_conf['AMPDBPASS'];
                        } else if (is_readable("/etc/asterisk/snep/snep-features.conf")) {
                            $DBHOST = 'localhost';
                            $DBNAME = 'snep';
                            $DBUSER = 'snep';
                            $DBPASS = 'sneppass';
                            $CDRDBTABLE = "snep.cdr";
                        }
                        $db = new dbcon($DBHOST, $DBUSER, $DBPASS, $DBNAME, true, true, $FORCE_UTF8);
                    }
                
                    set_config($DBSETUP);
                
                }
                

                So there is still a Bug in FOP2 not able to show "Call History".

                1 Reply Last reply
                0
                • D
                  D
                  develissimo
                  wrote on last edited by
                  #8

                  Now after trying to reinstall "Call History" the plugin installer reports "Not compatible with this version".
                  Call History not compatible with this version... Great, but no warning message before upgrading FOP2... damned.

                  So we have to stick to FreePBX v14 and FOP2 2.31.25 until Call History is fixed and ready for new version of FreePBX v15.

                  1 Reply Last reply
                  0
                  • K
                    K
                    kelmore
                    wrote on last edited by
                    #9

                    Any update on this? We think we are in the same boat.

                    1 Reply Last reply
                    0
                    • G
                      G
                      gkuhns
                      wrote on last edited by
                      #10

                      Has anyone been able to get this to work?

                      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