Read database on freepbx

I’m developping an SQL database which wiil give me different prices of foods or others per day. Example : When I call an IVR on my freepbx I’ll tell it : Press 1 if you want to have the price of the kilogramm of rice press 2 If you want to know the price of mango today.
I mean my freepbx will be connected to Internet and must be able to check the price of specific food today on google and will give send the price.This also mean that my solution must be able to convert a text to audio so I’ll have at the end : the price of mango today is.
Can I do It on freepbx?

Sure you can… But you will be doing most of it manually.

The only thing we were able to do until now is to create an configure my IVR for inbound route.For the others things no idea on how to do it on freepbx

It sounds like you are creating a dynamic IVR, and that’s a challenge with the current IVR implementation of FreePBX.

Normally, when we set up an IVR, we record the greeting (or hire someone like Allison @VoiceGoddess record it) then build the IVR settings to match the recording. If you change the recording every day (or worse yet, dynamically), you will need to change the underlying IVR at the same time. You could get sophisticated and do it in the back-end code, but still, it would be a dynamic IVR backend, which we don’t have.

To do what you are trying to do, you would probably need to develop an entire module that allowed you to seamlessly integrate recordings with IVR settings, with back-end lookups, with dynamic announcements. Anything else is going to be hugely labor intensive - like one person whose full-time job is managing the IVR.

Don’t get me wrong - I’m certain it can be done. I just don’t think it can be done “out of the box”, at least not without a lot of manual effort.

One way (there are many):

If the price change happens infrequently (1-2 per day, etc.) set the prices as global variables using a script that queries the web and populates the variables. Set that script to run on cron. Then use the global variables in your custom dialplan to speak the amounts. As indicated this is all custom (vs. in FreePBX).

If you want to check the price every call, have the query script run as part of the call (while the IVR message plays). Then it is a pretty similar approach.

You will need to have someone with familiarity in a web scrape tool and Asterisk to accomplish this. It would be done in dialplan and not via the FreePBX GUI.

1 Like

OKOK Thank you

I’ll try to do IT using this topic

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