IVR capable of capturing a dialer sequence and validating it agains a database

Hi all,

I would like to know if there is a way to acquire a sequence (based on numbers like “158944”) that a caller should enter (inside an IVR for example) and doing actions based on values inside a database ?

Something like :

Caller enters the IVR -> IVR says “please enter your client number” -> Caller then enters “158944” -> IVR searches for the value inside a given database that the FreePBX server can access -> database finds the value and answers back with another value from the same line inside the DB -> IVR then do some action based on the values that came back from DB

Hope it is clear to read :slight_smile:

Thanks for your help !

In fact, i know that Asterisk is capable of such a thing.

The only problem is that for creating a simple IVR, it is already not quite simple thru the Web-GUI.
-> I’m clearly abusing here as i know it can be done pretty easily but … we can’t say it is “really easy to do” (importing audio files, doing actions with the numbers entered, etc …).

When we talk about accessing a DB directly thru an IVR, we simply can’t do it within the Web-GUI.
We have to do something like this tutorial ( http://www.voiptoday.org/index.php?option=com_content&view=article&id=262%3A5-steps-to-connect-asterisk-with-your-database-server-ms-sql ) which is very well explained, but, at least, is long and we must cross fingers like everytime in linux when messing with packages versioning.

It could be pretty cool to add some basic steps to the Web-GUI to deliver services like capturing numbers, comparing it with external databases (or local files, or anything else // but something simple for getting started).

I will try to add phpmyadmin to the FreePBX distro and see if i can build an easy dialplan to access a table inside an existing DB (or a new one) and do some basic actions based on the results of each query.

Will report later …

I found this : Visual Dialplan ( http://www.apstel.com/download )

It seems that the “Integration server” is the thing i’m looking after.
The fact is, i just don’t get the point that this thing is OUT from the PBX box …

I’ll try it (as it is free) and hope it is not too complicated to install/run.

If someone already managed to get it working and has some examples :slight_smile:

Asterisk dial plan can talk SQL directly. This somehow “mediates” it and makes it easier.

Post your impressions please.

I post here some tutorials i found for helping achieving such an ODBC connection to databases thru Asterisk :

http://nerdvittles.com/?p=604

http://webcache.googleusercontent.com/search?q=cache:Elce8BqRfMkJ:www.savelono.com/linux/asterisk-post/how-to-query-a-database-from-mysql-with-asterisk-16-odbc.html+&cd=1&hl=fr&ct=clnk&gl=fr

Hope that helps :slight_smile:

I’ve tried this a lot with PHP/BASH (much more flexible than using Asterisk dialplan SQL commands).

BUT…
You gotta write your own dialplans, FreePBX won’t really do these kinda stuff.

Use functions like SYSTEM, SHELL to jump out of dialplans, do something and return back with some values. Then, with those values, you can either declare in variable style to do something or directly hit the dialplan.

Hi,

I’m interested in doing the things manually, but what i do not want is a system really too much complicated that is quite only shell-configured.
We are living in year 2012, and i think GUIs should be developed more than what it is actually.

I know i could do it, but i’m thinking about people that are not very familiars with shell based interface… not a good deal !

After all, freepbx is a “young” product so it can basically evoluate finely.
I know that GUIs are not the very first point that has to be upgraded, but at least, it could be better.

By the way, it is a great job for now.

Is there some more documentation about scripting dialplans directly by hand inside extensions.conf for doing variables-based calculations against a database ?

Thanks !

Here are some links about what i was looking for :
http://www.voip-info.org/wiki/view/Asterisk+cmd+MYSQL

ODBC connections : http://www.savelono.com/linux/asterisk-post/how-to-query-a-database-from-mysql-with-asterisk-16-odbc.html