TRY THIS What's the simplest way to query a database from within Dialplan?

pbxtest

Member
Joined
Nov 29, 2013
Messages
49
Reaction score
6
I'd like store a few values in a local database (mySQL) when calls are dialed. Nothing complex. What would be the simplest option for running a query from the dialplan?

I've done a lot of searching haven't found a clear answer to the basic questions, probably due to my inexperience with Asterisk / FreePBX and PIAF. (Do I need to install odbc? Additional modules? What function(s) do you use to connect the db from within the dialplan? Can I create tables in the existing asterisk/asteriskcrddb databases and use that dsn... and if so how? ...)

Any pointers in the right direction would be greatly appreciated
 
Thank you! That worked perfectly. Apparently I can't see the forest for the trees on Friday ;-)

I'd heard about using the Asterisk db, but wasn't sure if it'd be a good fit for my task or not. How do you access it - with the DB() command? It is only for storing key + prop pairs ?
 
BTW, have you ever used ODBC? I tried setting it up last week but didn't have any luck. Not sure if I need to install something extra ... ?
 
Makes sense. I'll have to see if it's a good fit for this task.

Thanks again for the quick response!
 

Members online

No members online now.

Forum statistics

Threads
26,687
Messages
174,410
Members
20,257
Latest member
Dempan
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Back
Top