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. call history + odbc_cdr

call history + odbc_cdr

Scheduled Pinned Locked Moved Support
15 Posts 2 Posters 334 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.
  • A
    A
    AlexRS
    wrote on last edited by
    #1

    Hi! Will call history works with cdr_odbc? I try, but history is empty
    'src' and 'dst' fields exists in table

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

      driver (odbc or mysql) does not matter, but you might want to look at the cdr table schema, and database and table names (That you can set in config.php).

      Best regards,

      1 Reply Last reply
      0
      • A
        A
        AlexRS
        wrote on last edited by
        #3

        The tables is different. I use cdr adaptive odbc with default asterisk schema (asterisk cert 13.8). Its because cdr_mysql is market as depricated.
        We want to buy asternic cdr report too. Do we have to go back to cdr mysql or we can use odbc?

        1 Reply Last reply
        0
        • A
          A
          AlexRS
          wrote on last edited by
          #4

          Its ODBC
          CREATE TABLE cdr (
          accountcode varchar(20) DEFAULT NULL,
          src varchar(80) DEFAULT NULL,
          dst varchar(80) DEFAULT NULL,
          dcontext varchar(80) DEFAULT NULL,
          clid varchar(80) DEFAULT NULL,
          channel varchar(80) DEFAULT NULL,
          dstchannel varchar(80) DEFAULT NULL,
          lastapp varchar(80) DEFAULT NULL,
          lastdata varchar(80) DEFAULT NULL,
          start datetime DEFAULT NULL,
          answer datetime DEFAULT NULL,
          end datetime DEFAULT NULL,
          duration int(11) DEFAULT NULL,
          billsec int(11) DEFAULT NULL,
          disposition varchar(45) DEFAULT NULL,
          amaflags varchar(45) DEFAULT NULL,
          userfield varchar(256) DEFAULT NULL,
          uniqueid varchar(150) DEFAULT NULL,
          linkedid varchar(150) DEFAULT NULL,
          peeraccount varchar(20) DEFAULT NULL,
          sequence int(11) DEFAULT NULL
          ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

          --
          -- Дамп данных таблицы cdr

          INSERT INTO cdr (accountcode, src, dst, dcontext, clid, channel, dstchannel, lastapp, lastdata, start, answer, end, duration, billsec, disposition, amaflags, userfield, uniqueid, linkedid, peeraccount, sequence) VALUES
          (NULL, NULL, '17710', 'incom', '"user101" <>', 'IAX2/user101-15651', 'IAX2/user151-21434', 'Dial', 'IAX2/user151/10,40', '2016-12-21 17:08:37', '2016-12-21 17:08:37', '2016-12-21 17:09:17', 40, 40, 'NO ANSWER', 'DOCUMENTATION', NULL, 'List-1482329317.9312', 'List-1482329317.9312', NULL, 1070);

          and MySQL schema

          CREATE TABLE cdr_old (
          id int(11) NOT NULL,
          calldate datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
          clid varchar(80) NOT NULL DEFAULT '',
          src varchar(80) NOT NULL DEFAULT '',
          dst varchar(80) NOT NULL DEFAULT '',
          dcontext varchar(80) NOT NULL DEFAULT '',
          channel varchar(80) NOT NULL DEFAULT '',
          dstchannel varchar(80) NOT NULL DEFAULT '',
          lastapp varchar(80) NOT NULL DEFAULT '',
          lastdata varchar(80) NOT NULL DEFAULT '',
          duration int(11) NOT NULL DEFAULT '0',
          billsec int(11) NOT NULL DEFAULT '0',
          disposition varchar(45) NOT NULL DEFAULT '',
          amaflags int(11) NOT NULL DEFAULT '0',
          accountcode varchar(20) NOT NULL DEFAULT '',
          userfield varchar(255) NOT NULL DEFAULT '',
          uniqueid varchar(32) NOT NULL DEFAULT ''
          ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

          --
          -- Дамп данных таблицы cdr_old

          INSERT INTO cdr_old (id, calldate, clid, src, dst, dcontext, channel, dstchannel, lastapp, lastdata, duration, billsec, disposition, amaflags, accountcode, userfield, uniqueid) VALUES
          (1, '2015-12-20 18:09:57', '"1001" <1001>', '1001', '7170', 'incom', 'OOH323/cisco', '', 'Dial', '', 3, 3, 'ANSWERED', 3, 'ast_h323', '', 'asterisk_list-1450624197.0');

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

            Try to edit calldetailrecords.php and set $datefield to the value corresponding to your schema (start), instead of the default 'calldate'.

            You can set that around line 18 of such script.

            Best regards,

            1 Reply Last reply
            0
            • A
              A
              AlexRS
              wrote on last edited by
              #6

              I will try tomorrow, thank you!
              What aboute odbc schema and asternic cdr report? Will it work?

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

                In Asternic CDR Standalone, in config.php you can configure the $DATEFIELD to be 'start' , so it should work.

                1 Reply Last reply
                0
                • A
                  A
                  AlexRS
                  wrote on last edited by
                  #8

                  Its works, but 'View record' page is still empty (In mysql schema it was empty too)..

                  1 Reply Last reply
                  0
                  • A
                    A
                    AlexRS
                    wrote on last edited by
                    #9

                    Its printscreen

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

                      You can enable debug in config.php and see if you get some errors. It is not possible for me to test locally.

                      1 Reply Last reply
                      0
                      • A
                        A
                        AlexRS
                        wrote on last edited by
                        #11

                        I get this:

                        notice
                        /var/www/html/fop2/lib/dblib.php (line 59)

                        mysqli::mysqli(): Headers and client library minor version mismatch. Headers:50550 Library:50635
                        notice
                        /var/www/html/fop2/calldetailrecords.php (line 241)

                        Undefined index: filterdir
                        notice
                        /var/www/html/fop2/calldetailrecords.php (line 260)

                        Undefined index: filterdispo
                        View Record
                        notice
                        /var/www/html/fop2/lib/dblib.php (line 356)

                        mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given

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

                          hmmm, this:

                          Headers and client library minor version mismatch. Headers:50550 Library:50635

                          seems to indicate that you have conflicting packages/versions installed for mysql and libaries.... maybe the problem is a result of that mismatch. You will have to be sure you have same version of mysql-xx everything installed.

                          1 Reply Last reply
                          0
                          • A
                            A
                            AlexRS
                            wrote on last edited by
                            #13

                            I think, the problem is here
                            /var/www/html/fop2/lib/dblib.php (line 356)

                            mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given

                            i.e. mysqli_num_rows(this->result), this->result doesnt contain mysqli_result data. Plese show, where its colled in detail record.
                            PS. When I comment this function and return 1 instead, I see "cancel" button on detail record page. The problem is here.

                            1 Reply Last reply
                            0
                            • A
                              A
                              AlexRS
                              wrote on last edited by
                              #14

                              The problem was solved by

                              diff tmp/dbgrid.php lib/dbgrid.php
                              2618c2618
                              <         $res = $this->link->consulta("SELECT $this->fields FROM %s %s WHERE %s = %s %s",$this->table,$joinstring,$this->table.".".$this->pk,$id, $this->groupby);
                              ---
                              >         $res = $this->link->consulta("SELECT $this->fields FROM %s %s WHERE %s = '%s' %s",$this->table,$joinstring,$this->table.".".$this->pk,$id, $this->groupby);
                              
                              1 Reply Last reply
                              0
                              • N
                                N
                                nicolas
                                wrote on last edited by
                                #15

                                thanks,

                                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