Call forwarding wih Asterisk - a question about capabilities

Hi,

I don’t actually use Asterisk at the moment, but I’ve been asked to looked into something for which I think it could be the solution.

I need a system which will answer calls with an automated message. This message will ask the caller to to enter a code. When this code is entered, some kind of database look-up takes place to extract a mobile telephone number which has been associated with that code. The system will then automatically dial that number and connect the original caller to it. All this will happen without the original caller ever finding out the actual mobile number being called. Can Asterisk be used in this way and, if so, can anyone suggest where I could find some direction on how to do this?

Yes, Asterisk can be used for this; I would create an ivr that greets the caller and asks him the code, then this code is passed to an php agi script to look for the mobile phone number in a mysql database, after the number is found just Dial() to it to connect the caller; I would use the phpagi classes to build the php agi script.
For informations about Asterisk agi: voip-info.org/wiki-Asterisk+AGI .
About phpagi: phpagi.sourceforge.net/ .
A good free book about Asterisk: downloads.oreilly.com/books/9780596510480.pdf .

Cheers.

Marco Bruni