Im not sure if this is a stupid question but here goes.
Do I need to use ODBC to connect Asterisk to MySql?
Is there a way to connect Asterisk directly to Mysql?
Im not sure if I’m missing something?
This has been discussed before, as ODBC is the preferred method , you can connect directly to MYSQL using Shell or System command + the Linux MYSQL command to use in this case
same=>n,system(mysql --user=root --password=‘1932’ survey -e “INSERT INTO survey.results (q1,q2,q3,did) VALUES (’{q1}','{q2}’,’{q3}','{EXTEN}’)”)
Forum remove $… please do something @admin
Not preferred by me
I prefer to do my DBMS tasks in AGIs.
I find the dialplan ODBC stuff to be ‘ugly’ and limiting.
system() is fine for “quick 'n dirty” stuff, but for production where you care about the outcome, I prefer a ‘real’ language where I can get error messages and logging.
Over the past 15 years, I’ve written most of my AGIs in C and a couple in PHP. Lately, I’ve been using Perl and I think that will be my weapon of choice for new systems.