|Summary:||ASTERISK-00787: [request + patch] Spell() and SpellPhonetic()|
|Date Opened:||2004-01-11 18:15:57.000-0600||Date Closed:||2008-01-15 14:53:17.000-0600|
|Environment:||Attachments:||( 0) bug793-digits+phonetic.dif.txt|
( 1) digits+phonetic.dif.txt
( 2) sayphonetic.diff
( 3) sayphonetic2.diff
( 4) sounds.diff
|Description:||It would be nice to have Spell() and SpellPhonetic() applications and associated sound files for application such as reading account codes.|
|Comments:||By: John Todd (jtodd) 2004-01-11 18:18:41.000-0600|
These should be one app, but use a modifier (p or a for "phonetic" or "alpha", perhaps) to specify what version you wish to use.
Additionally, the comment was made that this should find it's way into say.c
I'm having Allison do the recordings Real Soon Now. Monetary donations are welcome to firstname.lastname@example.org on PayPal, since Allison costs $100 an hour for recording time, 1 hour minimums, and I ain't made of money. :-)
By: Brian West (bkw918) 2004-01-11 18:39:31.000-0600
how about SayAlpha and SayPhonetic :)
By: jrollyson (jrollyson) 2004-01-11 18:54:46.000-0600
By: robf (robf) 2004-01-31 21:17:26.000-0600
I have a patch for this... It pretty much deprecates SayDigits, and thus allows the AGI "SAY DIGITS" to serve as "SAY ALPHA" as well... I also added a "SAY PHONETIC" to app_agi. The code will even handle spaces when passed from the dialplan, but not through AGI.
I'd post it now, but I haven't submitted my disclaimer yet.
By: Brian West (bkw918) 2004-01-31 21:41:26.000-0600
you don't have to submit a disclaimer to post it. It just has to be send int prior to going into CVS. We aslo need the option to use this via the dialplan like say digits or say number is now.
By: robf (robf) 2004-01-31 21:50:34.000-0600
It can be used from the dialplan -- did that first... Added the AGI support next, but didn't add quoting support so as to allow:
SAY PHONETIC "string with spaces" ""
Not sure if that's needed or not...
I'll post the patch momentarily...
By: robf (robf) 2004-01-31 22:00:04.000-0600
W/ the patch attached above, SayDigits and SayAlpha call the same code behind the scenes. Since that's true, it wasn't necessary to add a SAY ALPHA to the AGI. SayPhonetic was also added, and a supporting SAY PHONETIC wass added to AGI.
Caveat: Strings w/ spaces cannot be passed via AGI because there's no quoting mechanism supported for the AGI command.
This diff was generated against current CVS via 'cvs diff -u'
Oh, one other thing: The files in the 'phonetic' directory need to be renamed to just the letter. For example, alpha.gsm should be a.gsm and niner.gsm should be 9.gsm.
edited on: 01-31-04 22:00
edited on: 01-31-04 22:04
By: Brian West (bkw918) 2004-02-01 13:16:28.000-0600
Shouldn't dot.gsm be period.gsm?
By: Brian West (bkw918) 2004-02-01 13:25:22.000-0600
comman won't work. Its a delimiter in apps. So if you use a comman its converted to a | and doesn't work. How shall we fix that?
By: Brian West (bkw918) 2004-02-01 13:47:10.000-0600
har har har just had yet another neat idea... MorseCode
By: robf (robf) 2004-02-01 21:01:24.000-0600
Morse code makes sense, though. Isn't there a module (a channel?) that's something about controlling a repeater? Haven't figured out exactly what it's supposed to do yet.
By: Brian West (bkw918) 2004-02-06 00:19:13.000-0600
it was a failed idea I think.... but can we get the , fixed? hrm
By: Brian West (bkw918) 2004-02-08 14:40:22.000-0600
Any update on this? The , is turned into a | so we have to think about how to say comma or remove it totally.. or use an uppercase C for it.
By: robf (robf) 2004-02-09 10:38:51.000-0600
Uh, you're kidding, right? Are you actually suggesting reading a pipe as a comma? Or a 'C' as a comma? Why isn't someone suggesting some better dialplan parsing for application parameters?
By: lancey (lancey) 2004-03-20 23:55:29.000-0600
sayphonetic.diff is built against current CVS. It now lets you use hex codes, beginning with %.
For ex. %2c is comma, %25 makes it say 'percent' and so on.
If the 2 characters after % are invalid, it just ignores the % and plays them as normally would do.
By: lancey (lancey) 2004-03-20 23:58:07.000-0600
A hex code table is available at http://i-technica.com/whitestuff/urlencodechart.html
By: lancey (lancey) 2004-03-21 00:17:40.000-0600
Found a bug: if there are no 2 more characters after the %. Fixed. Now, if we only have one character after the %, the % just gets ignored.
Update is sayphonetic2.diff (compelete diff against current CVS again)
By: lancey (lancey) 2004-03-21 00:20:58.000-0600
say.c is pretty tricky. We have a bunch of function which duplicate some checks for characters. We should consider combining them into one, and write wrappers for different modes. What do you think of this?
By: Brian West (bkw918) 2004-04-30 01:29:54
can we get an update on this with recent changes to say?
By: Olle Johansson (oej) 2004-04-30 02:24:01
Assuming that all characters are A-Z is pretty english-oriented :-) We need to internationalize here.
By: Mark Spencer (markster) 2004-05-01 21:28:41
I don't want to lose say_digits since say_digits will discard letters thus we break backwards compatibility. update the patch and i'll apply it otherwise, although we'll also have to move the sounds from asterisk-sounds to asterisk.
By: Brian West (bkw918) 2004-05-02 02:03:52
I have updated the patch to apply but double check it please. Removed , and re ordered some stuff.... mark not sure if I got that say_digits part you were talking about.... i'm tired ... but it works tested it.
By: Mark Spencer (markster) 2004-05-02 21:23:00
Added to CVS. Excellent patch!
By: Digium Subversion (svnbot) 2008-01-15 14:53:17.000-0600
r2864 | markster | 2008-01-15 14:53:17 -0600 (Tue, 15 Jan 2008) | 2 lines
Add SayPhonetic and SayAlpha applications (bug ASTERISK-787)