[Asterisk-Users] Easy to Access Telephone Directory AGI
Hannes Vogel
m.list at yahoo.de
Thu Jan 12 12:50:40 MST 2006
I've written myself a easy to use telephone directory
which I use at home and thought it may be of interrest
to others.
The purpose of this agi script is to provide an online
telephone directory that can be easily accessed using
the numbers on the phone dial pad.
You select entries by spelling out the name of the
person you want to contact using the phone dial pad.
Now this is normally pretty labourious so the script
provides a few shortcuts to make things easier.
The best way to illustrate this is by example:
Say you want to phone John Smith:
- You would start by typing 5, this would find all
entries that start with j,k or l.
- Next you would type 6 which would narrow down the
selection to all tries starting with either "j", "k"
or "l" followed by either "m", "n" or "o".
- You continue to spell out the name in this fashion
(4 = gHi, 6 = mnO, etc) until either a distinct match
is found in the direcotry or the number of
matches is 9 or less.
If a distinct match is found the number associated
with the name is returned and can be dialed.
If the number of matches is 9 or less you can have an
IVR menu containing the matching names built on the
fly and you will be prompted to select a name (e.g.
Press 1 for John Smith, Press 2 for John Doe etc).
Once a name is selected the number associated with the
name is returned and can be dialed.
Now you might think that this is still pretty
laborious but in fact you usually only have to spell
out the first few letter of the first name and the
last name to get a good match.
Other feature include:
- Being able to jump to the last name without having
to finish spelling out the first name (i.e. Press 0 to
skip to the last name)
- Multiple numbers can be associated with a name. In
this case you will be prompted to select which number
you wanted returned for dialing e.g. Press 1 for Home,
Press 2 for Business, etc)
- Undo last typed entry in case you misstyped
something
- Wildcard matching (Press 1 to match any letter)
- IVR menus built on the fly so you do not need to
prerecord anything
- IVR menus cached (the more you use it the quicker it
gets)
- Returns the selected number in the variable
"DIRNUMBER"
The code can be found in the Digium Asterisk Users
Forum (I was not sure if I should post approx 900
lines of code to this list)
http://forums.digium.com/viewtopic.php?t=3727
I can also send it direct if anyone is interrested.
___________________________________________________________
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
More information about the asterisk-users
mailing list