[asterisk-bugs] [Asterisk 0016940]: [patch] Problem inserting CDR records when certain characters are used
Asterisk Bug Tracker
noreply at bugs.digium.com
Wed Sep 22 10:14:03 CDT 2010
A NOTE has been added to this issue.
======================================================================
https://issues.asterisk.org/view.php?id=16940
======================================================================
Reported By: jamicque
Assigned To: tilghman
======================================================================
Project: Asterisk
Issue ID: 16940
Category: CDR/cdr_pgsql
Reproducibility: have not tried
Severity: major
Priority: normal
Status: closed
Target Version: 1.6.2.15
Asterisk Version: SVN
JIRA: SWP-988
Regression: No
Reviewboard Link:
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Request Review:
Resolution: fixed
Fixed in Version:
======================================================================
Date Submitted: 2010-03-01 15:41 CST
Last Modified: 2010-09-22 10:14 CDT
======================================================================
Summary: [patch] Problem inserting CDR records when certain
characters are used
Description:
Hi, 1 on every 20 CDRs ends like lob below:
[Mar 1 19:35:00] VERBOSE[25629] cdr_pgsql.c: > [INSERT INTO cdr
("calldate","clid","src","dst","dcontext","channel","dstchannel","lastapp","lastdata","duration","billsec
","disposition","amaflags","accountcode","uniqueid","userfield") VALUES
('2010-03-01 19:34:15','"+48514549083"
<514549083>','514549083','metalzbyt','CALLEX','SIP/metalzbyt-00000
843','Local/slawomir_plata at CALLEX-f2ea;1','AGI','HANGUP',45,0,'NO
ANSWER',3,'metalzbyt','1267468455.4476','A:+48514549083;SI:SIP/FreeconNet;B:+48586863734;DI:CALLEX/Ko?cierzyna;
')]
[Mar 1 19:35:00] DEBUG[25631] pbx.c: Function result is
'A:+48514549083;SI:SIP/FreeconNet;B:sabina_armatowska|sabina_armatowska|sabina_armatowska;DI:CALLEX/sabina_armatowska;'
[Mar 1 19:35:00] DEBUG[25629] cdr_pgsql.c: inserting a CDR record.
[Mar 1 19:35:00] DEBUG[19732] devicestate.c: No provider found, checking
channel drivers for Local - sabina_armatowska at CALLEX
[Mar 1 19:35:00] ERROR[25629] cdr_pgsql.c: Failed to insert call detail
record into database!
[Mar 1 19:35:00] ERROR[25629] cdr_pgsql.c: Reason: ERROR: invalid byte
sequence for encoding "UTF8": 0xb6
HINT: This error can also happen if the byte sequence does not match the
encoding expected by the server, which is controlled by "client_encoding".
[Mar 1 19:35:00] DEBUG[19732] chan_local.c: Checking if extension
sabina_armatowska at CALLEX exists (devicestate)
[Mar 1 19:35:00] ERROR[25629] cdr_pgsql.c: Connection may have been
lost... attempting to reconnect.
[Mar 1 19:35:00] DEBUG[19732] devicestate.c: Changing state for
Local/sabina_armatowska at CALLEX - state 1 (Not in use)
[Mar 1 19:35:00] DEBUG[19732] devicestate.c: device
'Local/sabina_armatowska at CALLEX' state '1'
[Mar 1 19:35:00] DEBUG[19740] app_queue.c: Device
'Local/sabina_armatowska at CALLEX' changed to state '1' (Not in use) but we
don't care because they're not a member of any queue
.
[Mar 1 19:35:00] ERROR[25629] cdr_pgsql.c: Connection reestablished.
[Mar 1 19:35:00] ERROR[25629] cdr_pgsql.c: HARD ERROR! Attempted
reconnection failed. DROPPING CALL RECORD!
[Mar 1 19:35:00] ERROR[25629] cdr_pgsql.c: Reason: ERROR: invalid byte
sequence for encoding "UTF8": 0xb6
HINT: This error can also happen if the byte sequence does not match the
encoding expected by the server, which is controlled by "client_encoding".
I've tried to insert CDR manually and it worked fine. I guess that there
can be something wrong with cdr_pgsql.
My database is in utf-8.
======================================================================
----------------------------------------------------------------------
(0127282) svnbot (reporter) - 2010-09-22 10:14
https://issues.asterisk.org/view.php?id=16940#c127282
----------------------------------------------------------------------
Repository: asterisk
Revision: 288268
_U branches/1.8/
U branches/1.8/UPGRADE.txt
U branches/1.8/cdr/cdr_pgsql.c
U branches/1.8/configs/cdr_pgsql.conf.sample
------------------------------------------------------------------------
r288268 | tilghman | 2010-09-22 10:14:02 -0500 (Wed, 22 Sep 2010) | 30
lines
Merged revisions 288267 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2
................
r288267 | tilghman | 2010-09-22 10:11:09 -0500 (Wed, 22 Sep 2010) | 23
lines
Merged revisions 288265-288266 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r288265 | tilghman | 2010-09-22 09:48:04 -0500 (Wed, 22 Sep 2010) | 9
lines
Allow the encoding to be set, in case local charset does not agree
with database.
(closes issue https://issues.asterisk.org/view.php?id=16940)
Reported by: jamicque
Patches:
20100827__issue16940.diff.txt uploaded by tilghman (license 14)
20100921__issue16940__1.6.2.diff.txt uploaded by tilghman
(license 14)
Tested by: jamicque
........
r288266 | tilghman | 2010-09-22 10:04:52 -0500 (Wed, 22 Sep 2010) | 5
lines
Document addition of encoding parameter.
(issue https://issues.asterisk.org/view.php?id=16940)
Reported by: jamicque
........
................
------------------------------------------------------------------------
http://svn.digium.com/view/asterisk?view=rev&revision=288268
Issue History
Date Modified Username Field Change
======================================================================
2010-09-22 10:14 svnbot Checkin
2010-09-22 10:14 svnbot Note Added: 0127282
======================================================================
More information about the asterisk-bugs
mailing list