Realtime mapping for ‘queue_log’ found to engine ‘odbc’, but the engine is not available – why not?

Home » Asterisk Users » Realtime mapping for ‘queue_log’ found to engine ‘odbc’, but the engine is not available – why not?
Asterisk Users No Comments

I’m attempting to direct my queue logs at a PostgreSQL table, and seeing this error in the asterisk console:

config.c:2256 find_engine: Realtime mapping for ‘queue_log’ found to engine ‘odbc’, but the engine is not available

However, everything I know how to check indicates the odbc engine is available. I can’t find any more verbose description of the error from Asterisk, so I’m unsure how to proceed.

extconfig.conf is simple enough:

> root@asterisk02:/etc/asterisk# cat extconfig.conf
> [settings]
> #include /etc/asterisk/extconfig.conf.d/settings.conf.d/*.conf
> root@asterisk02:/etc/asterisk# cat /etc/asterisk/extconfig.conf.d/settings.conf.d/*.conf
> queue_log => odbc,asterisk,kellyreports.asterisk_queue_log

and res_odbc.conf also pretty simple:

> root@asterisk02:/etc/asterisk# cat res_odbc.conf
> #include /etc/asterisk/res_odbc.conf.d/*.conf
> root@asterisk02:/etc/asterisk# cat /etc/asterisk/res_odbc.conf.d/*.conf
> [asterisk]
> dsn => asterisk
> pre-connect => yes

The underlying ODBC configuration checks out:

> root@asterisk02:/etc/asterisk# isql asterisk
> SQL> insert into kellyreports.asterisk_queue_log default values
> SQLRowCount returns 1

and res_odbc also seems to be aware that “asterisk” is a valid ODBC resource:

> asterisk02*CLI> odbc show
> ODBC DSN Settings
> —————–
> Name: asterisk
> DSN: asterisk
> Last connection attempt: 1969-12-31 19:00:00
> Pooled: No
> Connected: Yes

I’m not sure what I can infer from the last connection attempt being forever ago. Is this the last connection attempt by asterisk to the odbc module? Or the ODBC module’s last connection attempt to Postgres? I’m confused, because it says “Connected: Yes”. Also, ODBC is writing a logfile in /tmp:

> root@asterisk02:/tmp# cat psqlodbc_asterisk14211.log
> CONN ERROR: func=PGAPI_SetConnectAttr, desc=”, errnum=216, errmsg=’Couldn’t set unsupported connect attribute 113′
> ————————————————————
> henv=0x2087430, conn=0x2089780, status=0, num_stmts=16
> sock=0x2084c60, stmts=0x2084d40, lobj_type=-999
> —————- Socket Info ——————————-
> socket=-1, reverse=0, errornumber=0, errormsg='(NULL)’
> buffer_in=34103648, buffer_out=34108576
> buffer_filled_in=0, buffer_filled_out=0, buffer_read_in=0
> DSN info: DSN=’asterisk’,server=’helpdesk.macprofessionals.lan’,port=’5432′,dbase=’whd’,user=’asterisk’,passwd=’xxxxx’
> onlyread=’No’,protocol=’8.4′,showoid=’No’,fakeoidindex=’No’,showsystable=’No’
> conn_settings=”,conn_encoding='(null)’
> translation_dll=”,translation_option=”
> conn = 0x2089780, PGAPI_Connect(DSN=’asterisk’, UID=’asterisk’, PWD=’xxxxx’)
> Driver Version=’08.03.0200,200805030001′
> Global Options: fetch=100, socket=4096, unknown_sizes=0, max_varchar_size=255, max_longvarchar_size=8190
> disable_optimizer=1, ksqo=1, unique_index=1, use_declarefetch=0
> text_as_longvarchar=1, unknowns_as_longvarchar=0, bools_as_char=1 NAMEDATALEN=64
> extra_systable_prefixes=’dd_;’, conn_settings=” conn_encoding=”
> conn=0x2089780, query=’ ‘
> conn=0x2089780, query=’select version()’
> [ fetched 1 rows ]
> [ PostgreSQL version string = ‘PostgreSQL 8.4.3 on i386-apple-darwin, compiled by GCC i686-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 537’ ]
> [ PostgreSQL version number = ‘8.4’ ]
> conn=0x2089780, query=’set DateStyle to ‘ISO”
> conn=0x2089780, query=’set geqo to ‘OFF”
> conn=0x2089780, query=’set extra_float_digits to 2′
> conn=0x2089780, query=’select oid, typbasetype from pg_type where typname = ‘lo”
> [ fetched 0 rows ]
> [ Large Object oid = -999 ]
> conn=0x2089780, query=’select pg_client_encoding()’
> [ fetched 1 rows ]
> [ Client encoding = ‘UTF8’ (code = 6) ]
> conn=0x2089780, query=’select 1′
> [ fetched 1 rows ]

Not really sure what attribute 113 is or why it couldn’t be set, but since I see a successful “select 1” at the end, I’m thinking it’s benign. Am I missing something obvious? Any ideas on where to look next?