Sorry about this. Just figured it out. In res_odbc.conf its supposed to be pre-connect and not preconnect.
On Saturday 01 January 2005 02:30, Arthur B Olsen wrote: > Hi. I can't figure this one out. Hope someone can help me. > > [EMAIL PROTECTED]:# cat /etc/odbc.ini > > [Asterisk] > Description=PostgreSQL asterisk > Driver=PostgreSQL > Trace=No > TraceFile=/tmp/odbc.log > Database=asterisk > ServerName=localhost > UserName=XXXX > Password=XXXX > Port=5432 > Protocol=7.4 > ReadOnly=No > RowVersioning=No > ShowSystemTables=Yes > ShowOidColumn=Yes > FakeOidIndex=Yes > ConnSettings= > > [EMAIL PROTECTED]:# cat /etc/odbcinst.ini > [PostgreSQL] > Description=PostgreSQL ODBC driver for Linux and Windows > Driver=/usr/local/lib/psqlodbc.so > Setup=/usr/lib/odbc/libodbcpsqlS.so > Debug = 1 > CommLog = 1 > > > [EMAIL PROTECTED]:# echo "select * from ast_config where filename='iax.conf' > and > commented=0 order by filename,cat_metric desc,var_metric > asc,category,var_name,var_val,id" | isql Asterisk > > <lot of output from table> > > SQLRowCount returns 39 > 39 rows fetched > > So the odbc thingy works! > > > [EMAIL PROTECTED]:# cat res_config_odbc.conf > [settings] > table = ast_config > connection = myconn > > [EMAIL PROTECTED]:# cat res_odbc.conf > [myconn] > dsn=Asterisk > username=XXXXX > password=XXXXX > preconnect=yes > > [EMAIL PROTECTED]:# cat extconfig.conf > [settings] > agents.conf => odbc > enum.conf => odbc > extensions.conf => odbc > iax.conf => odbc > iaxprov.conf => odbc > queues.conf => odbc > sip.conf => odbc > zapata.conf => odbc > > > > And asterisk answers: > > > [res_odbc.so] => (ODBC Resource) > == Parsing '/etc/asterisk/res_odbc.conf': Found > Jan 1 02:21:11 NOTICE[32024]: res_odbc.c:133 load_odbc_config: registered > database handle 'myconn' dsn->[Asterisk] Jan 1 02:21:11 NOTICE[32024]: > res_odbc.c:379 load_module: res_odbc loaded. [res_config_odbc.so] => (ODBC > Configuration) > Jan 1 02:21:11 NOTICE[32024]: config.c:888 ast_config_register: Registered > Config Engine odbc == Parsing '/etc/asterisk/extconfig.conf': Found > Jan 1 02:21:11 NOTICE[32024]: config.c:1092 read_ast_cust_config: Binding: > agents.conf to odbc Jan 1 02:21:11 NOTICE[32024]: config.c:1092 > read_ast_cust_config: Binding: enum.conf to odbc Jan 1 02:21:11 > NOTICE[32024]: config.c:1092 read_ast_cust_config: Binding: extensions.conf > to odbc Jan 1 02:21:11 NOTICE[32024]: config.c:1092 read_ast_cust_config: > Binding: iax.conf to odbc Jan 1 02:21:11 NOTICE[32024]: config.c:1092 > read_ast_cust_config: Binding: iaxprov.conf to odbc Jan 1 02:21:11 > NOTICE[32024]: config.c:1092 read_ast_cust_config: Binding: queues.conf to > odbc Jan 1 02:21:11 NOTICE[32024]: config.c:1092 read_ast_cust_config: > Binding: sip.conf to odbc Jan 1 02:21:11 NOTICE[32024]: config.c:1092 > read_ast_cust_config: Binding: zapata.conf to odbc Jan 1 02:21:11 > NOTICE[32024]: res_config_odbc.c:190 load_module: res_config_odbc loaded. > [skipping res_adsi.so] > [skipping chan_modem.so] > [chan_sip.so] => (Session Initiation Protocol (SIP)) > Jan 1 02:21:11 NOTICE[32024]: config.c:764 __ast_load: Loading Config > sip.conf via odbc engine == Parsing '/etc/asterisk/res_config_odbc.conf': > Found > Jan 1 02:21:11 WARNING[32024]: res_config_odbc.c:103 config_odbc: SQL > select error! [select * from ast_config where filename='sip.conf' and > commented=0 order by filename,cat_metric desc,var_metric > asc,category,var_name,var_val,id] > > > What is wrong? > _______________________________________________ > Asterisk-Users mailing list > [email protected] > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users _______________________________________________ Asterisk-Users mailing list [email protected] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
