res_odbc.conf vs res_config_mysql

Hi.
I’m using Asterisk realtime with mysql server.

I have some questions about the difference between “res_odbc.conf” and “res_config_mysql.conf”.

In fact, I set some options(host, name, user, pass, and so on) in “res_config_mysql.conf” file and I did nothing with “res_odbc.conf” file, but it runs.

And now I wonder why it runs without setting host and user, password in “res_odbc.conf” file.

Actually, I need my Asterisk to be connected to several mysql databases with different options.
Some need to be treated read-only DB, and the other need to be treated write-only DB.
And I want to configure some options in DB connection.

I read about some articles about Asterisk, and I found there’re “readsql” and “writesql” in “func_odbc.conf” file.

In summary, here are my questions below.

  1. What is difference between “res_odbc.conf” and “res_config_mysql.conf”?

  2. Why Asterisk realtime runs with mysql properly without setting “res_odbc.conf”?

  3. If I set “res_odbc.conf” file with several databases, and I set read-only server’s dns and write-only server’s dns diffrently, and defined readsql and writesql methods in each servers, Is it possible that I can handle two different server differently?(read-only/write-only) (but maybe I understood this function with wrong way)

Please I need some answer. I’m looking forward to it.

Thanks.

Www.Asteriskdocs.org

For consulting use the job forum.

Hint: MySQL is deprecated but available since Asterisk 1.8 or 10