#Setup the system
apt-get install
apt-get install subversion
apt-get install make
apt-get install linux-source
apt-get install kernel-package
apt-get install linux-kernel-headers
apt-get install linux-headers linux-headers-`uname -r`
#Install other needed stuff
aptitude install libconfig-tiny-perl libcupsimage2 libcups2 libmime-lite-perl libemail-date-format-perl libfile-sync-perl libfreetype6 libspandsp1 libtiff-tools libtiff4 libjpeg62 libmime-types-perl libpaper-utils psutils libpaper1 ncurses ncurses-dev libncurses-dev libncurses-gst ncurses-term libnewt libnewt-dev libnewt-pic libxml2 libxml2-dev libspandsp-dev libspandsp1 bison
#Change to the proper directory
cd /usr/src/
#Get SRTP
#You can update the SRTP version by changing the VERSION value on the next line. Check http://srtp.sourceforge.net/download.html for the most current version
number
VERSION=1.4.2.tgz
wget http://srtp.sourceforge.net/srtp-$VERSION
tar -zxvf srtp-$VERSION
cd srtp-$VERSION
./configure
make
make runtest
make install
cd /usr/src/
# Get asterisk
svn co http://svn.digium.com/svn/asterisk/team/group/srtp/ asterisk
# Get DAHDI Kernel
svn co http://svn.digium.com/svn/dahdi/linux/trunk dahdi-kernel
# Get DAHDI Tools
svn co http://svn.digium.com/svn/dahdi/tools/trunk dahdi-tools
# Get libpri
svn co http://svn.digium.com/svn/libpri/branches/1.4/ libpri
Compile The Asterisk Files
# Compile libpri
cd /usr/src/libpri
make
# Compile the DAHDI kernel
cd /usr/src/dahdi-kernel
make
make install
# Compile the tools
cd /usr/src/dahdi-tools
./configure
make
make install
make config
# Compile asterisk
cd /usr/src/asterisk
./configure
make
make install
#Set asterisk to start automatically through init.d
make config
#Create sample files for a first time user. DO NOT run this if you already have configs you want to keep! They will be over written!
make samples
srtpcapable=yes
[local_stations]
exten => _XXXX,1,Set(_SIPSRTP=${SIPPEER(${EXTEN},srtpcapable)})
exten => _XXXX,n,Dial(SIP/${EXTEN})
The examples above will, for any given 4 digit extension, tell Asterisk to use SRTP if the endpoint supports it.
sec.srtp.enable="1"
sec.srtp.leg.enable="1"
sec.srtp.offer="1"
sec.srtp.require="1"
sec.srtp.enable="1"
sec.srtp.leg.enable="1"
sec.srtp.offer="1"
sec.srtp.sessionParams.noAuth.offer="1"
sec.srtp.sessionParams.leg.noAuth.offer="1"
sec.srtp.sessionParams.leg.noAuth.require="1"
sec.srtp.sessionParams.IP_4000.noAuth.offer="1"
Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.
Comments (1)
Commented: