IVR for data capture help


Just starting out with FreePBX and have a question regarding the IVR system.

Is it possible to use the IVR for data capture? And are there any tutorials out there on how to do it?

From what I’ve seen on Youtube I’m either not using the right words or there is nothing “out of the box” with FreePBX that I can configure other than an automated attendant.

What I’d like to do is have customers call in, be prompted for their account number which they should enter with their keypad, then have them enter a stock level number. The account number and stock level should then ideally be stored or emailed.

Any help greatly appreciated…

Not directly, you will need to write an extension that the customer somehow gets to, to handle that but from the asterisk CLI:-

core show application MYSQL

should give you a hint as to how to connect to then read (and write) from/to a mysql database. the asterisk command read:-

core show application read

can get the digits from the caller (and play them a prompt) that you will use to build the query.

A more complicated solution might well use AGI using perl, python, bash et al. to do the same thing. If you don’t use mysql then that would be your most likely route.

PIAF has some interesting examples you might template from.

Thanks for the tips, I’ll start plugging away at the CLI.

I couldn’t seem to find any examples on PIAF. Any suggestions?


Look harder?

Will do.

Perhaps dicko is referring to Nerdvittles (not strictly speaking PIAF). This project:

<link removed>

while out of date will give you a start. Middle of the page gives the dialplan that collects the DTMF from the caller, in this case a zipcode, and there is a link to the AGI file “nv-weather-zip.php” which takes the zipcode and runs with it.

Another thread reminded me that the 3rd party dynroutes module might work for you.
site: http://www.voipsupport.it/pmwiki/pmwiki.php?n=Freepbx.DynamicRouting
Once installed, the GUI says:
"You use the Dynamic Routing module to route calls based on sql lookup. It is also possible to request user input (dtmf) and then use that in the query too. "

edit 1
Probably best to ignore the above for now, looks like the module may not be ready for prime time.

edit 2
Reports that rolling back a version was successful: http://www.voipsupport.it/pmwiki/pmwiki.php?n=Freepbx.PreviousVersions