Asterisk 18 uuid func_odbc postgre SQL

I am upgrading to Asterisk 18 from 13. The func_odbc queries in Asterisk 13 against a local Postgre SQL database work fine. However, after running these in Asterisk 18, I have isolated the fact that the fields returned from PostgreSQL that are of type UUID are coming back not correct (they seem to come back as repeated values from the previous field).

Is this a bug or is there something special I need to do installing Asterisk 18 to allow func_odbc to handle UUID columns?

I have installed these my Centos 7

#yum install uuid-devel
#yum install libuuid-devel
#yum install uuid
#yum install libuuid

Thanks
Jeff

Difficult to say based on the information you gave. I have a couple of installations wit PostgreSQL vs. 12 and 13 on CentOS 8 boxes and haven’t seen any problems yet.

You could log the actual statements that arrive at the server by setting log_statement = 'all' in postgresql.conf. From there it should be easy to follow the bug, if there is any.

Update on this issue: I have checked the log files for PostgreSQL and everything looks good on that end. However, I tried to isolate the issue in my dialplan with simple func_odbc queries. This is what I have found:

When the first query returns a field of type UUID or has a hardcoded field value returned (i.e. select ‘YES’ from table where count(*) > 400) then the UUID fields are messed up moving forward (every UUID would be assigned the value of the previous field AND if the UUID field was first, the value would be the last value of the last query). However, if the first query returns a non-UUID field from the table, then all subsequent queries are fine, no matter what type of data they are returning.

Current work around for me, is I do a worthless query at the beginning of the dialplan entry that returns the value of a non-UUID field. Everything works as it did in Asterisk 13 from then on out.

Cast the UUID into varchar ? Only slightly less useless than the throwaway query! Probably should be filed in issue tracker.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.