[asterisk-users] Error When Using Postgresql Schema With Realtime Sip

stephen.hindmarch at bt.com stephen.hindmarch at bt.com
Thu Sep 24 05:06:02 CDT 2009


I have investigated further and found that it is a bug in ODBC, not
Asterisk. The SQLColumns function, which asterisk uses to describe the
table, does not return any columns when the table name includes the
schema specification. You can show this by using isql to do "help table"
which returns info about all the columns, and then "help public.table"
which returns nothing. As chan_sip seems to be the only application that
tests the structure of the table before writing to it this is why
REGISTER fails.

When I have time I will chase up ODBC and see if the issue is tracked
there. Do you still want me to raise it as an issue on bugtracker?

The problem manifests itself in res_odbc.c inside the
ast_odbc_find_table function, around line 176 in my copy of the code.

>Tilghman Lesher wrote:
>> Yep, I never bothered to include support for specifying either the
>catalog or
>> the schema, since I've never had reason to use either one.  Please
report this
>> issue on the bugtracker (https://issues.asterisk.org) and I'll get a
patch up
>> straightaway, but I'll need your testing to ensure the patch works.
>
>++  But I won't be able to test for awhile.
>
>Stephen.  As a test/work-around/option you could try setting the 
>search_path for the user connecting to the database.
>
>This has worked for me with RT and LedgerSMB.
>

Steve Hindmarch
BT Design




More information about the asterisk-users mailing list