Saving a Keypress (DTMF) as a Numeric Value in the Database


I need a little clarification on how to use * for a voting/polling application. I’ve gotten 2 suggestions in the past 1)Use SQL and 2)Use an AGI.

Here’s what I’m not clear about:

  1. If I use SQL, will * just insert a value into a table that I set up for the number that the caller pressed to cast their vote?

  2. Is there any specific AGI script out there that is used for this or would I have to write my own?

Any feedback that anyone could provide would be greatly appreciated.

All I’m trying to do is have people call in, get presented with a question, and then press a number on their keypad to vote for their selection. I then need to be able to store and retrieve these values to tally the votes.

Thanks in advance!