Asterisk 1.8 - installation

Asterisk 1.8 have a different approach to the installation than the previous versions.

This is a simple step by step install instruction how to install Asterisk 1.8 on a Centos 5.x

Go to your src directory
cd /usr/src
Download current Asterisk 1.8
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-1.8-current.tar.gz
Unpack it
tar xvfz asterisk-1.8-current.tar.gz
Go down to asterisk unpacked files directory
NOTE: You need to do a ls -l to see the directory created from the tar.
This is the latest release

cd asterisk-1.8.4.4
Download mp3 support files
contrib/scripts/get_mp3_source.sh
Run configure
./configure
Start menu based configuration
make menuconfig
select app_mysql, app_saycountpl, cdr_mysql, format_mp3, res_config_mysql
go to Extras Sound Packages
Select EXTRAS-SOUNDS-EN-GSM
Save & Exit
Run make
make
Then run the installer
make install
Stop running Asterisk
amportal stop
And start the new Asterisk 1.8
amportal start

After eveything finishes, don’t install the sample configuration files.

“Asterisk has successfully been installed.
If you would like to install the sample configuration files (overwriting any
existing config files), run: make samples”

It did rename the existing .conf files to .old though.
Serves me right for not reading the message. Luckily I had a backup.

mcdeeiis - Any time I have received that message after an update or upgrade, I have always found that rebooting the system seems to fix the problem. YMMV.

I upgraded from 1.6 to 1.8 using the steps above without any errors during the installation. Now when I did amportal start, this is what I get…

Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)

Any ideas?
Any

When you say you “don’t see” the options do you mean you can’t find them or they are there but XXX is through the checkbox, so that you can’t select it?

If you can’t find them… keep looking!

my bad… I was looking under Application when it was somewhere else. Thank you very much for you help. I appreciate it.

Install mysql-devel also.

its still the same… I installed mysql-devel and did ./configure and then make menuconfig… but I still dont see those options.

what am I missing?

Is mysql found in the config.log?

yes mysql is at several places in config.log

here is what it says…

configure:20150: checking for mysql_config
configure:20169: found /usr/bin/mysql_config
configure:20181: result: /usr/bin/mysql_config

I was able to get to the menu select screen and now I dont see these options…

select app_mysql, app_saycountpl, cdr_mysql, format_mp3, res_config_mysql

any reason why?

I checked to see if mysql is installed and when I did yum install mysql… this is what I get
Package mysql-5.0.77-4.el5_5.4.i386 already installed and latest version

any suggestions?

In 1.8 it is important to use the ’ ./configure --with-mysqlclient ’ to install mysql support prior to compiling.

That’s an awful lot of log file.

But the problem seems to still be right up there at the top… gcc not found. echo $PATH – what do you get? Is the gcc program in your path?

I was able to compile with the following packages from yum. if you’re using a different distro, find the equivalent in your distro.

gcc.x86_64 4.1.2-48.el5 installed
gcc-c++.x86_64 4.1.2-48.el5 installed
libgcc.i386 4.1.2-48.el5 installed
libgcc.x86_64 4.1.2-48.el5 installed

Better install make also if you don’t have it.

Hey, by the way. Skip 1.8.1.1. Nasty transfer bug. See the release notes for 1.8.2-rc1. If you install 1.8.0-rc4 up through 1.8.1.1 you will have failed transfers from anything that uses the manager (Flash Operator Panel for example) and SIP blind transfers.

When I am trying to update to Asterisk v1.8 I keep getting this error: no acceptable C compiler found in $PATH

I checked an it seems to have gcc already installed. Currently Running FreePBX 2.8.0.4 and Asterisk 1.6.2.11

Still learning…

$ ./configure

---------

Platform.

---------

hostname = xxxxxx.local
uname -m = i686
uname -r = 2.6.18-194.26.1.el5PAE
uname -s = Linux
uname -v = #1 SMP Tue Nov 9 13:34:42 EST 2010

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch = i686
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /usr/kerberos/sbin
PATH: /usr/kerberos/bin
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /sbin
PATH: /bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /root/bin

-----------

Core tests.

-----------

configure:3302: checking build system type
configure:3316: result: i686-pc-linux-gnu
configure:3336: checking host system type
configure:3349: result: i686-pc-linux-gnu
configure:3464: checking for gcc
configure:3494: result: no
configure:3557: checking for cc
configure:3604: result: no
configure:3660: checking for cl.exe
configure:3690: result: no
configure:3714: error: in /usr/local/src/asterisk-1.8.1.1': configure:3717: error: no acceptable C compiler found in $PATH Seeconfig.log’ for more details.

Moderator note - MC
A totally useless log file removed. Error is that gcc is not found on your system

when i run the make i get the following errors (install was from voxilla ec2 freepbx - can someone please help?):

app_mysql.c:33:25: error: mysql/mysql.h: No such file or directory
app_mysql.c: In function ‘mysql_ds_destroy’:
app_mysql.c:135: warning: implicit declaration of function 'mysql_close’
app_mysql.c:138: warning: implicit declaration of function 'mysql_free_result’
app_mysql.c: In function ‘aMYSQL_connect’:
app_mysql.c:320: error: ‘MYSQL’ undeclared (first use in this function)
app_mysql.c:320: error: (Each undeclared identifier is reported only once
app_mysql.c:320: error: for each function it appears in.)
app_mysql.c:320: error: ‘mysql’ undeclared (first use in this function)
app_mysql.c:331: warning: implicit declaration of function 'mysql_init’
app_mysql.c:338: warning: implicit declaration of function 'mysql_options’
app_mysql.c:338: error: ‘MYSQL_OPT_CONNECT_TIMEOUT’ undeclared (first use in this function)
app_mysql.c:344: warning: implicit declaration of function 'mysql_real_escape_string’
app_mysql.c:345: error: ‘MYSQL_INIT_COMMAND’ undeclared (first use in this function)
app_mysql.c:346: error: ‘MYSQL_SET_CHARSET_NAME’ undeclared (first use in this function)
app_mysql.c:349: warning: implicit declaration of function 'mysql_real_connect’
app_mysql.c:359: warning: implicit declaration of function 'mysql_errno’
app_mysql.c:359: warning: implicit declaration of function 'mysql_error’
app_mysql.c:359: warning: format ‘%s’ expects type ‘char *’, but argument 10 has type 'int’
app_mysql.c: In function ‘aMYSQL_query’:
app_mysql.c:375: error: ‘MYSQL’ undeclared (first use in this function)
app_mysql.c:375: error: ‘mysql’ undeclared (first use in this function)
app_mysql.c:376: error: ‘MYSQL_RES’ undeclared (first use in this function)
app_mysql.c:376: error: ‘mysqlres’ undeclared (first use in this function)
app_mysql.c:392: warning: implicit declaration of function 'mysql_query’
app_mysql.c:393: warning: format ‘%s’ expects type ‘char *’, but argument 6 has type 'int’
app_mysql.c:397: warning: implicit declaration of function 'mysql_store_result’
app_mysql.c:400: warning: implicit declaration of function 'mysql_field_count’
app_mysql.c: In function ‘aMYSQL_nextresult’:
app_mysql.c:410: error: ‘MYSQL’ undeclared (first use in this function)
app_mysql.c:410: error: ‘mysql’ undeclared (first use in this function)
app_mysql.c:411: error: ‘MYSQL_RES’ undeclared (first use in this function)
app_mysql.c:411: error: ‘mysqlres’ undeclared (first use in this function)
app_mysql.c:432: warning: implicit declaration of function 'mysql_more_results’
app_mysql.c:433: warning: implicit declaration of function 'mysql_next_result’
app_mysql.c: In function ‘aMYSQL_fetch’:
app_mysql.c:450: error: ‘MYSQL_RES’ undeclared (first use in this function)
app_mysql.c:450: error: ‘mysqlres’ undeclared (first use in this function)
app_mysql.c:451: error: ‘MYSQL_ROW’ undeclared (first use in this function)
app_mysql.c:451: error: expected ‘;’ before 'mysqlrow’
app_mysql.c:468: error: ‘mysqlrow’ undeclared (first use in this function)
app_mysql.c:468: warning: implicit declaration of function 'mysql_fetch_row’
app_mysql.c:469: warning: implicit declaration of function 'mysql_num_fields’
app_mysql.c: In function ‘aMYSQL_clear’:
app_mysql.c:502: error: ‘MYSQL_RES’ undeclared (first use in this function)
app_mysql.c:502: error: ‘mysqlres’ undeclared (first use in this function)
app_mysql.c: In function ‘aMYSQL_disconnect’:
app_mysql.c:519: error: ‘MYSQL’ undeclared (first use in this function)
app_mysql.c:519: error: ‘mysql’ undeclared (first use in this function)
make[1]: *** [app_mysql.o] Error 1
make: *** [addons] Error 2

Got it sorted out. Somehow, something along the way altered my /etc/asterisk/cdr_mysql.conf, changing the user from asteriskuser to freepbx. Odd.

Works now.

So, I upgraded from 1.6.2 to 1.8 the other day. Everything is working, except for my CDRs. Everything looks the same as it did before the upgrade - empty cdr.conf, all the info in cdr_mysql.conf. I don’t seem to be getting any CDR data at all, where I was getting it before the upgrade.

I did check, and yes, /usr/lib/asterisk/modules/cdr_mysql.so is there, and matches the other modules that got installed when I built 1.8.0. The module does show as loaded, but cdr mysql status claims that it’s not connected to a mysql server.

This just feels like it should be some sort of simple resolution, though I’m having trouble putting my finger on it…

What is the output of ‘cdr mysql status’ and ‘cdr status’ ??

Hello again,

as I asked in other thread, after installing all asterisk 1.8, freepbx 2.8 and a2billing 1.8, I’m missing a logout bottom in freepbx admin panel, on the GUI I mean… when I go to my IP I have to choice to access as admin, and no password prompt, so i go without any password, and no any option to get logout…

any idea, this is a critical security bug, or what??
Regards,