Details

    • Type: New Feature New Feature
    • Status: Closed
    • Severity: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Target Release Version/s: None
    • Component/s: Applications/app_queue
    • Labels:
      None

      Description

      I was playing with the RT queue log functionality, and found this limitations:

      1. If you choose RT queue logging, you won't have the traditional plain text file file log. This file is very useful for backup purposes.
      2. The column 'data' stores all the parameters separated by '|', which is not the best way to store it.

      I managed to program a patch which overcomes this limitations, and works this way:

      1. If you enable RT queue logging, the queue log will still be logged in the plain text file, so you have some backup in case of some database disaster.
      2. The parameters are now "exploded", and put in separate fields for each one. The only thing here is that this code must be changed in case that some queue log event delivers more than 4 parameters (the only event that gives 4 parameters is TRANSFER).
      3. The calldate is now stored just like the CDR, with a full datetime.
      4. The plain text file is left as is, for compatibility purposes.
      5. The fieldnames on the table changed a little.

                • ADDITIONAL INFORMATION ******

      Given this changes, the proposed queue_log realtime table is this one (for PostgreSQL):

      CREATE TABLE "queue_log" (
      "id" SERIAL,
      "eventdate" TIMESTAMP WITH TIME ZONE DEFAULT now() NOT NULL,
      "cdr_uniqueid" VARCHAR(32) DEFAULT ''::character varying NOT NULL,
      "queuename" VARCHAR(32) DEFAULT ''::character varying NOT NULL,
      "agent" VARCHAR(32) DEFAULT ''::character varying NOT NULL,
      "event" VARCHAR(32) DEFAULT ''::character varying NOT NULL,
      "data1" VARCHAR(100) DEFAULT ''::character varying NOT NULL,
      "data2" VARCHAR(100) DEFAULT ''::character varying NOT NULL,
      "data3" VARCHAR(100) DEFAULT ''::character varying NOT NULL,
      "data4" VARCHAR(100) DEFAULT ''::character varying NOT NULL,
      CONSTRAINT "queue_log_pkey" PRIMARY KEY("id")
      ) WITHOUT OIDS;

      I tested this patch on asterisk 1.6.0.26 and works like a charm!
      You will find patches for asterisk 1.6.0.26 and latest trunk (SVN r253918)

      Just like issue 11625, I hope the community would love this patch!

      1. 20100623__issue17082.diff.txt
        5 kB
        Tilghman Lesher
      2. 20100625__issue17082.diff.txt
        16 kB
        Tilghman Lesher
      3. 20100628__issue17082.diff.txt
        17 kB
        Tilghman Lesher
      4. 20100720__issue17082.diff.txt
        14 kB
        Tilghman Lesher
      5. patch_issue_17082_ast1.8.0-branch.diff
        2 kB
        Miguel Molina
      6. patch_realtime_queue_log_ast_1.6.0.26.diff
        3 kB
        Miguel Molina
      7. patch_realtime_queue_log_ast_trunk_ok_5data_rev1.diff
        3 kB
        Miguel Molina
      8. patch_realtime_queue_log_ast_trunk_ok_5data.diff
        3 kB
        Miguel Molina
      9. patch_realtime_queue_log_ast_trunk_ok.diff
        3 kB
        Miguel Molina
      10. patch_realtime_queue_log_ast_trunk.diff
        3 kB
        Miguel Molina

        Issue Links

          Activity

          Hide
          Digium Subversion added a comment -

          Repository: asterisk
          Revision: 284472

          U branches/1.6.2/res/res_config_pgsql.c

          ------------------------------------------------------------------------
          r284472 | tilghman | 2010-09-01 13:13:36 -0500 (Wed, 01 Sep 2010) | 5 lines

          Don't warn on floats and timestamps

          (closes issue ASTERISK-15863)
          Reported by: coolmig

          ------------------------------------------------------------------------

          http://svn.digium.com/view/asterisk?view=rev&revision=284472

          Show
          Digium Subversion added a comment - Repository: asterisk Revision: 284472 U branches/1.6.2/res/res_config_pgsql.c ------------------------------------------------------------------------ r284472 | tilghman | 2010-09-01 13:13:36 -0500 (Wed, 01 Sep 2010) | 5 lines Don't warn on floats and timestamps (closes issue ASTERISK-15863 ) Reported by: coolmig ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=284472
          Hide
          Digium Subversion added a comment -

          Repository: asterisk
          Revision: 284473

          _U branches/1.8/
          U branches/1.8/res/res_config_pgsql.c

          ------------------------------------------------------------------------
          r284473 | tilghman | 2010-09-01 13:16:38 -0500 (Wed, 01 Sep 2010) | 12 lines

          Merged revisions 284472 via svnmerge from
          https://origsvn.digium.com/svn/asterisk/branches/1.6.2

          ........
          r284472 | tilghman | 2010-09-01 13:13:35 -0500 (Wed, 01 Sep 2010) | 5 lines

          Don't warn on floats and timestamps

          (closes issue ASTERISK-15863)
          Reported by: coolmig
          ........

          ------------------------------------------------------------------------

          http://svn.digium.com/view/asterisk?view=rev&revision=284473

          Show
          Digium Subversion added a comment - Repository: asterisk Revision: 284473 _U branches/1.8/ U branches/1.8/res/res_config_pgsql.c ------------------------------------------------------------------------ r284473 | tilghman | 2010-09-01 13:16:38 -0500 (Wed, 01 Sep 2010) | 12 lines Merged revisions 284472 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r284472 | tilghman | 2010-09-01 13:13:35 -0500 (Wed, 01 Sep 2010) | 5 lines Don't warn on floats and timestamps (closes issue ASTERISK-15863 ) Reported by: coolmig ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=284473
          Hide
          Digium Subversion added a comment -

          Repository: asterisk
          Revision: 284474

          _U trunk/
          U trunk/res/res_config_pgsql.c

          ------------------------------------------------------------------------
          r284474 | tilghman | 2010-09-01 13:19:13 -0500 (Wed, 01 Sep 2010) | 19 lines

          Merged revisions 284473 via svnmerge from
          https://origsvn.digium.com/svn/asterisk/branches/1.8

          ................
          r284473 | tilghman | 2010-09-01 13:16:37 -0500 (Wed, 01 Sep 2010) | 12 lines

          Merged revisions 284472 via svnmerge from
          https://origsvn.digium.com/svn/asterisk/branches/1.6.2

          ........
          r284472 | tilghman | 2010-09-01 13:13:35 -0500 (Wed, 01 Sep 2010) | 5 lines

          Don't warn on floats and timestamps

          (closes issue ASTERISK-15863)
          Reported by: coolmig
          ........
          ................

          ------------------------------------------------------------------------

          http://svn.digium.com/view/asterisk?view=rev&revision=284474

          Show
          Digium Subversion added a comment - Repository: asterisk Revision: 284474 _U trunk/ U trunk/res/res_config_pgsql.c ------------------------------------------------------------------------ r284474 | tilghman | 2010-09-01 13:19:13 -0500 (Wed, 01 Sep 2010) | 19 lines Merged revisions 284473 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r284473 | tilghman | 2010-09-01 13:16:37 -0500 (Wed, 01 Sep 2010) | 12 lines Merged revisions 284472 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r284472 | tilghman | 2010-09-01 13:13:35 -0500 (Wed, 01 Sep 2010) | 5 lines Don't warn on floats and timestamps (closes issue ASTERISK-15863 ) Reported by: coolmig ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=284474
          Hide
          Eugene added a comment -

          Hello! Does this table structure for PostgreSQL queue_log appear somewhere in the docs? Maybe it worth putting it to /contrib/realtime/postgresql
          I see there a file /contrib/realtime/mysql/queue_log.sql for MySQL but nothing for PostgreSQL

          Show
          Eugene added a comment - Hello! Does this table structure for PostgreSQL queue_log appear somewhere in the docs? Maybe it worth putting it to /contrib/realtime/postgresql I see there a file /contrib/realtime/mysql/queue_log.sql for MySQL but nothing for PostgreSQL
          Hide
          Matt Jordan added a comment -

          If you'd like to create a patch containing the SQL statements needed to create the queue_log table for PostgreSQL, please open a new issue, sign a contributor license agreement, and attached the patch. Thanks!

          Show
          Matt Jordan added a comment - If you'd like to create a patch containing the SQL statements needed to create the queue_log table for PostgreSQL, please open a new issue, sign a contributor license agreement, and attached the patch. Thanks!

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development