I wrote some php scripts and connexted the diaplan to a mysql database and Cepstral TTS.
When I dial John (5646) the script looks up the database and gives the choices via TTS to the dialing person (e.g. 1 for John Smith, 2 for John Muller etc.).
The User then presses e.g. 1 for John Smith. Then he gets the following choices: 1 for mobile numer, 2 for fixed line numer and 3 for other). Then he presses e.g. 1 and the mobile number of John Smith is dialed.
If anyone is interested, I can post the solution, but it's quite a lot of work to do.
This works with all phones connected to the asterisk.