[asterisk-bugs] [Asterisk 0018634]: PGSQL db update issue

Asterisk Bug Tracker noreply at bugs.digium.com
Fri Jan 21 06:19:27 CST 2011


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=18634 
====================================================================== 
Reported By:                hydr0gen
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   18634
Category:                   CDR/cdr_pgsql
Reproducibility:            sometimes
Severity:                   crash
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.6.2.16 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2011-01-17 09:44 CST
Last Modified:              2011-01-21 06:19 CST
====================================================================== 
Summary:                    PGSQL db update issue
Description: 
I can't reproduce error. It happend sometimes. Asterisk is trying to insert
wrong SQL code.

from Postgresql debug:
Jan 17 15:27:58 TuX postgres[26769]: [4-1] ERROR:  syntax error at or near
"VALUES" at character 329
Jan 17 15:27:58 TuX postgres[26769]: [4-2] STATEMENT:   VALUES
("calldate"'2011-01-17 15:30:03',"clid",'"759"
<759>',"src",'759',"dst",'1007',"dcontext",'local',"channel",'SIP/759-00000371',"dstchannel",'SIP/1007-00000372',"lastapp",'Dial',"lastdata",'SIP/1007,20,rtT',"duration",82,"billsec",75,"disposition",'ANSWERED',"amaflags",3,"accountcode",'759',"uniqueid",'1295278203.882')
VALUES ("calldate"'2011-01-17 15:30:03',"clid",'"759"
<759>',"src",'759',"dst",'1007',"dcontext",'local',"channel",'SIP/759-00000371',"dstchannel",'SIP/1007-00000372',"lastapp",'Dial',"lastdata",'SIP/1007,20,rtT',"duration",82,"billsec",75,"disposition",'ANSWERED',"amaflags",3,"accountcode",'759',"uniqueid",'1295278203.882')

as you can see asterisk is trying to insert wrong code, the values, witch
goes past "VALUES" consist values name.

The thing is - when it's happen asterisk core dumps. I havn't seen this
issue before i start using:

sip.conf:
limitonpeer=yes
notifyringing=yes
rtcachefriends=yes
rtupdate=yes

I'm using REALTIME SIP/Queues/MOH/VM

Today i updated from 1.6.2.15 (freebsd) to 1.6.2.16. Nothing changed.
Asterisk still sometimes core dumps.
====================================================================== 

---------------------------------------------------------------------- 
 (0130853) hydr0gen (reporter) - 2011-01-21 06:19
 https://issues.asterisk.org/view.php?id=18634#c130853 
---------------------------------------------------------------------- 
I can't reproduce bug, because i reinstall Asterisk on life system. Right
now i use 1.6.2.16 with realtime enabled. I can't make blind transfer, but
i have no this issue. Maybe because asterisk can't update db:

[Jan 21 12:04:40] NOTICE[2492]: chan_sip.c:18479 handle_response_peerpoke:
Peer '702' is now Reachable. (153ms / 2000ms)
[Jan 21 12:04:40] ERROR[2492]: res_config_pgsql.c:641 update_pgsql:
PostgreSQL RealTime: Updating on column 'lastms', but that column does not
exist within the table 'system_sip'!

[Jan 21 12:05:35] ERROR[2492]: res_config_pgsql.c:641 update_pgsql:
PostgreSQL RealTime: Updating on column 'ipaddr', but that column does not
exist within the table 'system_sip'!

db is fine. And 1.8.2.2 connected to that tables, and no issues.

What i can do: i can get old configs and run on my test server 1.6.x
Last time i cat generate only core dump after call transfer. In 1.8.2.2
it's just make asterisk unavaivable from network. It's drop any connections
:-D 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-01-21 06:19 hydr0gen       Note Added: 0130853                          
======================================================================




More information about the asterisk-bugs mailing list