Commit 690de7039d for asterisk.org
commit 690de7039def18d2543e69304073d915b90c5f08
Author: phoneben <3232963@gmail.com>
Date: Sat Oct 31 23:47:16 2026 +0200
cdr.h: Increase the size of the clid field to 512 bytes.
The clid field of struct ast_cdr was AST_MAX_EXTENSION (80) bytes, so
a caller ID with a multibyte UTF-8 name, such as Hebrew or Arabic, was
cut at 79 bytes before any CDR backend saw it, even though the clid
column of the schema (VARCHAR(80), which counts characters) could hold
the full value. It is now 512 bytes, enough for an 80 character
utf8mb4 value. All writers use sizeof(cdr->clid). Backends that copy
it into a smaller buffer of their own (cdr_pgsql, cdr_tds) still
truncate safely at their own limit, as before.
AI assistance: Claude (Anthropic)
DeveloperNote: The size of struct ast_cdr has changed.
diff --git a/include/asterisk/cdr.h b/include/asterisk/cdr.h
index 14f644a2cd..0dcd54ffe8 100644
--- a/include/asterisk/cdr.h
+++ b/include/asterisk/cdr.h
@@ -279,8 +279,10 @@ struct ast_cdr_config {
* \brief Responsible for call detail data
*/
struct ast_cdr {
- /*! Caller*ID with text */
- char clid[AST_MAX_EXTENSION];
+ /*! Caller*ID with text, "name" <number>. Sized independently of
+ * AST_MAX_EXTENSION to hold an 80 character value of up to 4 byte
+ * (utf8mb4) characters, matching the clid column of the schema. */
+ char clid[512];
/*! Caller*ID number */
char src[AST_MAX_EXTENSION];
/*! Destination extension */