[Home]

Summary:ASTERISK-29950: SayNumber can handle '01' to '07', but not '08' or '09'
Reporter:Jim Van Meggelen (jimvanm)Labels:
Date Opened:2022-03-04 12:38:42.000-0600Date Closed:2022-03-23 17:04:46
Priority:MinorRegression?
Status:Closed/CompleteComponents:PBX/General
Versions:16.22.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:CentOS 7Attachments:
Description:Run the following dialplan:

same => n,SayNumber(01)
same => n,SayNumber(02)
same => n,SayNumber(03)
same => n,SayNumber(04)
same => n,SayNumber(05)
same => n,SayNumber(06)
same => n,SayNumber(07)
same => n,SayNumber(08)
same => n,SayNumber(09)
same => n,SayNumber(10)
same => n,SayNumber(17)
same => n,SayNumber(18)
same => n,SayNumber(19)

I get an error as follows (ONLY on 08 and 09)

WARNING[881][C-00000305]: pbx_builtins.c:1351 pbx_builtin_saynumber: argument '08' to SayNumber could not be parsed as a number.

WARNING[881][C-00000305]: pbx_builtins.c:1351 pbx_builtin_saynumber: argument '09' to SayNumber could not be parsed as a number.
Comments:By: Asterisk Team (asteriskteam) 2022-03-04 12:38:42.984-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: Sean Bright (seanbright) 2022-03-04 13:58:22.092-0600

Yeah, the function we are using to parse the numeric string tries to guess the base of the number and because the leading digit is a zero it tries to parse as octal.

By: Jim Van Meggelen (jimvanm) 2022-03-09 09:01:01.829-0600

So, a feature not a bug? ;-)

It's part of a date string YYYYMMDD, and the day is going to be in the range 00-31. Works for every day of the month except 08 and 09!

Sounds like I need a workaround. Time to fire up the regex generator!


By: Sean Bright (seanbright) 2022-03-09 15:56:33.178-0600

Definitely a bug. I have a review up that should be merged soon.

By: Friendly Automation (friendly-automation) 2022-03-23 17:04:47.535-0500

Change 18202 merged by Friendly Automation:
conversions.c: Specify that we only want to parse decimal numbers.

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

By: Friendly Automation (friendly-automation) 2022-03-23 17:08:11.202-0500

Change 18182 merged by Friendly Automation:
conversions.c: Specify that we only want to parse decimal numbers.

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

By: Friendly Automation (friendly-automation) 2022-03-23 17:13:06.198-0500

Change 18204 merged by Friendly Automation:
conversions.c: Specify that we only want to parse decimal numbers.

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

By: Friendly Automation (friendly-automation) 2022-03-23 18:11:55.609-0500

Change 18203 merged by Kevin Harwell:
conversions.c: Specify that we only want to parse decimal numbers.

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