0

I have my odbc.ini and odbcinst.ini as follows odbcinst.ini

[asterisk-connector]
Description     = MySQL connection to 'asterisk' database
Driver          = MySQL
Database        = asterisk
Server          = localhost
UID =  asterisk
password = <mypassword>
Port            = 3306
Socket          = /var/run/mysqld/mysqld.sock

And the odbcinst.ini will look like this:

~ $ more /etc/odbcinst.ini

[MySQL]
Description   = ODBC for MySQL
Driver      = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so
Setup      = /usr/lib/x86_64-linux-gnu/odbc/libodbcmyS.so
FileUsage   = 1

the res_odbc.conf file so it looks like the following:

[asterisk]
enabled => yes
dsn => asterisk-connector
UID => asterisk
password => <myPassword>
pooling => no
limit => 1
pre-connect => yes

And after running odbc show in asterisk CLI I see as follows.

ip*CLI> odbc show

ODBC DSN Settings
-----------------

Questions: 1) In the tutorial they see

*CLI> odbc show

ODBC DSN Settings
-----------------

  Name:   asterisk
  DSN:    asterisk-connector

    Last connection attempt: 1969-12-31 19:00:00
  Pooled: No
  Connected: Yes

1) Why am I not seeing the Name and DSN when I run odbc show ? 2) Also I get this

[Jul 16 18:38:25] NOTICE[10970]: chan_sip.c:29427 sip_poke_noanswer: Peer 'nexmo' is now UNREACHABLE!  Last qualify: 81
[Jul 16 18:38:36] WARNING[11288]: db.c:285 db_execute_sql: Error executing SQL: database is locked

1 Answers1

0

Most likly you have error somewhere.

First can be recommended check files in odbcinst.ini are present and valid.

If they are, do following:

asterisk -rvvvvv
module unload res_config_odbc.so
module load res_config_odbc.so

You will see where is error in your config.

arheops
  • 15,544
  • 1
  • 21
  • 27