Recruitment IVR with Quiz Questions randomly play

Hi Guys,

I want to develop an IVR for Recruitment Team which have set of multiple questions but we want to play 4 to 5 questions randomly on each call.

Is there any guide how this can be achieved?


I have a group of questions (20 to 50)
when some call our recruitment line they will hear only get 4 to 5 random Questions to Answer.

For anyone following, this was brought up on the FreePBX forum as well:

yes and I am still not able to work this out.
This needs to be done in Asterisk.

I don’t know much about FPBX, but some of those suggestions seemed like they were heading down a bumpy road. To me, it shows how working within someone else’s framework can may some things easy until you attempt something outside the framework and then the difficulty spirals up.

This topic may spur some ideas.

I am open to any suggestions whether they are in core asterisk dialplan, php and mysql code, or Freepbx working.

not dependent on any specific.

however I am trying to use this approach using PHP and MYSQL.


the requirement is we need to have a Recruitment IVR ( with Multiple Questions in audio and they will be randomly played to the caller at each call uniquely )

total of 9 or 10 and 5 of them will be played and they will be shuffle every time at new call

when caller Calls in
he will be presented with the greeting and asked to press # and then he will be prompted for a question
he answered the question and press #
next question #
next question#
press # to play the end greeting and hangup the call

1. we can use mysql database for storing all the information related to questions
2. Can configure as many as we want
3. we will save it on the system and save the path in db
4. I will make the flows and save the data in db
5. And store all the recordings in server

I will be thankful if I can get any suggestions related the above points.

There are 2 dialplan approaches in the link I provided.

I’m not a big fan of database access in ‘dialplan’ and suspect there will be sufficient business logic to make a solution based on an AGI a good solution.

Are you going to be asking for numerical answers, multiple choice, or recording voice?

If numerical or multiple choice will you play back a score at the end?

Some other features you may want to consider:

  1. Allow the caller to choose the position they are applying for.
  2. Allow a choice of language (spoken, not coding).

Are you looking to work this out yourself or are you looking for someone to develop it for you? (In this case it may be more appropriate for you to take the discussion ‘off list.’)

If each caller receives a different set of questions, how will you compare competency?

I want to try this by myself.
This is for Static Position (e.g Customer Representative)
only local language
and questions will be recorded in audio format

I’d still use AGI.

You can ‘select * from <table-name> order by rand() limit x’ to get a pool of questions. Then loop through the result set playing and recording, and then storing some details and stats in the database at the end.

Some things to consider:

  1. Are you interested in how long a prospect took to answer the question?
  2. Can a prospect review their recording and re-record?
  3. If you allow the prospect to discard the recording and re-record, do you want to track how many times they do this.
  4. Can they pause the question, think about it, and then answer?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.