https://bugs.koozali.org/show_bug.cgi?id=13596
Bug ID: 13596
Summary: Insert failed on 'asteriskcdrdb:cel' Data too long for
column 'appdata'
Classification: Contribs
Product: SME Contribs
Version: 11.0
Hardware: ---
OS: ---
Status: CONFIRMED
Severity: normal
Priority: P3
Component: smeserver-freepbx
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
CC: [email protected]
Target Milestone: ---
Noticed the following in the logs
Having checked it looks like there should be a limit applied to the field
before the Insert - seems that is what happened before.
[2026-06-13 13:17:42] WARNING[3844] res_odbc.c: SQL Execute returned an error:
22001: [ma-3.1.12][11.4.12-MariaDB]Data too long for column 'appdata' at row 1
cel_odbc.c: Insert failed on 'asteriskcdrdb:cel'. CEL failed:
INSERT INTO cel
(eventtype,
eventtime,
cid_name,
cid_num,
cid_ani,
cid_rdnis,
cid_dnid,
exten,
context,
channame,
appname,
appdata,
amaflags,
accountcode,
uniqueid,
linkedid,
peer,
userdeftype,
extra)
VALUES (
'BRIDGE_ENTER',
{ts '2026-06-13 13:17:42.372590'},
'+44xxxxxxxxxxx',
'+44xxxxxxxxxxx',
'+44xxxxxxxxxxx',
'',
's',
'600',
'dial-with-exten',
'PJSIP/AandAsipTrunk-0000000b',
'Dial',
'PJSIP/1001/sip:[email protected]:21013
&PJSIP/3010/sip:[email protected]:44840
&PJSIP/1002/sip:[email protected]:11471
&PJSIP/8202/sip:[email protected]:37120;
rinstance=934787ad7c40ea61
&PJSIP/1003/sip:[email protected]:12425
&PJSIP/3005/sip:[email protected]:59435
&PJSIP/3006/sip:[email protected]:22993
&PJSIP/3007/sip:[email protected]:58091
&PJSIP/3008/sip:[email protected]:41863
&PJSIP/3020/sip:[email protected]:47411,
30,
HhtrQ(NO_ANSWER)U(macro-auto-blkvm)b(func-apply-sipheaders^s^1),',
3,
'',
'1781349460.19',
'1781349460.19',
'PJSIP/1002-0000000e',
'',
'{"bridge_id":"a3165b0c-970f-458b-a17a-682c1f89b3d2","bridge_technology":"simple_bridge"}')
I reduced the length of the app name string and tried and a manual SQL INSERT
and it worked OK:
INSERT INTO cel(
eventtype,
eventtime,
cid_name,
cid_num,
cid_ani,
cid_rdnis,
cid_dnid,
exten,
CONTEXT,
channame,
appname,
appdata,
amaflags,
accountcode,
uniqueid,
linkedid,
peer,
userdeftype,
extra
)
VALUES(
'ANSWER',
{ ts '2026-06-13 13:17:42.369591' },
'+44xxxxxxxxxxx',
'+44xxxxxxxxxxx',
'+44xxxxxxxxxxx',
'',
's',
'600',
'dial-with-exten',
'PJSIP/AandAsipTrunk-0000000b',
'Dial',
'PJSIP/1001/sip:[email protected]:21013&PJSIP/3010/sip:[email protected]:44840&PJSIP/1002/sip:[email protected]:11471&PJSIP/8202/sip:[email protected]:37120;rinstance=934787ad7c40ea61&PJSIP/1003/,',
3,
'',
'1781349460.19',
'1781349460.19',
'',
'',
''
);
Ah - looks like an upstream bug?
https://stackoverflow.com/questions/18459184/mysql-too-long-varchar-truncation-error-setting
I bet they relied on it being autotruncated.
MySQL 5.7 enabled STRICT_TRANS_TABLES
And you can see it on MariaDB
MariaDB [(none)]> SELECT @@SQL_MODE, @@GLOBAL.SQL_MODE;
+-------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------+
| @@SQL_MODE
| @@GLOBAL.SQL_MODE
|
+-------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------+
|
STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
|
STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
|
+-------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------+
1 row in set (0.000 sec)
https://stackoverflow.com/questions/57381392/disable-strict-mode-on-mariadb
Added a custom-template
/etc/e-smith/templates-custom/etc/my.cnf/005mysqld
[mysqld]
sql_mode=NO_ENGINE_SUBSTITUTION
Then ran:
signal-event smeserver-mysql-update
Then tested and it now works.
As this machine is ONLY for Voip I don't really care but it might affect other
apps.
Not sure but think these may refer - I can see a reference to cel_odbc.c as
well?
https://github.com/asterisk/asterisk/issues/1217
https://github.com/asterisk/asterisk/pull/1951/files
https://github.com/asterisk/asterisk/blob/master/cel/cel_odbc.c
I am on 20.15 which was released 31/7/2025 so long in the tooth.
Lastest release with that patch is 20.20 a few days ago.
--
You are receiving this mail because:
You are the QA Contact for the bug._______________________________________________
Mail for each SME Contribs bug report
To unsubscribe, e-mail [email protected]
Searchable archive at https://lists.contribs.org/mailman/public/contribteam/