[Home]

Summary:ASTERISK-03377: SayNumber() pronouncing numbers wrongly in portuguese
Reporter:Orgito Renato Luiz Araujo (orgito)Labels:
Date Opened:2005-01-29 04:52:04.000-0600Date Closed:2008-01-15 15:23:37.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/Internationalization
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:SayNumber inverting the order of the pt-e (and) digit when saying numbers in portuguese. A few examples would clarify what I mean.
SayNumber(42) = pt-e 40 2
SayNumber(984) = pt-e 900 pt-e 80 4
It should be:
SayNumber(42) =  40 pt-e 2
SayNumber(984) = 900 pt-e 80 pt-e 4


****** ADDITIONAL INFORMATION ******

The solution is simple. I just inverted the order of the last two ifs (line 1960) in the main while loop. The function of the first if is to decide if the pt-e digit should be played, the second is to play the number.
if (!res) {
                      if (!ast_streamfile(chan, fn, language)) {
                              if ((audiofd > -1) && (ctrlfd > -1))
                                      res =
ast_waitstream_full(chan, ints, audiofd, ctrlfd);
                              else
                                      res = ast_waitstream(chan, ints);
                      }
                      ast_stopstream(chan);
              }
              if (!res && playh) {
                      res = wait_file(chan, ints, "digits/pt-e", language);
                      ast_stopstream(chan);
                      playh = 0;
              }

I recompiled that way and everything worked fine.
Comments:By: Tilghman Lesher (tilghman) 2005-01-29 11:20:42.000-0600

Given that language settings were contributed, is it possible that we need to differentiate between Portugal Portuguese, Brazilian Portuguese, and every other place that speaks its own dialect of Portuguese?

By: Mark Spencer (markster) 2005-01-29 11:33:41.000-0600

Fixed in CVS head.

By: Russell Bryant (russell) 2005-02-06 20:56:56.000-0600

this doesn't appear to be an issue in 1.0 ... weird

By: Digium Subversion (svnbot) 2008-01-15 15:23:37.000-0600

Repository: asterisk
Revision: 4919

U   trunk/say.c

------------------------------------------------------------------------
r4919 | markster | 2008-01-15 15:23:37 -0600 (Tue, 15 Jan 2008) | 2 lines

Fix ordering in portugese (bug ASTERISK-3377)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=4919