Problem with custom modules for Asterisk installed via yum

Hi,

We have asterisk 1.8.32.3 running on centos 6.8 64bit… As it was installed using yum and doesn’t have cdr_mysql module so when I compile same version of asterisk and copy its cdr_mysql.so file to asterisk modue directory and try to load it in asterisk using

Asterisk*CLI>module load cdr_mysql.so

It gives below error

Unable to load module cdr_mysql.so
Command 'module load cdr_mysql.so ’ failed.
[Dec 12 18:19:03] WARNING[22109]: loader.c:835 inspect_module: Module ‘cdr_mysql.so’ was not compiled with the same compile-time options as this version of Asterisk.
[Dec 12 18:19:03] WARNING[22109]: loader.c:836 inspect_module: Module ‘cdr_mysql.so’ will not be initialized as it may cause instability.
[Dec 12 18:19:03] WARNING[22109]: loader.c:923 load_resource: Module ‘cdr_mysql.so’ could not be loaded.

Asterisk*CLI> cdr show status

Call Detail Record (CDR) settings
---------------------------------------------------
Logging: Enabled
Mode: Simple
Log unanswered calls: No

  • Registered Backends

    cdr-custom
    csv

I want to know what is the solution for adding database support in it. Remember we don’t want to reinstall whole Asterisk using source…

Any help would be highly appreciated.

Thanks.

Recompiling everything is the easiest option. Otherwise you have to find the configuration file used for the main compile and recompile the database module using that,and probably the same compiler.

Thanks for the prompt reply… We don’t want to recompile. So please guide little bit more about the location of the configuration file and I will try to compile it using those settings. I m personally interested in compiling module this way so any guidance would be huge help.

“using the same compiler” wasn’t that installation compiled on same system when yum was issued? so probably the compiler will be same… right.

Thanks.

You must recompile, at least the conflicting module. Otherwise you need to search for a yum repository which contains a consistent set of all the modules that you need.

Does your prebuilt package have cdr_odbc or cdr_adaptive_odbc? You could use it instead as long as your system has the mysql driver for odbc installed.

Thanks david… I will check for the repo having mysql driver but still can you point to the configuration file location that was used with this prebuilt package so I can use same compile flags and test…

Thank you johnkiniston for your feedback but I only see below config files in /etc/asterisk folder

cdr.conf cdr_custom.conf cdr_manager.conf cdr_syslog.conf

and asterisk CLI shows these registered backends only

Asterisk*CLI> cdr show status

Call Detail Record (CDR) settings
---------------------------------------------------
Logging: Enabled
Mode: Simple
Log unanswered calls: No

Registered Backends
cdr-custom
csv

Hello guys, I am waiting for your precious comments on this topic.

Adaptive ODBC is not registered so please install the necesary packages and then recopile asterisk

steps ;

Before you install the connector in Asterisk, you have to install ODBC into Linux itself. To install the ODBC drivers, use this guide http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/installing_configuring_odbc.html

thanks for your reply but if you read all posts, I have mentioned that asterisk was installed using yum… so can not compile from source…
Need to know the location of the config file which was used.

The config file is used by the compilation system. If you are not prepared to recompile, it is of no use to you. It should be in the source rpm.

ok thanks. I will extract and search rpm. Any specific filename to look for?