head 1.1; access; symbols; locks; strict; comment @ * @; 1.1 date 2026.11.09.05.37.20; author jnemeth; state Exp; branches; next ; commitid nfklAD0yCz3anK2H; desc @@ 1.1 log @comms/asterisk24: import asterisk-24.0.0 Asterisk is a complete PBX in software. It provides all of the features you would expect from a PBX and more. Asterisk does voice over IP in three protocols, and can interoperate with almost all standards-based telephony equipment using relatively inexpensive hardware. Asterisk provides Voicemail services with Directory, Call Conferencing, Interactive Voice Response, Call Queuing. It has support for three-way calling, caller ID services, ADSI, SIP and H.323 (as both client and gateway). This is a Long Term Support version. It is scheduled to go to security fixes only on October 15th, 2030, and EOL on October 15th, 2031. See here for more information about Asterisk versions: https://docs.asterisk.org/About-the-Project/Asterisk-Versions/ @ text @$NetBSD: patch-main_cdr.c,v 1.1 2025/10/27 06:58:39 jnemeth Exp $ --- main/cdr.c.orig 2015-10-09 21:48:48.000000000 +0000 +++ main/cdr.c @@@@ -2787,7 +2787,7 @@@@ static const char *cdr_format_var_intern static void cdr_get_tv(struct timeval when, const char *fmt, char *buf, int bufsize) { if (fmt == NULL) { /* raw mode */ - snprintf(buf, bufsize, "%ld.%06ld", (long)when.tv_sec, (long)when.tv_usec); + snprintf(buf, bufsize, "%jd.%06ld", (intmax_t)when.tv_sec, (long)when.tv_usec); } else { buf[0] = '\0';/* Ensure the buffer is initialized. */ if (when.tv_sec) { @@@@ -2833,9 +2833,9 @@@@ void ast_cdr_format_var(struct ast_cdr * } else if (!strcasecmp(name, "end")) { cdr_get_tv(cdr->end, raw ? NULL : fmt, workspace, workspacelen); } else if (!strcasecmp(name, "duration")) { - snprintf(workspace, workspacelen, "%ld", cdr->end.tv_sec != 0 ? cdr->duration : (long)ast_tvdiff_ms(ast_tvnow(), cdr->start) / 1000); + snprintf(workspace, workspacelen, "%jd", cdr->end.tv_sec != 0 ? cdr->duration : (intmax_t)ast_tvdiff_ms(ast_tvnow(), cdr->start) / 1000); } else if (!strcasecmp(name, "billsec")) { - snprintf(workspace, workspacelen, "%ld", (cdr->billsec || !ast_tvzero(cdr->end) || ast_tvzero(cdr->answer)) ? cdr->billsec : (long)ast_tvdiff_ms(ast_tvnow(), cdr->answer) / 1000); + snprintf(workspace, workspacelen, "%jd", (cdr->billsec || !ast_tvzero(cdr->end) || ast_tvzero(cdr->answer)) ? cdr->billsec : (intmax_t)ast_tvdiff_ms(ast_tvnow(), cdr->answer) / 1000); } else if (!strcasecmp(name, "disposition")) { if (raw) { snprintf(workspace, workspacelen, "%ld", cdr->disposition); @