CDR problem - broken Cyrillic letters

Hi everyone.

I’ve installed Freepbx 13 according to this instruction:
wiki.freepbx.org/display/FOP/Installing+FreePBX+13+on+CentOS+7

I want to use Cyrillic letters to set display names for my extensions. The problem is asterisk does not write data to the CDR table in UTF-8

I found the solution:
issues.freepbx.org/browse/FREEPBX-10392
but in my odbc.ini file Charset=utf8 parameter was already set by default

Charset and collate information from mysql:

MariaDB [(none)]> SHOW VARIABLES LIKE ‘character%’;
±-------------------------±---------------------------+
| Variable_name | Value |
±-------------------------±---------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
±-------------------------±---------------------------+
8 rows in set (0.01 sec)

MariaDB [(none)]> SHOW VARIABLES LIKE ‘collation%’;
±---------------------±----------------+
| Variable_name | Value |
±---------------------±----------------+
| collation_connection | utf8_unicode_ci |
| collation_database | utf8_unicode_ci |
| collation_server | utf8_unicode_ci |
±---------------------±----------------+
3 rows in set (0.00 sec)

In the asterisk db Cyrillic letters are displayed correctly

MariaDB [asterisk]> SELECT name FROM users;
±----------------------------+
| name |
±----------------------------+
| первый абонент |
| второй абонент |
±----------------------------+
2 rows in set (0.00 sec)

MariaDB [asterisk]> SHOW CREATE TABLE users;
name varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL
ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci |

In the asteriskcdrdb they are broken

MariaDB [asteriskcdrdb]> SELECT clid FROM cdr;
±----------------------------------------------------------------+
| clid |
±----------------------------------------------------------------+
| “пеÑ�вÑ�й абоненÑ�” <80000> |
| “пеÑ�вÑ�й абоненÑ�” <80000> |
±----------------------------------------------------------------+
2 rows in set (0.00 sec)

MariaDB [asteriskcdrdb]> SHOW CREATE TABLE cdr;
clid varchar(80) COLLATE utf8_unicode_ci NOT NULL DEFAULT ''
ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci

Maybe there is another configuration file to add a line “charset=utf8”?