[asterisk-users] pbx.c: We were unable to say the number

Sherwood McGowan sherwood.mcgowan at gmail.com
Sun Mar 27 16:14:33 CDT 2011


On Sun, Mar 27, 2011 at 2:50 PM, Mohammad Khan <beeplove at gmail.com> wrote:

> Here is the dialplan in macro:
>
> exten => s,n,SayNumber($[${ARG1} % 100])
>
> when 662 was passed as ARG1, I had the following at log:
>
> WARNING[15217] pbx.c: We were unable to say the number 62, is it too large?
>
> Do you see any odd in my dialplan?
>
>
> 662 % 100 = 66.2, not 62. It seems to me that there's more going on
here..Maybe Asterisk is being confused by actually getting 66.2? I'm not
readily able to look into the source, but I *think* that Asterisk (or at
least, SayNumber) cannot handle a number with a decimal point, but please
don't take that as gospel.

If Tilghman's question doesn't result in a fix, the next thing I'd say is to
check and make sure that a floating point number can be supplied as an
argument to SayNumber.

Also make sure you're logging verbose, debug, error, and warning messages
into a logfile, bump the verbosity and debug up to 5, and then run another
test call that will result in the number(s) you're testing. Next, send off a
larger amount of the content from the logfile, the single WARNING line is
not enough for anything more than a blind guess. For instance, it would be
REALLY fantastic is you would send the log line that displays SayNumber
actually being executed, like ( *[DATE&TIME] VERBOSE[23609] pbx.c:     --
Executing [s at contextname:priority] SayNumber("CHANNELNAME", "66.2") in new
stack *)... It would be even MORE fantastic if you included almost ALL of
that call's log output, but at the very LEAST there should be around 5
lines, starting from the verbose output for execution of SayNumber. That
way, we don't just get the warning message you're complaining about, but the
EXACT executions and messages outputted leading up to the warning message.

But then again, you could continue to do essentially the same thing and hope
for different results...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110327/b493ade0/attachment.htm>


More information about the asterisk-users mailing list