# CDR MySQL

**URL:** <https://community.asterisk.org/t/cdr-mysql/33268>\
**Category:** Asterisk Support\
**Created:** [November 16, 2010, 3:13pm UTC](https://community.asterisk.org/t/cdr-mysql/33268 "2010-11-16T15:13:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [November 16, 2010, 3:13pm UTC](https://community.asterisk.org/t/cdr-mysql/33268/1 "2010-11-16T15:13:38Z")

</div>

Hi,  
I’ve asterisk 1.6.2.5 installed on Ubuntu 10.4.

I’ve decided to output CDR on MySQL.  
So, using Synaptic I’ve:

- installed mysql-server, mysql-client, both ver. 5.1;
- installed asterisk-mysql ver. 1.6.2.0 (after this installation there are cdr\_addon\_mysql.so, app\_addon\_sql\_mysql.so and res\_config\_mysql.so in the /usr/lib/asterisk/modules).

So, I’ve modified the /etc/asterisk/modules.conf adding:

- load =\> cdr\_addon\_mysql.so

But this module doesn’t appear in the module show CLI command.  
Also, I’ve commented the “Autoload=yes” in the modules.conf to be sure that the modules list in the CLI command is clean (there is the only res\_musiconhold.so).

Please, any suggestion ?

Thanks too too much.

---

<div class="post-metadata">

**Author:** ![malcolmd](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/malcolmd/32/5_2.png) [@malcolmd](https://community.asterisk.org/u/malcolmd)\
**Post date:** [November 16, 2010, 3:21pm UTC](https://community.asterisk.org/t/cdr-mysql/33268/2 "2010-11-16T15:21:19Z")

</div>

What happens if you try to load the mysql module from the Asterisk CLI, e.g.:

module load cdr\_addon\_mysql.so

?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [November 16, 2010, 5:16pm UTC](https://community.asterisk.org/t/cdr-mysql/33268/3 "2010-11-16T17:16:40Z")

</div>

There is the following error:  
Unable to load module cdr\_addon\_mysql.so  
Command ‘module load cdr\_addon\_mysql.so’ failed.  
[Nov 16 09:15:00] WARNING[2968]: loader.c:716 inspect\_module: Module ‘cdr\_addon\_mysql.so’ was not compiled with the same compile-time options as this version of Asterisk.  
[Nov 16 09:15:00] WARNING[2968]: loader.c:717 inspect\_module: Module ‘cdr\_addon\_mysql.so’ will not be initialized as it may cause instability.  
[Nov 16 09:15:00] WARNING[2968]: loader.c:800 load\_resource: Module ‘cdr\_addon\_mysql.so’ could not be loaded.

What I have to do ?

Thanks

---

<div class="post-metadata">

**Author:** ![Mark\_Logan](https://avatars.discourse-cdn.com/v4/letter/m/dec6dc/32.png) [@Mark\_Logan](https://community.asterisk.org/u/Mark_Logan)\
**Post date:** [November 16, 2010, 6:24pm UTC](https://community.asterisk.org/t/cdr-mysql/33268/4 "2010-11-16T18:24:01Z")

</div>

I believe I saw this a while back when installing the MySQL for asterisk. The issue shows itself when you compile Asterisk. Now, not to sound too useless, but I can’t remember what it is. I just know that you see it fail when you do the build. If you can post the logs of building asterisk or just compile it and \>\> it to a file so we can sift through the data, I’m sure a solution can be found.

---

<div class="post-metadata">

**Author:** ![ianplain](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/ianplain/32/1776_2.png) [@ianplain](https://community.asterisk.org/u/ianplain)\
**Post date:** [November 16, 2010, 7:29pm UTC](https://community.asterisk.org/t/cdr-mysql/33268/5 "2010-11-16T19:29:33Z")

</div>

Have you compiled asterisk\_addons as cdr mysql isn’t in base asterisk

Ian

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [November 17, 2010, 8:42am UTC](https://community.asterisk.org/t/cdr-mysql/33268/6 "2010-11-17T08:42:15Z")

</div>

Hi all,

I’ve solved with these commands:

~# apt-get build-dep asterisk-mysql  
~# apt-get -b source asterisk-mysql  
~# dpkg -i asterisk-mysql\_1.6.2.0-1\_i386.deb

found on the web.

Thank so much.
