I want to make it so when a customer is signing up on my website that next to the phone number field, there is a "verify" button, where once clicked a random string of digits is created, say 5 digits long, and one the verify button is clicked a phone call is placed to the number and a voice says something like "this is company and your phone verification number is 4 2 5 2 5" and repeats for a few minutes or until the correct number string is typed into the phone. Once the phone number is verified the customer is allowed to submit the application.
I am looking to accomplishing this with asterisk and php. Is FastAGI the best way to accomplish this. So frat my research says that FastAGI is the best way, would I have to use http://code.google.com/p/fastagi-php-drclue/? Or should I just be using the regular asterisk agi?
How is the best way to pass the DTMF tones back the the PHP script?
You can use phpAGI to accomplish this task. You then use the originate command of the AMI. Passing the digits back to PHP is going to be problematic, as you can't raise user events because of the nature of PHP. Your best bet is to write the results to a database using the dialplan, and then periodically query the DB using ajax to see if the user has entered the proper verification code.
You can pass arbitrary variables into the dialplan within the originate call, so it should be easy to identify the user.
Honestly, it not that this is complicated, but it is convoluted, and quite a bit of detail is missing from my post. It's kind of difficult to explain this entire solution within a single post.
EDIT: If you use synchronous dialing, you will know when the call has completed. You will also need to set up an extension in your dialplan to handle the interactive portion. The originate command dials an outbound number, and when the call is connected, it then dials the extension specified in the originate command. Bear in mind though that Asterisk does not do call progress analysis over SIP lines, so that may or may not be a big problem for you.