[Home]

Summary:ASTERISK-29297: say: Y2021 problem – Asterisk cannot say year 2021 in Dutch
Reporter:Jacek Konieczny (jkonieczny)Labels:
Date Opened:2021-02-17 03:33:40.000-0600Date Closed:2021-03-02 11:19:56.000-0600
Priority:MajorRegression?
Status:Closed/CompleteComponents:Core/Internationalization
Versions:16.9.0 18.2.0 Frequency of
Occurrence
Frequent
Related
Issues:
is duplicated byASTERISK-29310 voicemail anounce with date stops working after 2020
Environment:Attachments:
Description: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 xxxxx: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).
Comments:By: Asterisk Team (asteriskteam) 2021-02-17 03:33:42.815-0600

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

Please note that by submitting data, code, or documentation to Sangoma through JIRA, you accept the Terms of Use present at [https://www.asterisk.org/terms-of-use/|https://www.asterisk.org/terms-of-use/].

By: Friendly Automation (friendly-automation) 2021-03-02 11:19:57.260-0600

Change 15529 merged by Joshua Colp:
main: With Dutch language year after 2020 is not spoken in say.c

[https://gerrit.asterisk.org/c/asterisk/+/15529|https://gerrit.asterisk.org/c/asterisk/+/15529]

By: Friendly Automation (friendly-automation) 2021-03-02 11:20:07.930-0600

Change 15548 merged by Joshua Colp:
main: With Dutch language year after 2020 is not spoken in say.c

[https://gerrit.asterisk.org/c/asterisk/+/15548|https://gerrit.asterisk.org/c/asterisk/+/15548]

By: Friendly Automation (friendly-automation) 2021-03-02 11:20:21.913-0600

Change 15530 merged by Joshua Colp:
main: With Dutch language year after 2020 is not spoken in say.c

[https://gerrit.asterisk.org/c/asterisk/+/15530|https://gerrit.asterisk.org/c/asterisk/+/15530]