Tuesday, August 5, 2008

asterisk on Ec2 ubuntu

Install Pre-Requisites:

For compiling and installing:
apt-get install build-essential autoconf automake libtool flex bison libssl-dev
libnewt-dev libncurses5-dev linux-headers-`uname -r` gcc

SOUNDS:
apt-get install sox curl subversion subversion-tools

MySQL
apt-get install mysql-client mysql-server libmysqlclient15-dev


LIBPRI:
wget ftp.digium.com/pub/libpri/releases/libpri-1.4.4.tar.gz
make
make install


Speex:(
Speex is an Open Source/Free Software patent-free audio compression format designed for speech. The Speex Project aims to lower the barrier of entry for voice applications
by providing a free alternative to expensive proprietary speech codecs. Moreover, Speex is well-adapted to Internet applications and provides
useful features that are not present in most other codecs.)

wget http://downloads.us.xiph.org/releases/speex/speex-1.2beta2.tar.gz
./configure --prefix=/usr
make
make install

Asterisk:
wget ftp.digium.com/pub/asterisk/releases/asterisk-1.4.21.1.tar.gz

cd asterisk-1.4.13
Edit the Makefile(change the ASTVARRUNDIR= to /var/run/asterisk)
./configure
make menuselct(selct gsm sounds frm extras and core sounds in gsm)
make install
make samples

Asterisk Addons:
wget ftp.digium.com/pub/asterisk/releases/asterisk-addons-1.4.7.tar.gz
cd asterisk-addons-1.4.4
./configure
make menuselect
make install

LINKS(to install it apt-get install links)
go to http://asterikast.com -> downloads -> download the g729 codecs from there
UNZIP it... (apt-get install UNZIP)
copy that codecs into /usr/lib/asterisk/module/

DELETE all the codecs and asterisk-addons folder frm /usr/src

groupadd asterisk
useradd -s /bin/false -g asterisk asterisk

wget http://asterikast.com/_downloads/_scripts/ownast
cat ownast
chmod +x ownast
cp ownast /usr/bin/
ownast

safe_asterisk -U asterisk -G asterisk
(if you get "Bad fd number" try ln -sf /bin/bash /bin/sh)
asterisk -r
ps

edit the sip.conf
[general]
context=default
allowguest=yes
disallow=all
allow=ulaw
nat=yes
dtmfmode=rfc2833
canreinvite=no

[100]
type=friend
context=default
disallow=all
allow=ulaw
allow=g729
host=dynamic
username=100
secret=100
canreinvite=no






AddThis Feed Button

No comments: