Hello. An error occurs while passing cdr records to PostgreSQL. This happens ONLY during the considered call from Asternik. qlog-queuedial - context from extension_custom_asternic_outbound-freepbx.conf. All other CDR call data is recorded normally. Apparently, it swears at the calldate entry having the form { ts ‘2023-07-26 07:10:36’ }. I tried to do a separate INSERT this entry - Postgre gives a syntax error, swearing at the characters { ts }. At the same time, in MySQL (MariaDB) it is noticed normally, without extra characters.
Database encoding UTF-8
Calldate column in PostgreSQL has data type timestamp
MySQL - date and time
Error type:
[2023-07-26 07:10:36] WARNING[1308]: res_odbc.c:538 ast_odbc_print_errors: SQL Execute returned an error: 22021: ERROR: invalid byte sequence for encoding "UTF8": 0xd0 0x27;
Error while executing the query
[2023-07-26 07:10:36] WARNING[1308]: res_odbc.c:433 ast_odbc_prepare_and_execute: SQL Execute error -1!
[2023-07-26 07:10:36] WARNING[1308]: cdr_adaptive_odbc.c:765 odbc_log: cdr_adaptive_odbc: Insert failed on 'asteriskcdrdb:cdr'. CDR failed: INSERT INTO cdr (calldate, clid, src, dst, dcontext, channel, dstchannel, lastapp, lastdata, duration, billsec, disposition, amaflags, accountcode, uniqueid, linkedid, recordingfile, cnum, cnam, outbound_cnum, peeraccount, sequence) VALUES ({ ts '2023-07-26 07:10:36' }, '"" <89204445555>', '89204445555', '89204445555', 'qlog-queuedial', 'PJSIP/101-00000035', 'SIP/Trunk-00000035', 'Dial', 'SIP/Trunk/89204445555,300,gM(queuedial-answer^1123456789.123^User', 5, 5, 'ANSWERED', 5, 'Lable', '1123456789.123', '1123456789.123', 'out-89204445555-101-20620689-203687-1123456789.123.wav', '101', 'User', '89204445555', 'Lable', 109)
Can you solve the problem?