Symptom
asterisk -vr
Prints like:
[2026-02-11 15:13:49] WARNING[29897]: res_odbc.c:529 ast_odbc_print_errors: SQL Execute returned an error: 22001: [ma-3.1.12][10.3.39-MariaDB]Data too long for column 'lastdata' at row 1[2026-02-11 15:13:49] WARNING[29897]: res_odbc.c:424 ast_odbc_prepare_and_execute: SQL Execute error -1![2026-02-11 15:13:49] WARNING[29897]: cdr_adaptive_odbc.c:766 odbc_log: cdr_adaptive_odbc: Insert failed on 'scopserv:cdr_pre'. CDR failed: INSERT INTO cdr_pre (calldate, clid, src, dst, dcontext, channel, dstchannel,lastapp,lastdata, duration, billsec, disposition, amaflags, accountcode, uniqueid, userfield, hangupcause, recvip, fromchan, uri, useragent, codec1, codec2, llp, rlp,
Fix
Execute:
First verify all packages are up to date either by using the graphical Packages Manager or ssh.
If using ssh then:
scopserv_yum update to install the minimum required release = scopserv-telephony25-7.92.0.0.20260402-1
During this update the telephony commit runs a sanity check and will execute the following update script (if the update script fails to complete or it must otherwise be executed manually due to WARNING's printed by asterisk -vr):
Then
rm -rf /var/www/scopserv/telephony/scripts/upgrade/*.lock
php -q /var/www/scopserv/telephony/scripts/update
Then to validate (optional):
mysql scopserv
show fields from cdr;
show fields from asterisk_extensions;
show fields from cel;
Warning
Adding the column length can lock tables the tables for some time. Only execute during idle periods.
Expect it to run automatically during the any scopserv-telephony25 package scopserv-telephony25-7.92.0.0.20260402-1 or higher.
However it is critical to resolve mysql blocking issues that can effect asterisk call processing.