[asterisk-bugs] [JIRA] (ASTERISK-29297) Y2021 problem – Asterisk cannot say year 2021 in Dutch
Jacek Konieczny (JIRA)
noreply at issues.asterisk.org
Wed Feb 17 03:34:15 CST 2021
Jacek Konieczny created ASTERISK-29297:
------------------------------------------
Summary: Y2021 problem – Asterisk cannot say year 2021 in Dutch
Key: ASTERISK-29297
URL: https://issues.asterisk.org/jira/browse/ASTERISK-29297
Project: Asterisk
Issue Type: Bug
Security Level: None
Components: Core/Internationalization
Affects Versions: 18.2.0, 16.9.0
Reporter: Jacek Konieczny
Severity: Major
Our customers reported voicemail menu failing when about to say a message date. Logs show missing sound:
{noformat}
Feb 17 09:10:34] -- <PJSIP/ykmf7-0000010d> Playing 'vm-password.alaw' (language 'nl')
[Feb 17 09:10:38] > 0x7f55004b0650 -- Strict RTP learning complete - Locking on source address 94.246.148.140:11978
[Feb 17 09:10:39] -- <PJSIP/ykmf7-0000010d> Playing 'vm-youhave.alaw' (language 'nl')
[Feb 17 09:10:40] -- <PJSIP/ykmf7-0000010d> Playing 'digits/1.alaw' (language 'nl')
[Feb 17 09:10:40] -- <PJSIP/ykmf7-0000010d> Playing 'vm-first.alaw' (language 'nl')
[Feb 17 09:10:41] -- <PJSIP/ykmf7-0000010d> Playing 'vm-message.alaw' (language 'nl')
[Feb 17 09:10:41] -- <PJSIP/ykmf7-0000010d> Playing 'vm-received.alaw' (language 'nl')
[Feb 17 09:10:42] -- <PJSIP/ykmf7-0000010d> Playing 'digits/day-1.alaw' (language 'nl')
[Feb 17 09:10:43] -- <PJSIP/ykmf7-0000010d> Playing 'digits/1.alaw' (language 'nl')
[Feb 17 09:10:43] -- <PJSIP/ykmf7-0000010d> Playing 'digits/mon-1.alaw' (language 'nl')
[Feb 17 09:10:45] -- <PJSIP/ykmf7-0000010d> Playing 'digits/2.alaw' (language 'nl')
[Feb 17 09:10:45] -- <PJSIP/ykmf7-0000010d> Playing 'digits/thousand.alaw' (language 'nl')
[Feb 17 09:10:47] WARNING[26658][C-000000b3]: file.c:789 ast_openstream_full: File digits/21 does not exist in any format
[Feb 17 09:10:47] WARNING[26658][C-000000b3]: file.c:1262 ast_streamfile: Unable to open digits/21 (format (alaw)): No such file or directory
[Feb 17 09:10:47] WARNING[26658][C-000000b3]: say.c:472 wait_file: Unable to play message digits/21
[Feb 17 09:10:47] == Spawn extension (from-internal, *98666, 6) exited non-zero on 'PJSIP/ykmf7-0000010d'
{noformat}
I traced the problem to the {{ast_say_date_with_format_nl()}} function and it clearly does not support years later than 2020. It was an older Asterisk version (16.9.0), but I can see the same, wrong, lazy code in the current 18.2.0 release:
{noformat}
case 'Y':
/* Year */
if (tm.tm_year > 99) {
res = wait_file(chan, ints, "digits/2", lang);
if (!res) {
res = wait_file(chan, ints, "digits/thousand", lang);
}
if (tm.tm_year > 100) {
if (!res) {
/* This works until the end of 2020 */
snprintf(nextmsg, sizeof(nextmsg), "digits/%d", tm.tm_year - 100);
res = wait_file(chan, ints, nextmsg, lang);
}
}
{noformat}
There is no problem when English language is used, but it may affect other than Dutch languages too (I have not checked that).
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list