IVR to store digits pressed

We are a call center company and we do get lots of Do Not Call requests from our customers. I want to create an IVR so that when a customer calls in they should hear something like this…

“You have reached the Do Not Call registry for XXX Company. After the beep please enter the phone number that you want us to put on our DNC registry, followed by a pound sign.”

Is there a way to do this? Can we save this number in mysql or any other database?

Something like this?

Also, I believe there are some commercial apps that do this. Failing that, you might want to look at some commercial asterisk support.

Last year I had schmoozecom.com develop a custom application for alerting Fire Stations and couldn’t be happier with the results.