Problems with Static Realtime + unixODBC + posgresql


#1

I try to use Asterisk Static Realtime, I try to have queues.conf in my postgresql and when I start Asterisk I’ts chash.

I have installed this program versions:
#Linux 2.6.15
#Asterisk 1.2.7.1
#psqlodbc-08.02.0002
#unixODBC 2.2.11-r1
#PostgreSQL: 8.0.4

And have this conf:
— odbc.ini —
[ODBC Data Sources]
asterisk = PostgreSQL ODBC driver

[asterisk]
Description = PostgreSQL asterisk
Driver = /usr/local/lib/psqlodbc.so
Trace = Yes
TraceFile = /tmp/extodbc.log
Debugging = Yes
DebugFile = /tmp/odbcdebug.log
Database = asterisk
Servername = localhost
UserName = asterisk
Password = 1234
Port = 5432
Protocol = 6.4
ReadOnly = No
RowVersioning = No
ShowSystemTables = No
ShowOidColumn = No
FakeOidIndex = No
ConnSettings =

— extconfig.conf —
[settings]

;uncomment to load queues.conf via the db engine.
queues.conf => odbc,asterisk,queue_table

— res_odbc.conf —
[asterisk]
enabled => yes
dsn => asterisk
username => asterisk
password => 1234
pre-connect => yes

---- odbcinst.ini ----
[PostgreSQL]
Description=PostgreSQL ODBC driver for Linux and Windows
Driver=/usr/local/lib/psqlodbc.so
Setup=/usr/lib/libodbcpsqlS.so
Debug = 0
CommLog = 1

— in postgresql queue_table ----
CREATE TABLE queue_table
(
name varchar(128) NOT NULL,
musiconhold varchar(128),
announce varchar(128),
context varchar(128),
timeout int8,
monitor_join bool,
monitor_format varchar(128),
queue_youarenext varchar(128),
queue_thereare varchar(128),
queue_callswaiting varchar(128),
queue_holdtime varchar(128),
queue_minutes varchar(128),
queue_seconds varchar(128),
queue_lessthan varchar(128),
queue_thankyou varchar(128),
queue_reporthold varchar(128),
announce_frequency int8,
announce_round_seconds int8,
announce_holdtime varchar(128),
retry int8,
wrapuptime int8,
maxlen int8,
servicelevel int8,
strategy varchar(128),
joinempty varchar(128),
leavewhenempty varchar(128),
eventmemberstatus bool,
eventwhencalled bool,
reportholdtime bool,
memberdelay int8,
weight int8,
timeoutrestart bool,
CONSTRAINT queue_table_pkey PRIMARY KEY (name)
)
WITHOUT OIDS;
ALTER TABLE queue_table OWNER TO asterisk;
GRANT ALL ON TABLE queue_table TO asterisk;

When I start Asterisk It crash saying…
== Registered application ‘UnpauseQueueMember’
== Registered custom function QUEUEAGENTCOUNT
May 23 16:52:22 WARNING[18644]: res_odbc.c:199 odbc_smart_direct_execute: SQL Execute error! Attempting a reconnect…
Segmentation fault
PBXIP asterisk # cat: write error: Broken pipe
cat: write error: Broken pipe
cat: write error: Broken pipe

If I start Asterisk without static realtime queues configured, I can see this…
PBXIP*CLI> odbc show
Name: asterisk
DSN: asterisk
Connected: yes

With this I think the unixODBC connection it’s OK, but I don’t know wy Asterisk crash…

Any ideas??

Thanks a lot.