How To Recognize A Name Spelled Letter By Letter ?

Home » Asterisk Users » How To Recognize A Name Spelled Letter By Letter ?
Asterisk Users 6 Comments

Hello,

I’m wonddering if it is possible, with Asterisk and any third party module or service, to build the following feature:

– caller dials a given extension dedicated to a given language (german, english, …)
– Asterisk plays a welcome audio prompt
– caller spells his or her first name letter by letter (for example, caller spell “A”, “L”, “I”, …)
– Asterisk repeats spelled letters to caller.

If possible, which module is needed ?

Best regards

6 thoughts on - How To Recognize A Name Spelled Letter By Letter ?

  • Well, I’d do the whole thing in Dialplan (it’s fairly computationally-
    complete per Church and Turing), but I’m a masochist like that :p

    What you need to do is have an inner loop; in which you use WaitExten() with a short timeout to read a digit. If a digit is pressed within the timeout, you will get directed to another extension. There you need to compare the digit just pressed against the last digit pressed; and if it is the same, then you select the next letter on that key. Otherwise you announce the last letter selected, append it to the name so far, and select the first letter on that key. If you timeout, then you announce the currently selected letter, append it to the name so far and set no letter selected. (This is needed, because you may have two letters in succession on the same key; so you must allow it to timeout before you can enter the next letter.) If you timeout with no letter selected, you increase a counter; and if this gets to some critical number, you repeat the prompt: Background() the original announcement to spell their name, and announce the letters entered so far. If the 1 key is pressed once, backspace (and after the timeout, announce the remaining letters); two presses within timeout clears the name entered so far and starts again from scratch.

    So, for example, someone might enter:
    2 [set current letter to “A”]
    (user waits for timeout) [Store and say “A”. Set current letter to “”]
    5 [Set current letter to “J”]
    5 [set current letter to “K”]
    5 [set current letter to “L”]
    4 [4 != 5, so store and say “L”. Set current letter to “G”]
    4 [set current letter to “H”]
    4 [set current letter to “I”]
    7 [7 != 4, so store and say “I”. Set current letter to “P”]
    7 [set current letter to “Q”]
    7 [set current letter to “R”]
    7 [set current letter to “S”]
    6 [6 != 7, so store and say “S”. Set current letter to “M”]
    6 [set current letter to “N”]
    6 [set current letter to “O”]
    (User waits for timeout) [Store and say “O”. Set current letter to “”]
    6 [set current letter to “M”]
    6 [set current letter to “N”]
    * [store and say “N”. We now have “ALISON”. Go to next context]

    For the sake of your own sanity (or that of your unlucky successor), use maningful labels in your GoToIf() statements; and be sure to comment the resulting code liberally, so it looks a little bit less of an unwholesome mess.

  • Do you mean the directory( ) application that’s used as a dial by name directory service to match caller inputs to existing names? If not, then It’s not going to be possible to simply have the user enter a digit, say ‘2’, and have Asterisk repeat a letter since the user could mean either ‘A’, ‘B’, or ‘C’.

    John

    From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Olivier Sent: Wednesday, March 23, 2016 8:53 AM
    To: Asterisk Users Mailing List – Non-Commercial Discussion Subject: [asterisk-users] How to recognize a name spelled letter by letter ?

    Hello,

    I’m wonddering if it is possible, with Asterisk and any third party module or service, to build the following feature:

    – caller dials a given extension dedicated to a given language (german, english, …)

    – Asterisk plays a welcome audio prompt

    – caller spells his or her first name letter by letter (for example, caller spell “A”, “L”, “I”, …)

    – Asterisk repeats spelled letters to caller.

    If possible, which module is needed ?

    Best regards

  • I’m thinking about something to delegate provisionning to end users:
    a new employee joins the company, the system I’m after let him enter his own name himself, once for all.

    Typing letters through numerical dialpad is not very convenient. Using Speech Recognition could be interesting if applicable.

    2016-03-23 14:38 GMT+01:00 Tech Support :

  • 2016-03-23 14:38 GMT+01:00 A J Stiles :

    Yes I agree.

    I also thought of using some IP Phone supporting custom XML application as having a feedback on screen is helpful.

    Anyway, my question is about Speech recognition as this could be faster and portable to any handset. I’ve given Google Speech Web API a short try, and it is not capable to recognize letters: when I spelled “A”, it recognized “Air” !

  • This is generally good, because it means less work for you 🙂 Just be careful not to automate away so much of your job that you end up writing out your own P45 …..

    Not so long ago, we all used to use the number pad for writing out text messages — up to 160 characters at a time …..

    But remember there is almost certain to be a computer next to the phone anyway; so you could use a CGI script which injects entries into a database, and a cron job (running as root on the Asterisk server) to check the database every few minutes and do the necessary.