-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinstall-pjsip
More file actions
executable file
·46 lines (37 loc) · 1.59 KB
/
install-pjsip
File metadata and controls
executable file
·46 lines (37 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/sh
# install pjsip directly from teluu trunk
[ ! -f /etc/yum.repos.d/epel.repo ] && install-packages epel-release
install-packages git subversion gcc-c++/gcc-4.4 speex-devel/libspeex-dev libsrtp-devel/ portaudio-devel/
[ -f /usr/local/lib/libpjsip.so -o -f /usr/local/lib64/libpjsip.so ] && echo "ERROR: conflicting pjsip in /usr/local!" && exit 1
set -ex
LIBDIR=/usr/lib
[ `uname -m` = "x86_64" ] && [ -d /usr/lib64 ] && LIBDIR="/usr/lib64"
if [ "$1" != "-p" ]
then
echo "Installing PJSIP from Asterisk Github"
[ -d pjproject ] && rm -rf pjproject
git clone https://github.com/asterisk/pjproject pjproject
cd pjproject
git checkout tags/pjproject-2.4.5 # tags/pjproject-2.3-patched
echo "#define PJ_HAS_IPV6 1" >pjlib/include/pj/config_site.h
./configure CFLAGS='-g -DNDEBUG' --enable-shared --prefix=/usr --libdir=$LIBDIR --with-external-pa --with-external-gsm --disable-sound --disable-resample --disable-video --disable-opencore-amr
make dep
make
sudo make install
sudo ldconfig
exit
fi
REVISION="`svn info http://svn.pjsip.org/repos/pjproject/trunk|fgrep Revision`"
REVNUM="${REVISION#*: }"
svn co http://svn.pjsip.org/repos/pjproject/trunk pjsip-r$REVNUM
cd pjsip-r$REVNUM
echo "#define PJ_HAS_IPV6 1" >pjlib/include/pj/config_site.h
./configure --enable-shared --prefix=/usr --libdir=$LIBDIR --with-external-srtp --with-external-speex --with-external-pa --disable-resample
make dep
make
#make -C pjsip-apps/build pjsua
sudo make install
sudo ldconfig
#sudo cp -v pjsip-apps/bin/pjsua-`uname -m`-*-linux-gnu /usr/sbin/pjsua
#sudo make -C pjsip-apps/src/python install
sudo chown -R $USER.$USER .