Summary:ASTERISK-07894: [patch] say_alpha does not break when DTMF digit is keyed
Reporter:Patrick Baker (patbaker82)Labels:
Date Opened:2006-10-07 00:58:12Date Closed:2007-07-11 19:59:23
Versions:Frequency of
Environment:Attachments:( 0) patch.diff
( 1) patch2.diff
Description:'SAY ALPHA thisisatest #'

say_alpha does not break when DTMF digit is keyed. In this example when say_alpha is spelling thisisatest, it does not break and return when # is keyed.


Asterisk SVN-branch-1.2-r43509M
Comments:By: Patrick Baker (patbaker82) 2006-10-07 01:26:21

tested with Asterisk SVN-branch-1.2-r44580M as well

By: James Golovich (jamesgolovich) 2006-10-07 02:32:56

I was just going to open a bug on this but saw you had.  Not sure if I have commit access anymore and I don't even have svn installed anywhere easily accesible so I can't generate a diff.

The problem is in say.c
all of the functions that do a ast_waitstream_full in a loop need to do:
while (str[num] && !res)
instead of just
while (str[num])

the code is never breaking out of the loop when res is set, so it just drops your dtmf.

By: Patrick Baker (patbaker82) 2006-10-07 11:11:01

Thanks James, I've made a simple patch for this and tested.

By: James Golovich (jamesgolovich) 2006-10-07 11:14:23

There is more than one case that this needs to be applied to in say.c.  I believe the original say digits one is ok, but when I looked I think I saw at least 2 functions that needed to be patched.

I'm about to head out the door and won't be back till monday, but I wanted to get this comment in before I left.

By: Patrick Baker (patbaker82) 2006-10-07 11:33:30

Yes you're correct, say_phonetic requires this as well.  I have attached another patch that I've tested.

By: jmls (jmls) 2006-11-06 05:05:22.000-0600

patbaker82, if you supply a patch you must have a disclaimer on file with Digium. Have you sent in a disclaimer ? If not, please do so and let me know. Thanks.

By: Jason Parker (jparker) 2006-12-04 14:45:12.000-0600

Do we really want to change existing behavior with this?

By: James Golovich (jamesgolovich) 2006-12-04 14:56:08.000-0600

The behavior was intended to be there, it just wasn't working correctly.  Otherwise ints wouldn't be passed to ast_waitstream_full.

The original say_ functions work this way, but the recently added ones do not follow the same behavior.

By: Russell Bryant (russell) 2007-06-07 18:20:11

Fixed in 1.2, 1.4, and trunk in revisions 68351, 68354, and 68359.  Thanks!