Asterisk Installation Guide
Asterisk Installation Guide
Step 1.
At firs install asterisk dependency
apt-get update
apt-get upgrade
apt-get install linux-headers- `uname -r`
apt-get install build-essential
apt-get install libssl-dev
apt-get install ncurses-dev
apt-get install libnewt-dev
apt-get install bison
apt-get install libxml2-dev
apt-get install libsqlite3-dev
apt-get install sqlite3
apt-get install wget
apt-get install subversion
apt-get install ntp
apt-get install zip
apt-get install sysv-rc-conf
apt-get install php-pear
pear install DB
#MYSQL INSTALL
apt-get install mysql-server
apt-get install libmysqlclient-dev
# ODBC CONNECTION
#INSTALL PHP
apt-get install apache2
apt-get install php5
apt-get install php5-mysql
apt-get install phpmyadmin
Download Source
#cd /usr/src
#wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-11-current.tar.gz
#tar -zxvf asterisk-11-current.tar.gz
"Compile asterisk"
#cd asterisk-11-current
#cd /contrib/scripts/
#./install_prereq install
#cd /usr/src/asterisk-11-current
#./configure
#make clean
#make menuselect
#make
#make install
#make samples
sip.conf
[general]
register => 111111:[email protected]/111111
allowoverlap=yes
udpbindaddr=0.0.0.0
tcpenable=no
tcpbindaddr=0.0.0.0
transport=udp
; Set the default transports. The order determines the primary default transport.
srvlookup=yes
videosupport=yes
progressinband=yes
silencesuppression=no
;insecure=invite,port
allowtransfer=yes
alwaysauthreject=yes
allowguest=no
[1112]
type=friend
callerid=1112
username=1112
host= dynamic
secret=abc123123
dtmfmode=rfc2833
insecure=invite,port
canreinvite=yes
nat=force_rport
qualify=yes
context=incoming
allow=ulaw
allow=alaw
[1111]
type=friend
callerid=1111
username=1111
host= dynamic
secret=abc123123
dtmfmode=rfc2833
insecure=invite,port
canreinvite=yes
nat=force_rport
qualify=yes
context=incoming
allow=ulaw
allow=alaw
Dialplan Configure
extension.conf
[general]
static=yes
writeprotect=yes
;autofallthrough=no
clearglobalvars=no
;priorityjumping=yes
[incoming]
exten => 900,1,VoicemailMain(s${CALLERID(num)})
same => n,Hangup()
exten => _XXXX,1,Dial(SIP/${EXTEN},30)
same => n,Hangup()
;Local Mobile and PSTN..... Outgoing ....
exten => _XXXXXX,1,Dial(SIP/kotha-sip-account/${EXTEN},30)
same => n,Hangup()
exten => _0Z.,1,Dial(SIP/kotha-sip-account/${EXTEN},30)
same => n,Hangup()
exten => _+880Z.,1,Dial(SIP/kotha-sip-account/${EXTEN:3},30)
same => n,Hangup()
[from-kotha]
exten => 111111,1,Answer()
cdr_mysql.conf
[global]
hostname=localhost
dbname=asterisk
table=cdr
password=xyz
user=root
port=3306
sock= /var/run/mysqld/mysqld.sock
Voicemail configure
voicemail.conf
[general]
searchcontexts=yes
maxmessage=120
format=wav49|wav
serveremail=asterisk
attach=no
skipms=3000
maxsilence=10
silencethreshold=128
maxlogins=3
[default]
1111 => 1234,1112,[email protected]
1112 => 1234,1112,[email protected]