[Home]

Summary:ASTERISK-24054: CLONE - Problem inserting CEL records when certain characters are used
Reporter:Krzysztof Chmielewski (kristoff)Labels:
Date Opened:2014-07-17 09:17:37Date Closed:2014-07-17 09:22:48
Priority:MajorRegression?No
Status:Closed/CompleteComponents:CEL/cel_odbc Resources/res_odbc
Versions:1.8.19.1 1.8.26.1 Frequency of
Occurrence
Constant
Related
Issues:
is the original version of this clone:ASTERISK-23594 Problem inserting CEL records when certain characters are used
Environment:Attachments:
Description:Hello,
we noticed encoding error in Asterisk logs every time when our asterisk receives SIP packet with polish special sign.

The error is:
{code}
[2014-04-04 08:29:26] NOTICE[5630] res_odbc.c: res_odbc: Connected to asterisk [postgresql]
[2014-04-04 08:29:26] WARNING[5630] res_odbc.c: SQL Execute returned an error -1: HY000: ERROR:  invalid byte sequence for encoding "UTF8": 0xb3;
Error while executing the query (88)
[2014-04-04 08:29:26] WARNING[5630] res_odbc.c: SQL Execute error -1! Verifying connection to asterisk [postgresql]...
[2014-04-04 08:29:26] WARNING[5630] res_odbc.c: Connection is down attempting to reconnect...
[2014-04-04 08:29:26] DEBUG[5630] res_odbc.c: Disconnected 0 from asterisk [postgresql]
[2014-04-04 08:29:26] DEBUG[5630] res_odbc.c: Database handle 0xb43d2aa8 deallocated
[2014-04-04 08:29:26] NOTICE[5630] res_odbc.c: Connecting asterisk
[2014-04-04 08:29:26] NOTICE[5630] res_odbc.c: res_odbc: Connected to asterisk [postgresql]
[2014-04-04 08:29:26] WARNING[5630] cel_odbc.c: Insert failed on 'asterisk:cel'.  CEL failed: INSERT INTO cel (eventtype,eventtime,userdeftype,cid_name,cid_num,cid_ani,cid_rdnis,cid_dnid,exten,context,channame,appname,amaflags,accountcode,peeraccount,uniqueid,linkedid,userfield,peer,extra,cel_state,queueinfo,sipcallid,rtpqos,preuid,preprocessexten) VALUES ('CHAN_START',{ ts '2014-04-04 08:29:26' },'','Rafał Gawra','rgawra','','','','932','CALLEX','SIP/rgawra-000075dd','',3,'rgawra','rgawra','1396592966.35521','1396592966.35521','','','','','','','','','')
{code}

Problem consider the cel_odbc mechanism - we are using CEL mechanism and cel_odbc. Asterisk is trying to insert CHAN_START event to our Postgresql database with CID value "Rafał Gawra" Letter "ł" seams as a problem here.

Our Postgresql database is in UTF-8 coding and in /etc/locale.gen file (we are using Debian OS) we have:

{code}
en_US.UTF-8 UTF-8
pl_PL ISO-8859-2
pl_PL.UTF-8 UTF-8
{code}

We noticed that Asterisk can crash from this error when system is under bigger load and this error occurred couple of times at the same time.

Problem seams to be similar to ASTERISK-15724 (problem with cdr_pgsql )

Problem is very easy to reproduce. You just need to send SIP Packet (invite) with polish sign in FROM or TO header.
Comments:By: Krzysztof Chmielewski (kristoff) 2014-07-17 09:20:24.167-0500

Hello I have new info about this problem. I can easily reproduce this error by calling from Zoiper Free using special Polish characters like "śćśćśćść" in Extension field (To Header)
I have notice that during this error Asterisk is not carashing but there is SIP deadlock instead.  

By: Matt Jordan (mjordan) 2014-07-17 09:22:44.068-0500

Please do not clone issues. This makes a mess of the issue tracker and hard to trace the communication regarding an issue.

Please comment on your original issue. Note that your description of the reproduction will not be sufficient to reproduce it - please provide a SIP packet capture showing the problem.

I'm going to close this issue out as a duplicate. Please do not open any more issues for this problem.

By: Krzysztof Chmielewski (kristoff) 2014-07-17 09:25:17.558-0500

Ok,
just for the record:
Form original Issue:
Comment from Rusty Newton:
"If you can provide a backtrace as requested for the crash, feel free to open a new issue for that crash"

There is no Reopen Button so i just figuret that i can clone this one.