Odbc modules are missing after make install

#1

Hi! I installed the latest Asterisk release (Asterisk 16.3.0). Centos 7.
With menuselect I checked all modules I need to add odbc-mysql connection:

[*] cdr_odbc
[*] cdr_adaptive_odbc
[*] func_odbc
[*] func_realtime
[*] pbx_realtime
[*] res_config_odbc
[*] res_odbc

So after make install I start Asterisk and see no odbc modules, why?

localhost*CLI> module show like odbc
Module Description Use Count Status Support Level
0 modules loaded

localhost*CLI> module load func_odbc.so
Unable to load module func_odbc.so
Command ‘module load func_odbc.so’ failed.
[Apr 10 13:02:17] ERROR[25887]: loader.c:170 module_load_error: Error loading module ‘func_odbc.so’: /usr/lib64/asterisk/modules/func_odbc.so: cannot open shared object file: No such file or directory

root@localhost ~ # ls /usr/lib64/asterisk/modules/ | grep odbc
Total: 0
root@localhost ~ # ls /usr/lib64/asterisk/modules/ | grep mysql
Total: 1
res_config_mysql.so

What shall I do to make them available?
Thank you.

0 Likes

#2

Sorry for asking this question. Did the modules actually build?

In case they didn’t, a necessary prerequisite is that the packages unixODBC and unixODBC-devel are on board. Hidden somewhere in the source tree is a script that installs all required rpm packages, though I haven’t used it for while myself. Otherwise you need to install all prerequisites yourself.

0 Likes

#3

When you are running command ls /usr/lib64/asterisk/modules/ | grep odbc it should return many files, but it is not returning anything, that mean your modules are not compiled.
To fix the issue you should check if all requirements are complete. You can run command into the asterisk16 source directory

cd contrib/scripts
./install_prereq

It will check and install all missing dependency in the system then you can make menuselect and reslect save, exit does recompile.

Now if you run following command

ls /usr/lib64/asterisk/modules/ | grep odbc

your will get following list

cdr_adaptive_odbc.so
cdr_odbc.so
cel_odbc.so
func_odbc.so
res_config_odbc.so
res_odbc.so
res_odbc_transaction.so
0 Likes

#4

Yes, they are. But recompilling fixed my issue.
Anyway, thank you for the answer.

0 Likes

#5

Thank you for the answer

0 Likes