Make an IVR to get the client number by DTM tones validate that on a MSSQL database, if exist ask if the client has coupons and make the option to register the id number of the coupon and validate de id coupon on a MSSQL database, ask if the client wants to answer some questions to respond by DTM tones and update what question was answered, if it was right or not and score on the MSSQL database. Score depends of frequency of calls and answers from that client.
Inform the client's score at the end of the call
If client number not exist, make an add process.
Make a daily report for type of questions answer, point granted and new clients.
I have been doing asterisk support and AGI development for 7 years. I use Python for AGI to integrate Asterisk with DB. I need from you the IVR description, MSSQL table and the insert command. Usually we use MySQL. In case you need Microsoft one we will use it.