[asterisk-dev] [Code Review] 2725: Allow SayAlpha to announce "Uppercase <letter>" in a string
Mark Michelson
reviewboard at asterisk.org
Mon Aug 19 13:42:52 CDT 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2725/#review9436
-----------------------------------------------------------
trunk/main/pbx.c
<https://reviewboard.asterisk.org/r/2725/#comment18510>
s/will is used/will be used/
trunk/main/pbx.c
<https://reviewboard.asterisk.org/r/2725/#comment18511>
This introduces a subtle change that could be unwanted. In current versions of Asterisk, I can do
exten => 20,n,Sayalpha(A,B,C)
And this will result in "a comma b comma c" being spoken.
By adding an option, you cause previously valid strings to become invalid unless the commas are escaped.
There's not really a good way to work around this either. You could try to make the assumption that if the string does not end in ",s" or ",i" that the intention is to speak the commas out loud. But then there's always the small chance that someone currently has something like:
exten => 20,n,SayAlpha(R,o,s,s)
This would result in a case-sensitive reciting of "R comma o comma s".
I think the way to go about this is to actually create a separate application, called something like "SayAlphaCase" (I'm terrible at naming) that knows to speak in a case-sensitive manner.
This new application could start its life with an options section that allows for things like:
* Always speak "uppercase" or "lowercase" before every letter
* Assume all letters are uppercase and only say "lowercase" before lowercase letters
* Assume all letters are lowercase and only say "uppercase" before uppercase letters
- Mark Michelson
On Aug. 6, 2013, 1:36 p.m., opticron wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2725/
> -----------------------------------------------------------
>
> (Updated Aug. 6, 2013, 1:36 p.m.)
>
>
> Review request for Asterisk Developers.
>
>
> Bugs: ASTERISK-20782
> https://issues.asterisk.org/jira/browse/ASTERISK-20782
>
>
> Repository: Asterisk
>
>
> Description
> -------
>
> I'm posting this patch for Kevin Scott Adams from issue ASTERISK-20782 (with very minor cleanup and porting to trunk).
>
> From the issue:
> The application SayAlpha currently does not allow for the announcement of "Uppercase" letters in the string.
> The example we came across is in our IVR that allows users to reset their password. When the password is auto-generated by the back-end system the security policy specs that the password must have Upper case letter(s) in the password, leading to the Asterisk system to just announce letters.
> This patch is a quick and dirty way to get Uppercase to be announced (e.q. - "g Uppercase h n b Uppercase y").
>
>
> Diffs
> -----
>
> trunk/apps/app_chanspy.c 396321
> trunk/apps/app_directory.c 396321
> trunk/apps/app_voicemail.c 396321
> trunk/include/asterisk/say.h 396321
> trunk/main/channel.c 396321
> trunk/main/pbx.c 396321
> trunk/main/say.c 396321
> trunk/res/res_agi.c 396321
>
> Diff: https://reviewboard.asterisk.org/r/2725/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> opticron
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130819/c45b60ae/attachment-0001.htm>
More information about the asterisk-dev
mailing list