I am new in Asterisk, It would be greatly appreciated if anybody could help me regarding my issue,
Just wanted asterisk play a random question sound file from my database or my sounds folder and waiting for user to enter correct answer
then asterisk check the right answer and go to next step
Test.AGI should play a random question(sound file) from my database ( but I don’t have right Perl script)
Play this file for example
What is the CAPITAL city of united states of America.
1- New York
3- Los angles
The right answer is number 2 and user should enter 2 after WaitExten .
If user enter correct answer it will Goto (next step ) and if not it will Go to (Play-incorrect sound)
Now I want to know is it possible to do it ,?
How I can select random file from database with answer ?
Is there any simple way ?
exten => 1111,1,Answer
exten => 1111,n,AGI(TEST.agi)
exten => 1111,n,WaitExten(5)
Here how I can check that the answer is correct and how I can get right one from My database
if answer was correct
exten => 1111,n,Goto(next question)
if answer was not correct
exten => 1111,n,Goto(Play-incorrect sound)