[Home]

Summary:ASTERISK-04249: SayAlpha stops on unknown character
Reporter:otmar (otmar)Labels:
Date Opened:2005-05-31 08:46:01Date Closed:2008-01-15 15:36:49.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:While trying to do a SayAlpha(sip:xx@yyy) I noticed that asterisk stopped before the ':'.

SayPhonetic worked but skipped the colon.

Adding /var/lib/asterisk/sounds/letters/de/:.wav corrected the problem, but I think the intention of the code is to simply skip the offending letter and continue.

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

Looking at say.c I find that in ast_say_character_str (the code behind SayAlpha) the loop is defined as

       while(fn2[num] && !res) {

whereas someone changed it for ast_say_phonetic_str to
/*      while(fn2[num] && !res) { */
       while(fn2[num]) {

Doing the same for ast_say_character_str should IMHO fix the problem.


RECOMMENDATION:

Wouldn't it be better to play a beep if the phonetics file could not be played as to give an indication that something went wrong while spelling out a word?
Comments:By: Kevin P. Fleming (kpfleming) 2005-06-02 17:23:21

Fixed in CVS HEAD (all the Say<foo>) apps will now ignore characters they don't understand).

By: Digium Subversion (svnbot) 2008-01-15 15:36:49.000-0600

Repository: asterisk
Revision: 5819

U   trunk/file.c
U   trunk/say.c

------------------------------------------------------------------------
r5819 | kpfleming | 2008-01-15 15:36:48 -0600 (Tue, 15 Jan 2008) | 2 lines

consolidate API functions for saying numbers/digits/alpha/phonetic into less functions, using more efficient and clearer code (inspired by bug ASTERISK-4249)

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

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