PostgreSQLand asterisk

Hi. I have tried isntalling odbc,postgreSQL and asterisk from scratch. I have installed odbc correctly and postgresql and asterisk correctly(I guess) I did not get some errors during installation. after installing asterisk, I started it using asterisk -p. I tried to do some query like odbc show. I got some errors since i haven’t configure the drivers yet. All modules are running. My problems is that when I started to configure my odbc driver, res_odbc_conf, my postgresql database problems also arised. When I started asterisk with “asterisk -p” the system hangsup. I tried starting again my syste and issue a asterisk -vvgc it hangs on certain part. Here is the output after issuing a “asterisk -vvgc”
"========================================================================
== Parsing ‘/etc/asterisk/logger.conf’: Found
Asterisk Event Logger Started /var/log/asterisk/event_log
== Parsing ‘/etc/asterisk/dnsmgr.conf’: Found
Asterisk Dynamic Loader loading preload modules:
== Parsing ‘/etc/asterisk/modules.conf’: Found
[res_odbc.so] => (ODBC Resource)
== Parsing ‘/etc/asterisk/res_odbc.conf’: Found
Oct 5 20:54:50 NOTICE[4646]: res_odbc.c:294 load_odbc_config: registered database handle ‘ast_cnf’ dsn->[asterisk]
Oct 5 20:54:50 NOTICE[4646]: res_odbc.c:554 odbc_obj_connect: Connecting ast_cnf"

I dont know what is wrong with this one. Please help me on my problem thanks. By the ways here is some part of my configuration files

IN ASTERISK
res_odbc_conf
;;; odbc setup file

; ENV is a global set of environmental variables that will get set.
; Note that all environmental variables can be seen by all connections,
; so you can’t have different values for different connections.
[ENV]
INFORMIXSERVER => my_special_database
INFORMIXDIR => /opt/informix

[ast_cnf]
;[asterisk]
dsn => asterisk
username => asterisk
password => imx1015
pre-connect => yes

cdr_odbc.conf
[global]
dsn=asterisk
username= asterisk
password= imx1015
;loguniqueid=yes
;dispositionstring=yes
table=cdr ;“cdr” is default table name
;usegmtime=no ; set to “yes” to log in GM
~

extconfig.conf
;example => odbc,asterisk,alttable
iaxusers => odbc,ast_cnf,sip_conf
iaxpeers => odbc,ast_cnf,sip_conf
sipusers => odbc,ast_cnf,sip_conf
sippeers => odbc,ast_cnf,sip_conf
;voicemail => odbc,asterisk
extensions => odbc,ast_cnf,extensions_conf
queues => odbc,ast_cnf,queue_table
queue_members => odbc,ast_cnf,queue_member_table

~
unixodbc
odbc.ini location:–> at /etc/unixODBC
[ODBC Data Sources]
asterisk = PostgreSQL ODBC driver

[asterisk]
Description = PostgreSQL asterisk
Driver = /usr/lib/psqlodbc.so
Trace = Yes
TraceFile = /tmp/extodbc_allan.log
Debugging = Yes
DebugFile = /tmp/odbcdebug_allan.log
Database = asterisk
Servername = localhost
Username = asterisk
Password = imx1015
Port = 5432
Protocol = 6.4
ReadOnly = No
RowVersioning = No
ShowSystemTables = No
Show0idColumn = No
Fake0idIndex = No
ConnSetting =

odbcinst.ini
[PostgreSQL]
Description = PostgreSQL ODBC driver
Driver = /usr/lib/psqlodbc.so
Setup = /usr/lib/unixODBC/libodbcpsqlS.so
Debug = 0
Commlog = 1
FileUsage = 2

PostgreSQL.
database name = asterisk
username = asterisk
password = password

Best REgards,
newbie_aste