[Home]

Summary:ASTERISK-18722: ast_expr2 reports "op_times: overflow" on some calculations, though the number is calculated correctly.
Reporter:Ian Anderson (seadweller)Labels:
Date Opened:2011-10-13 13:02:04Date Closed:
Priority:MinorRegression?
Status:Open/NewComponents:Core/Configuration
Versions:SVN 1.6.2.20 13.18.4 Frequency of
Occurrence
Constant
Related
Issues:
Environment:CentOS 5.7 32 and 64 BitAttachments:
Description:It seems when Asterisk 1.6.20 (may affect alter versions as the ast_expr2.y code looks same in SVN) does some multiplication (and I believe division) calculations, it will report an overflow error when checking the results.

Eg. Set(test=$[((0.0046 * 30) / 20) + ((0.0046 * 1) / 10)])

results in Asterisk returning test=0.00736 (CORRECT) however this is seen in the console

[Oct 13 17:56:16] WARNING[3153]: ast_expr2.y:1458 op_times: overflow

It appears that when the chk_times is run (also may affect chk_div),the reversed calcuation doesn't equal (floating point issue?) and thus the warning is generated.  Depending on the numbers in the calculation the error may or may not appear, but when it appears it is always reproducable with the same numbers.
Comments:By: Leif Madsen (lmadsen) 2011-11-01 07:58:48.734-0500

Alternatively you may want to use the MATH() function here instead of doing it directly in dialplan. I will acknowledge this issue though.

By: Matt Jordan (mjordan) 2012-10-03 15:46:53.765-0500

Please be aware that AEL is an extended support module, and support for it typically comes from the Asterisk community.  As such, response times may reflect that.