login | register
Tue 09 of Feb, 2010 [21:32 UTC]

voip-info.org

Discuss [9] History

Asterisk addon asterisk-addons

Created by: flobi,Last modification on Wed 31 of Oct, 2007 [12:22 UTC] by agx

asterisk-addons


http://www.asterisk.org/index.php?menu=download
asterisk-addons - An addons package, which includes MySQL support for call detail records and MP3 support for MOH

Installation

You must have MySQL installed and the development package prior to installing the app_addon_sql_mysql module.
You must already have Asterisk installed before following the directions below.

You must also have the DBD::mysql perl module installed!! Ensure your root@localhost user does not have a password then run the following:
perl -MCPAN -e "install DBD::mysql"
You can then apply your root@localhost password again (or make sure that you have an empty password for root, but be aware...)

You need to use svn or download a ready-made .tar file in order to retrieve the "asterisk-addons":

  # cd /usr/src
(the following command retrieves an old version of the addons. much better to get the current version of digium's site: http://ftp.digium.com/pub/asterisk/ currently)
  # svn checkout http://svn.digium.com/svn/asterisk-addons/branches/1.2 asterisk-addons

Compile /usr/src/asterisk-addons as follows:

  # cd asterisk-addons
  # make clean 
  # make install


Contents


See Also


Comments

Comments Filter
222

333mysql.h no such file or directory...

by nynymike, Tuesday 10 of April, 2007 [17:08:11 UTC]
I was getting the "mysql.h no such file or directory" message. I simply put a symbolic link in /usr/include:
<BR># cd /usr/include
<BR># ln -s /opt/mysql/include/mysql mysql

<P>Then it worked... (Substitute /opt/mysql/include/mysql with the location for your headers.)
222

333Error by loading modules

by di, Tuesday 08 of August, 2006 [22:40:59 UTC]
OS Slackware 10.2
asterisk-1.2.9.1
asterisk-addons-1.2.3

Unable to load module cdr_addon_mysql.so
Aug 9 01:45:49 WARNING5028: loader.c:325 load_resource: /usr/lib/asterisk/modules/cdr_addon_mysql.so: undefined symbol: pure_virtual
Unable to load module app_addon_sql_mysql.so
Aug 9 01:47:25 WARNING5074: loader.c:325 load_resource: /usr/lib/asterisk/modules/app_addon_sql_mysql.so: undefined symbol: pure_virtual


222

333Re: this doesn't appear to work on debian

by afazio, Thursday 18 of May, 2006 [13:21:44 UTC]
debian users need to 'apt-get install libmysqlclient15-dev'
222

333Re: it works, almost

by devi-o, Friday 08 of April, 2005 [07:08:52 UTC]
oh well, i got it using the following (modified) statements:
cc -fPIC -I../asterisk -D_GNU_SOURCE -I/usr/include/mysql -c -o cdr_addon_mysql.o cdr_addon_mysql.c
cc -shared -Xlinker -x -o cdr_addon_mysql.so cdr_addon_mysql.o -lmysqlclient -lz -L/usr/lib/mysql

thanx so much ! great community (:mrgreen:)(:mrgreen:)
222

333it works, almost

by devi-o, Friday 08 of April, 2005 [06:55:50 UTC]
you will need to get the mysql source archive: mysql-4.0.24.tar.gz and copy the header-files into a directory where the compiler may find it. (:mrgreen:)

i have trouble with compiling the app_addon_sq_mysql.c too, running just make in the addons dir does`nt work it and gcc-ing it complains about an undeclared function in the lock.h , my sources are fresh from the cvs, maybe it gets fixed tommorrow, or am i doing horribly wrong ?! (:rolleyes:)

222

333Re: Doesn't compile - Suse 9.1

by cyberbillp, Wednesday 09 of February, 2005 [00:22:51 UTC]
I needed zlib-devel .
No way to retract this post tho.
222

333Re: this doesn't appear to work on debian

by synaptic, Tuesday 08 of February, 2005 [23:06:12 UTC]
oh, it would appear we need source for asterisk and asterisk-addons in /usr/src
I'll ammend the instructions
222

333Doesn't compile - Suse 9.1

by cyberbillp, Monday 07 of February, 2005 [21:44:18 UTC]
DIFL1PC8643:/home/bill/asterisk-addons-1.0.4 # make install
./mkdep -fPIC -I../asterisk -D_GNU_SOURCE -I/usr/include/mysql `ls *.c`
make -C format_mp3 all
make1: Entering directory `/home/bill/asterisk-addons-1.0.4/format_mp3'
gcc -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -c -o common.o common.c
gcc -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -c -o dct64_i386.o dct64_i386.c
gcc -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -c -o decode_ntom.o decode_ntom.c
gcc -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -c -o layer3.o layer3.c
gcc -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -c -o tabinit.o tabinit.c
gcc -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -c -o interface.o interface.c
gcc -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -c -o format_mp3.o format_mp3.c
gcc -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -shared -Xlinker -x -o format_mp3.so common.o dct64_i386.o decode_ntom.o layer3.o tabinit.o interface.o format_mp3.o
make1: Leaving directory `/home/bill/asterisk-addons-1.0.4/format_mp3'
cc -fPIC -I../asterisk -D_GNU_SOURCE -I/usr/include/mysql -c -o cdr_addon_mysql.o cdr_addon_mysql.c
cc -shared -Xlinker -x -o cdr_addon_mysql.so cdr_addon_mysql.o -lmysqlclient -lz -L/usr/lib/mysql
/usr/lib/gcc-lib/i586-suse-linux/3.3.3/../../../../i586-suse-linux/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
make: *** cdr_addon_mysql.so Error 1
222

333this doesn't appear to work on debian

by synaptic, Sunday 06 of February, 2005 [22:26:16 UTC]
yo, anyone know if someone is making this an apt-get thing on debian? the Makefile fails as there is no suitable include path found...

app_addon_sql_mysql.c:31:25: mysql/mysql.h: No such file or directory
cdr_addon_mysql.c:24:22: asterisk.h: No such file or directory
cdr_addon_mysql.c:33:19: mysql.h: No such file or directory
cdr_addon_mysql.c:34:20: errmsg.h: No such file or directory