Asterisk Installation through ports in FreeBSD

After updating the freeBSD ports collection follow these few simple steps to install asterisk

1.) cd /usr/ports/net/asteriskXX(XX may be 10,14,16 depending upon the version)

2.) make

3.) make install clean

and done..

Important: If you want to install and setup PRI ( dahdi,libpri etc) on freeBSD systems, its not going to work because currently only asterisk supports freeBSD well though DAHDI is also being developed to support it. As far as Digital telephony cards are concerned, most of them do not support freeBSD (or BSD also). 

Simple asterisk with dahdi installation steps CentOS 5

1.)yum install gcc gcc-c++ make openssl-devel newt-devel ncurses-devel libtermcap-devel libxml2-devel kernel-devel perl curl curl-devel
2.)uname -r
2.6.18-164.10.1.el5PAE
if kernel is PAE then do:
yum install kernel-PAE-devel

======install mysql database for CDR========
3.)yum install libtool-ltdl libtool-ltdl-devel unixODBC-devel mysql mysql-devel mysql-server mysql-connector-odbc

====steps to download and install asterisk with DAHDI=====
# cd /usr/src
# mkdir asterisk
# cd asterisk
# wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-1.6.2.0.tar.gz
# wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-addons-1.6.2.0.tar.gz
# wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz
# wget http://downloads.digium.com/pub/libpri/libpri-1.4-current.tar.gz
# tar zxvf asterisk-1.6.2.0.tar.gz
# tar zxvf asterisk-addons-1.6.2.0.tar.gz
# tar zxvf dahdi-linux-complete-current.tar.gz
# tar zxvf libpri-1.4-current.tar.gz
=========install libpri==========================
# cd /usr/src/asterisk/libpri-1.4.10.2
# make clean
# make
# make install
======install dahdi=================================
# cd /usr/src/asterisk/dahdi-linux-complete-2.2.1-rc2+2.2.1-rc2/
# make all
# make install
# make config

====install asterisk with selected packages====================
# cd /usr/src/asterisk/asterisk-1.6.2.0/
# make clean
# ./configure
# make menuselect

# make
# make install
# make samples
# make config
# chkconfig asterisk on

========install addons==========================
# cd /usr/src/asterisk/asterisk-addons-1.6.2.0
# make clean
# ./configure
# make menuselect

# make
# make install
# make samples

=======configure cdr-mysql===================
# vi /etc/asterisk/cdr_mysql.conf
[global]
hostname=localhost
dbname=asterisk
table=cdr
password=PASSWORD
user=asterisk
port=3306
sock=/var/lib/mysql/mysql.sock
userfield=1
loguniqueid=yes