Use Asterisk to Make SQL Query When A Call Is Received

I am trying to solve a problem and today someone suggested to me that Asterisk might be the tool for it. I’m not at all familiar with the product (or any telephone system products for that matter) so I wondered if someone could tell me if I’m on the right track with Asterisk.

The problem is fairly simple. I need to be able to have an end user call a central/single phone number and when they do have the receiving system answer, recognize their caller ID #, execute a sql query (either directly via ODBC or something similar or through a web service) writing the caller ID to a database, then hang up.

I don’t need any of the features of a PBX since the telephone system interaction will be limited to what is described above (though if there are additional features that’s fine).

Does Asterisk sound like a product that would fulfill that requirement? If so could anyone suggest someplace to learn more about this type of feature, or should I just start at the beginning of the manual?

Thanks in advance for you assistance,

Astersik can do that job.
There is very nice free book - Asterisk The Future of Telephony - just google it.
Asterisk is very powerful tool - you can do your tasks only within dialplan or using AGI - Asterisk Gateway Interface - with scripts written on desired language - perl, php - whatever you like - and much more of course.
If you are familiar with Linux, and you can install linux + ssh - you can hire somebody to do that job, it should be very short job - couple of hours.
You will need server with Linux, IP, and VoIP number - which will be called from your clients, or if you have PSTN line - then you will need hardware from Digium or compatible.