I set globally `bytea_output = 'escape'` via [postgresql.conf](https://github.com/postgres/postgres/blob/master/src/backend/utils/misc/post...) but this also wont help too
I think `bytea_output` is overrided on client side during kamailio connection to postgres.