Updating RPM-installed Asterisk from source

I believe this is a common problem but cannot find any specifics on it.

I have an Asterisk 1.8.28 installation on a CentOS 6.5 server which was not installed from source but using yum package manager, no modification but simply installed what CentOS has packaged.
So far, CDRs are logged using “cdr_custom” to files.
Now I need to enable logging CDRs using cdr_tds to an MS SQL server.

The only way to do that seems to download the source code, recompile it using the --with-tds option. Which is quite weird in my opinion. My first question is if there is another way?

Second question is, if I do have to go that route, do I have to use make menuselect to then select the TDS option in the CDR section?

Doing this would give me a brandnew installation of Asterisk. However, I have no idea what modules were enabled in the package for CentOS, and cannot find any documentation on it. So when I use menuselect I don’t know what options to enable or disable. The original installation wasn’t done from source so there is no menuselect available to show what’s installed. Is there a way I can see this information in some other way? In the Asterisk CLI I can use “module show” which lists out many modules. I could then map them to menuselect, painfully one by one. Is that my only option?

This is a production system and I cannot experiment and mess it up. If anyone has any idea or procedure on how to go about this in a sensible fashion it would be very appreciated.

That is how you get cdr_tds, and it’s done that way because it requires external libraries which not every system would have so it is not built by default. As for installing it you can download the same version, build it, but only copy cdr_tds into your /usr/lib/asterisk/modules directory.

Brilliant idea.
What you are saying is essentially to build and install Asterisk in a separate directory, sort of sandboxing it and then copy the cdr_tds.so file into the production “module” folder.

I did that, and copied the cdr_tds.so file but it does not get loaded in Asterisk. Log file contains the following message:

  Module 'cdr_tds.so' was not compiled with the same compile-time options as this version 
  of Asterisk.
  Module 'cdr_tds.so' will not be initialized as it may cause instability.

I am not sure how I get the “compile-time options” of the CentOS rpm package …
Would you have a tip of what options I can set?

The options are set using “make menuselect” but I am unaware of what the RPM would have used.

Okay, thanks, managed to get that to work by using the newly compiled asterisk, switching this one to production. Module is now showing in Asterisk with “module show like cdr”. Thanks for assistance.

You should be able to download the source RPM and tweak that.