07

Nov

twizz.me - a simple quiz using twilio in java EE

In the last week end, in my free time, i decided to create a complete application using java EE  that uses twilio services in advanced way, naturally with twiliofaces.
And twizz.me started to exist!

The purpose of the game: to show the twiliofaces capabilities inside a java EE applications.

I used my giavaCMS to create the web structure and a custom module to play with twilio services. The website is deployed on openshift, jboss eap (jboss 7.2.1 and mysql)

The scenario:
the user compile a registration form inserting his phone number, his fullname, his email, the topic of questions and he must choose the delay before the system should call him.


Step by step...

[1]After subscription form, the system require a simple call to a twilio number to confirm the identity of quiz's subscriber.

[2] the twiml generated from twizz.me, after received the call, does only hangup of call (the user doesn't pay anything for that!!)

[3] the twizz system schedules a call to subscriber after the time interval choosen

[4] when the caller receive the call, the quiz starts and another timer is scheduled to stop the call after 45 seconds.

[5] the user should reply to all true/false questions, using:

  • 1,4,7 keypad numbers for TRUE
  • 3,6,9 keypad numbers for FALSE
  • and the remaining numbers to REPEAT the question.


[6] a  cdi controller with @twilioscoped, follows the call from the start to the end of call. That controller receives all gathered numbers and makes a sum of correct replies at end of call, to collect the final score.

[7] at end of quiz, twizz sends a sms to quiz subscriber to indicate the score.

What's inside Twizz.me java EE application?:

- some jsf pages to register new users, that use request scoped controller ( cdi).
- two ejb3 timers (one to schedule the call of quiz subscriber  and another to stop the call after the timer previewed)
- some cdi controllers to drive the flow of call

More informations?
Read the code:
https://github.com/giavacms/giavacms/tree/master/twizz

comments powered by Disqus

Contact

Do you want collaborate with us?
Do you like this project?
Questions?
Please send me an email!

fiorenzo.pizza@gmail.com

Github code

Fork the twiliofaces repository on GitHub
and clone it to your local PC.

Get Started

Copy the Twiliofaces JAR file into your /WEB-INF/lib directory, or include all required Maven dependencies in your pom.xml!