login | register
Tue 07 of Oct, 2008 [18:37 UTC]

voip-info.org

jcordell

User Page

How to make a maths quiz dialplan

Below is a dialplan to make a maths quiz. This dial plan requiers swift voice synthisys which is not installed by default. You can replace the lines where this application is used with recordings of you own voice. Or you could use fastival.

Numbers are generated randomly between 1 and ten. You can make the quiz harder by increasing the range in the RAND function.


exten => s,1,Answer()
exten => s,n,Wait(.5)
exten => s,n,set(SUM=${RAND(1,10)})
exten => s,n,set(SUM1=${RAND(1,10)})
exten => s,n,swift(what is ${SUM} plus ${SUM1})
exten => s,n(getit),Read(TMP,,4,,2,4)
exten => s,n,set(RES=$${SUM}+${SUM1})
exten => s,n,Gotoif($${TMP} =${RES}?11,correct:12,wrong)

exten => 11,1(correct),Playback(yeah)
exten => 11,n,Goto(s,1)

exten => 12,1(wrong),playback(wrong-try-again-smarty)
;exten => 12,n,saydigits(${RES})
exten => 12,n,Goto(s,1)

User Information

jcordell

Login
jcordell
Real Name
James
Member since
Tuesday 06 of May, 2008
Last Login
Wednesday 09 of July, 2008 [13:09:30 UTC]

Content List

Select Content Type
You can restrict the content listing to a given content type or apply a filter on content title.
Available Content [ 2 ]
IDTitle ascendingContent TypeAuthorMost recent editorLast Modified
55406Here is my working zaptel.confCommentjcordelljcordellThu 19 of Jun, 2008
53580jcordellUser InformationjcordelljcordellWed 09 of Jul, 2008