[asterisk-bugs] [JIRA] (ASTERISK-15863) [patch] Improve realtime queue logging

Matt Jordan (JIRA) noreply at issues.asterisk.org
Sun Jan 13 14:37:45 CST 2013


    [ https://issues.asterisk.org/jira/browse/ASTERISK-15863?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=201404#comment-201404 ] 

Matt Jordan commented on ASTERISK-15863:
----------------------------------------

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!
                
> [patch] Improve realtime queue logging
> --------------------------------------
>
>                 Key: ASTERISK-15863
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-15863
>             Project: Asterisk
>          Issue Type: New Feature
>          Components: Applications/app_queue
>            Reporter: Miguel Molina
>         Attachments: 20100623__issue17082.diff.txt, 20100625__issue17082.diff.txt, 20100628__issue17082.diff.txt, 20100720__issue17082.diff.txt, patch_issue_17082_ast1.8.0-branch.diff, patch_realtime_queue_log_ast_1.6.0.26.diff, patch_realtime_queue_log_ast_trunk.diff, patch_realtime_queue_log_ast_trunk_ok_5data.diff, patch_realtime_queue_log_ast_trunk_ok_5data_rev1.diff, patch_realtime_queue_log_ast_trunk_ok.diff
>
>
> 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! ;-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list