[asterisk-users] Dynamic realtime + queues.conf Unresolved

Nathan Anderson nathana at fsr.com
Fri Apr 19 19:07:54 CDT 2013

On Friday, April 19, 2013 1:45 PM, Tommy Cooper wrote:

> The following error suggests that my syntax is incorrect, that syntax
> seems to be part of an SQL query. I do not have any SQL queries anywhere
> within my configuration.  

iODBC or unixODBC?

I'm sure that the query is being generated on-the-fly by res_config_odbc based on information it is being fed by app_queue; there is no .conf file that you can edit to see or modify the query.  If Asterisk is doing something wrong when generating this query, it'll most likely have to be addressed in source somewhere.  It would definitely be helpful to see what the *whole* query is that Asterisk is trying to execute.  Try to enable trace/logging for your ODBC driver.  If unixODBC, for example, add:

Trace = Yes
TraceFile = /tmp/sql.log 

...to your odbcinst.ini file.  This will dump detailed diagnostic information to the TraceFile, including the actual queries (in full) that are being executed.

Just from what little we already know from the Asterisk logs, though, it *almost* looks like an escaping problem of some kind.  What do you have the 'backslash_is_escape' option for your DSN set to in res_odbc.conf?  Maybe try setting it to the opposite of whatever it's configured for now.

Nathan Anderson
First Step Internet, LLC
nathana at fsr.com

More information about the asterisk-users mailing list