[asterisk-bugs] [Asterisk 0016655]: Double fields in SQL query
Asterisk Bug Tracker
noreply at bugs.digium.com
Tue Mar 16 12:08:45 CDT 2010
A NOTE has been added to this issue.
======================================================================
https://issues.asterisk.org/view.php?id=16655
======================================================================
Reported By: Yarik_rad
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 16655
Category: CDR/cdr_pgsql
Reproducibility: always
Severity: minor
Priority: normal
Status: acknowledged
Asterisk Version: 1.6.0.21
JIRA: SWP-780
Regression: No
Reviewboard Link:
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Request Review:
======================================================================
Date Submitted: 2010-01-20 04:48 CST
Last Modified: 2010-03-16 12:08 CDT
======================================================================
Summary: Double fields in SQL query
Description:
Try to connect Asterisk server with PostgreSQl database I've double fields
in SQL quere send to datbase.
Here is log of database server:
COMMAND: INSERT INTO cdr
("calldate","clid","src","dst","dcontext","channel","dstchannel","lastapp","lastdata","duration","billsec","disposition","amaflags",
"uniqueid","calldate","clid","src","dst","dcontext","channel","dstchannel","lastapp","lastdata","duration","billsec","disposition","amaflags","uniqueid","calldate",
"clid","src","dst","dcontext","channel","dstchannel","lastapp","lastdata","duration","billsec","disposition","amaflags","accountcode","uniqueid","userfield",
"calldate","clid","src","dst","dcontext","channel","dstchannel","lastapp","lastdata","duration","billsec","disposition","amaflags","accountcode","uniqueid","userfield")
VALUES ('2010-01-20 13:43:16','"User714"
<714>','714','9060','kvartira','SIP/714-00000057','SIP/pstn-00000058','Dial','SIP/999060 at pstn',13,2,'ANSWERED',3,'1263984196.87',
'2010-01-20 13:43:16','"User714"
<714>','714','9060','kvartira','SIP/714-00000057','SIP/pstn-00000058','Dial','SIP/999060 at pstn',13,2,'ANSWERED',3,'1263984196.87',
'2010-01-20 13:43:16','"User714"
<714>','714','9060','kvartira','SIP/714-00000057','SIP/pstn-00000058','Dial','SIP/999060 at pstn',13,2,'ANSWERED',3,'','1263984196.87','',
'2010-01-20 13:43:16','"User714"
<714>','714','9060','kvartira','SIP/714-00000057','SIP/pstn-00000058','Dial','SIP/999060 at pstn',13,2,'ANSWERED',3,'','1263984196.87','')
======================================================================
----------------------------------------------------------------------
(0119440) coolmig (reporter) - 2010-03-16 12:08
https://issues.asterisk.org/view.php?id=16655#c119440
----------------------------------------------------------------------
Same here, asterisk 1.6.0.26 connecting to PostgreSQL 8.4.
What I find is that fields are duplicate when the module loads, that's why
the insert queryf fails:
*CLI> module load cdr_pgsql.so
== Parsing '/etc/asterisk/cdr_pgsql.conf': == Found
*CLI> > Found column 'calldate' of type 'timestamptz'
> Found column 'calldate' of type 'timestamptz'
> Found column 'clid' of type 'varchar'
> Found column 'clid' of type 'varchar'
> Found column 'src' of type 'varchar'
> Found column 'src' of type 'varchar'
> Found column 'dst' of type 'varchar'
> Found column 'dst' of type 'varchar'
> Found column 'dcontext' of type 'varchar'
> Found column 'dcontext' of type 'varchar'
> Found column 'channel' of type 'varchar'
> Found column 'channel' of type 'varchar'
> Found column 'dstchannel' of type 'varchar'
> Found column 'dstchannel' of type 'varchar'
> Found column 'lastapp' of type 'varchar'
> Found column 'lastapp' of type 'varchar'
> Found column 'lastdata' of type 'varchar'
> Found column 'lastdata' of type 'varchar'
> Found column 'duration' of type 'int8'
> Found column 'duration' of type 'int8'
> Found column 'billsec' of type 'int8'
> Found column 'billsec' of type 'int8'
> Found column 'disposition' of type 'varchar'
> Found column 'disposition' of type 'varchar'
> Found column 'amaflags' of type 'int8'
> Found column 'amaflags' of type 'int8'
> Found column 'accountcode' of type 'varchar'
> Found column 'accountcode' of type 'varchar'
> Found column 'uniqueid' of type 'varchar'
> Found column 'uniqueid' of type 'varchar'
> Found column 'userfield' of type 'varchar'
> Found column 'userfield' of type 'varchar'
Loaded cdr_pgsql.so => (PostgreSQL CDR Backend)
Finding a solution...
Issue History
Date Modified Username Field Change
======================================================================
2010-03-16 12:08 coolmig Note Added: 0119440
======================================================================
More information about the asterisk-bugs
mailing list