login | register
Tue 07 of Oct, 2008 [01:49 UTC]

voip-info.org

Discuss [6] History

Asterisk Compile

Created by: JazEzork,Last modification on Thu 15 of Feb, 2007 [19:11 UTC] by bcnit

Compile Asterisk

Ok, you have the source code to Asterisk sitting in your /usr/src/asterisk directory. Now what?

   cd /usr/src/asterisk
   make clean
   make
   make install

Note: By default, Asterisk runs as the root user. This is a security liability. Consider:


Executable files installed:
  • /usr/sbin/asterisk: The Asterisk daemon that runs your PBX
  • /usr/sbin/safe_asterisk: A shell script to make sure Asterisk keeps on running
  • /usr/sbin/astgenkey
  • /usr/sbin/astman: A very very basic manager interface. See astman for details.

Other directories structures created:
  • /usr/include/asterisk: Contains header files required for building asterisk applications, channel drivers, and other loadable modules.
  • /usr/lib/asterisk: Contains binary objects related to Asterisk which are architecture-specific.
  • /var/lib/asterisk: Contains variable data used by Asterisk in its normal operation.
  • /var/spool/asterisk: Used for runtime spooled files of voicemail, outgoing calls, etc.

Install Configuration Files

Now you are almost ready for configuration. Do this:

   cd /usr/src/asterisk
   make samples

This will copy a set of sample configuration files to your /etc/asterisk directory.

(:exclaim:) If you have existing configuration files in your /etc/asterisk directory, they will be renamed with ".old" appended to their filenames.

You should be able to start Asterisk with no changes needed to the sample configuration files:


Or you may go ahead and start turning all the knobs and pressing all the buttons:


Compilation Notes

VIA ITX mainboards

Asterisk 1.2.x

The VIA would aspire to be a i686, but it is actually a i586 from a compiler standpoint. So with that, you need to make a change to your /usr/src/asterisk/Makefile and change the following:

 #ifeq (${OSARCH},Linux)
 #PROC=$(shell uname -m)
 #endif
 # Pentium Pro Optimize
 #PROC=i686
 # Pentium & VIA processors optimize
 PROC=i586

Make sure that you comment out the ifeq (${OSARCH},Linux) or else when the Makefile is running, it will reset the PROC value from i586 back to i686.

Asterisk 1.4.x

Run configure with the following arguments: "--build=i586 --host=i586".

Solaris 8 SPARC

On the prerequirement it is noted to use ginstall for doing "make install" but it is not noted what to do if it is not exist!

Under Makefile.defs

#ifeq ($(OS), solaris) 
#use GNU versions
#INSTALL ?= ginstall  >> change the following to INSTALL ?= install  
#TAR ?= gtar
#else
#INSTALL ?= install
#TAR ?= tar
#endif

Good Luck

Asterisk | Asterisk Installation

Comments

Comments Filter
222

333make: Fatal error in reader: Makefile, line 30: Unexpected end of line seen

by simhakaipa, Thursday 18 of January, 2007 [07:59:52 UTC]
I am trying to compile asterisk on "SunOS tahoe 5.8 Generic_108528-23 sun4u sparc SUNW,Ultra-5_10" m/c and I get the following error when I try to run make -

make: Fatal error in reader: Makefile, line 30: Unexpected end of line seen

Line 30 in the Makefile has the following -

export ASTERISKVERSION

Anyone has any clues as to why I am getting this error. I have installed as non-root user and trying to compile as same user.

222

333chan_zap.c:2086: error: too few arguments to function `pri_sr_set_bearer'

by kmeier, Friday 24 of November, 2006 [13:13:34 UTC]
hi

chan_zap.c:2086: error: too few arguments to function `pri_sr_set_bearer'

is caused by not installing libpri before compiling asterisk !

ciao
222

333Re: To compile an alsa module.

by gregmac, Wednesday 09 of March, 2005 [20:07:37 UTC]
the Makefile in asterisk/channels checks for /usr/include/alsa/asoundlib.h.

On debian this is provided by libasound2-dev.


222

333Re: Not sure what mainboard you have?

by , Friday 18 of February, 2005 [13:13:34 UTC]
That's not completly correct.. you only see what cpu is in your system.. (:rolleyes:)
222

333To compile an alsa module.

by , Tuesday 28 of December, 2004 [08:43:30 UTC]
I discovered that in the resent versions 1.0.2,1.0.3 the alsa module chan_alsa.so did not get compiled, so it could get loaded. Only chan_oss.so module was working but only simetime :) I installed the libalsa2-devel package (by writing urpmi libalsa2-devel) and I also changed the make file in channels directory to compile it. Maybe this was not neccessary.
222

333Not sure what mainboard you have?

by Buzz, Sunday 06 of June, 2004 [16:01:27 UTC]
Type: cat /proc/cpuinfo and you can tell there what you have without opening up computer.