[Home]

Summary:ASTERISK-10673: SayDigits seems to be broken in current trunk
Reporter:Igor Goncharovsky (igorg)Labels:
Date Opened:2007-11-02 10:19:37Date Closed:2007-11-02 12:11:39
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/PBX
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) asterisk-saydigits.diff.txt
Description:Seems that problem is in function say_digit_str_full. When I try to debug this issue I've commented check for file existance in this way:

if (fn /* && ast_fileexists(fn, NULL, NULL) > 0*/) {
...
}

Then all digits play normal. Seem that all functions with the same check:
say_phonetic_str_full
say_character_str_full
Comments:By: Mark Michelson (mmichelson) 2007-11-02 10:53:38

I just tried the following with Asterisk trunk (revision 88212) and everything worked fine.

exten => 124,1,Answer()
exten => 124,n,SayDigits(124)
exten => 124,n,Hangup()

When I called 124, I heard "1 2 4"

Could you upload console debug output along with the dialplan you used when you experienced the failure? Thank you.

By: Igor Goncharovsky (igorg) 2007-11-02 11:04:35

Only at Tuesday, dialplan mostly the same:

exten => 334,1,Ringing()
exten => 334,n,Wait(5)
exten => 334,n,Answer()
exten => 334,n,Read(VAR)
exten => 334,n,SayDigits(${VAR})

With verbosity and debug set to 3 console output is empty. No warnings. Sound files placed in new style.

By: James Golovich (jamesgolovich) 2007-11-02 11:07:25

I also could not reproduce this.  I tried SayDigits, SayNumber, and the AGI commands and had no problem

By: James Golovich (jamesgolovich) 2007-11-02 11:09:23

Using your exact example works for me, so I would suspect that the issue is with how your sound files are added.

By: Jason Parker (jparker) 2007-11-02 11:14:57

I can reproduce - quite easily.

This is caused by sounds dir structure, and language.

I do not have /var/lib/asterisk/sounds/digits/, but I do have /var/lib/asterisk/sounds/en/digits/

I'm not sure what the right way to fix this is..  It appears we aren't passing language.  Perhaps if preflang == NULL, rather than setting it to "", we can set it to chan->language?

By: Jason Parker (jparker) 2007-11-02 11:18:15

of course...looking again, we don't actually *have* a reference chan...

By: James Golovich (jamesgolovich) 2007-11-02 11:31:54

The patch I just posted fixes it in this case.  I suspect all of the other usages of ast_fileexists need to get updated as well

By: Digium Subversion (svnbot) 2007-11-02 11:52:24

Repository: asterisk
Revision: 88284

_U  trunk/
U   trunk/main/say.c

------------------------------------------------------------------------
r88284 | qwell | 2007-11-02 11:52:23 -0500 (Fri, 02 Nov 2007) | 13 lines

Merged revisions 88283 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

(closes issue ASTERISK-10673)
........
r88283 | qwell | 2007-11-02 11:51:08 -0500 (Fri, 02 Nov 2007) | 4 lines

We need to make sure to specify a language to ast_fileexists, otherwise it may fail for anything besides en

Issue 11147, fix discovered by both citats and myself (independently), with input from Corydon76

........

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

By: Digium Subversion (svnbot) 2007-11-02 12:11:39

Repository: asterisk
Revision: 88285

_U  team/group/CDRfix5/
U   team/group/CDRfix5/CHANGES
U   team/group/CDRfix5/main/say.c

------------------------------------------------------------------------
r88285 | murf | 2007-11-02 12:11:37 -0500 (Fri, 02 Nov 2007) | 26 lines

Merged revisions 88267,88284 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r88267 | tilghman | 2007-11-02 10:26:31 -0600 (Fri, 02 Nov 2007) | 2 lines

Add a few bytes on LUA

................
r88284 | qwell | 2007-11-02 10:54:11 -0600 (Fri, 02 Nov 2007) | 13 lines

Merged revisions 88283 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

(closes issue ASTERISK-10673)
........
r88283 | qwell | 2007-11-02 11:51:08 -0500 (Fri, 02 Nov 2007) | 4 lines

We need to make sure to specify a language to ast_fileexists, otherwise it may fail for anything besides en

Issue 11147, fix discovered by both citats and myself (independently), with input from Corydon76

........

................

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