Mystery solved:
asterisk queried catalogs withdm(schema) but later ran UPDATE ps_contacts ... without schema-qualifying which are two different mechanisms inside the stack.
I have one database named asterisk with two schema’s one for asterisk config (public), the other (dm) for log tables such as cdr, queue_logs, and some other custom logs I hit with func_odbc.
I thought I could get away with “ALTER DATABASE asterisk SET search_path TO dm, public;”. It works most of the time, but not in every case as i have found out.
I’m just going to put them in the same schema. My fault for trying to separate configs and data like this.
I could get around it by creating another DSN, but I’ve lost the sense of adventure after troubleshooting this off and on for a week. The deadlines are calling.