I cannot store more than 19 chars in CHANNEL(accountcode). I can certainly store more in the code, but my CDR table, which has an accountcode field varchar(256) only shows 19. There is a disconnect somewhere.
Line 161 of include/asterisk/channel.h:#define AST_MAX_ACCOUNT_CODE 20
/*!< Max length of an account code */
That’s where your limit is coming from, I see some other places where the code doesn’t use that definition ( chan_ooh323, cdr_sqlite, cdr_tds , res_config_sqlite) So as long as you are not using those functions you should be able to change AST_MAX_ACCOUNT_CODE and recompile to increase the length of your account code field.