[SOLVED] Asterisk ODBC returns 0 results

I have Asterisk 13.12.1 configured to connect to a Firebird Database on a remote system. After banging my head against the wall I was able to get UnixODBC installed and get the right libraries to connect to Firebird. I can succesfully connect to the database and get valid data when running the isql tool.

Problem: When I run odbc read ODBC_pkdb_client 5555555555
I receive: SELECT * FROM CLIENT WHERE PHONE1 LIKE '%5%5%5%5%5%5%5%5%5%5%'

There is no indication of success or error so I’m having a difficult time troubleshooting this problem. This query runs succesfully when using isql or any other database tool.

Question: How can I get more verbose output of this query?
core set debug 5 shows it evaluating the argument, but nothing about actually sending the query…

Note: I realize that my version is out of date. I’ll update later so there aren’t too many moving variables.

Asterisk*CLI> odbc show
ODBC DSN Settings
-----------------
  Name:   asterisk_pkodbc
  DSN:    PKDB
    Last connection attempt: 1969-12-31 16:00:00
    Number of active connections: 1 (out of 1)

  Name:   asteriskcdrdb
  DSN:    MySQL-asteriskcdrdb
    Last connection attempt: 1969-12-31 16:00:00
    Number of active connections: 1 (out of 1)

Do you have the Dialplan where you are using your ODBC function and a failed call you can show us?

running ‘odbc read’ from the CLI just causes asterisk to show you what command it would run, it does not execute the SQL.

Oh… I assumed it did. When I was looking at people posting related issues it seemed to return results as well. I didn’t even try dialplan integration because I assumed this wouldn’t work yet. I’ll give it a shot!

Thanks.