まだエラーでるけど。一応ブログ。。。
http://qiita.com/kitsuki00/items/27f0aeede8d96980ecd5
$ yum update
$ yum install gcc-c++ make gnutls-devel kernel-devel libxml2-devel ncurses-devel subversion doxygen texinfo curl-devel net-snmp-devel neon-devel
$ yum install uuid-devel libuuid-devel sqlite-devel sqlite git speex-devel gsm-devel
$ yum install uuid-devel libuuid-devel sqlite-devel sqlite git speex-devel gsm-devel
janssonが必要とのことなのでこちらもインストール
$ cd /usr/src/
$ git clone https://github.com/akheron/jansson.git
$ cd jansson
$ autoreconf -i
$ ./configure -prefix=/usr/
$ make && make install
$ cd /usr/src/
$ git clone https://github.com/akheron/jansson.git
$ cd jansson
$ autoreconf -i
$ ./configure -prefix=/usr/
$ make && make install
SRTP
$ cd /usr/src/
$ wget wget https://downloads.sourceforge.net/project/srtp/srtp/1.4.4/srtp-1.4.4.tgz
$ tar zxvf srtp-1.4.4.tgz
$ cd srtp
$ autoconf
$ ./configure CFLAGS=-fPIC
$ make && make install
$ cd /usr/src/
$ wget wget https://downloads.sourceforge.net/project/srtp/srtp/1.4.4/srtp-1.4.4.tgz
$ tar zxvf srtp-1.4.4.tgz
$ cd srtp
$ autoconf
$ ./configure CFLAGS=-fPIC
$ make && make install
PJPROJECT
$ cd /usr/src/
$ wget http://www.pjsip.org/release/2.4/pjproject-2.4.tar.bz2
$ tar xvjf pjproject-2.4.tar.bz2
$ cd pjproject-2.4
$ ./configure –prefix=/usr –enable-shared –disable-sound –disable-resample –disable-video –disable-opencore-amr
$ ./configure –libdir=/usr/lib64 –prefix=/usr –enable-shared –disable-sound –disable-resample –disable-video –disable-opencore-amr
$ touch pjlib/include/pj/config_site.h
$ make dep
$ make clean
$ make
$ make install
$ ldconfig
$ cd /usr/src/
$ wget http://www.pjsip.org/release/2.4/pjproject-2.4.tar.bz2
$ tar xvjf pjproject-2.4.tar.bz2
$ cd pjproject-2.4
$ ./configure –prefix=/usr –enable-shared –disable-sound –disable-resample –disable-video –disable-opencore-amr
$ ./configure –libdir=/usr/lib64 –prefix=/usr –enable-shared –disable-sound –disable-resample –disable-video –disable-opencore-amr
$ touch pjlib/include/pj/config_site.h
$ make dep
$ make clean
$ make
$ make install
$ ldconfig
$ ldconfig -p | grep pj
Asteriskのビルド&インストール
$ cd /usr/src/
$ wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-13-current.tar.gz
$ tar -xzvf asterisk-13-current.tar.gz
$ cd asterisk-13.15.0/
$ ./configure -with-crypto -with-ssl -with-srtp=/usr/local/lib –prefix=/usr –libdir=/usr/lib64
$ contrib/scripts/get_mp3_source.sh
$ make menuselect
$ wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-13-current.tar.gz
$ tar -xzvf asterisk-13-current.tar.gz
$ cd asterisk-13.15.0/
$ ./configure -with-crypto -with-ssl -with-srtp=/usr/local/lib –prefix=/usr –libdir=/usr/lib64
$ contrib/scripts/get_mp3_source.sh
$ make menuselect
$ make
$ make samples
$ make config
$ make config
$ chkconfig asterisk on
起動
$ /etc/init.d/asterisk start
$ /etc/init.d/asterisk start
Setting
$ cd /etc/asterisk
$ vi sip.conf
$ vi sip.conf
[general]
;
;***********2017/04/08 setting*****************
;
;
;***********2017/04/08 setting*****************
;
context=default
port=5060
bindaddr=0.0.0.0
language=ja
port=5060
bindaddr=0.0.0.0
language=ja
localhost=160.16.205.126/255.255.255.0
[5000]
type=friend
username=5000
secret=pass
canreinvite=no
host=dynamic
[5001]
type=friend
username=5001
secret=pass
canreinvite=no
host=dynamic
[5002]
type=friend
username=5002
secret=pass
canreinvite=no
host=dynamic
[5003]
type=friend
username=5003
secret=pass
canreinvite=no
host=dynamic
[5004]
type=friend
username=5004
secret=pass
canreinvite=no
host=dynamic
[5000]
type=friend
username=5000
secret=pass
canreinvite=no
host=dynamic
[5001]
type=friend
username=5001
secret=pass
canreinvite=no
host=dynamic
[5002]
type=friend
username=5002
secret=pass
canreinvite=no
host=dynamic
[5003]
type=friend
username=5003
secret=pass
canreinvite=no
host=dynamic
[5004]
type=friend
username=5004
secret=pass
canreinvite=no
host=dynamic
;
;***********2017/04/08 setting*****************
;
;***********2017/04/08 setting*****************
;
Asterisk の設定:
$ cd /etc/asterisk/
$ vi rtp.conf
rtpstart=10000
;rtpend=20000
rtpend=10010
$ cd /etc/asterisk/
$ vi rtp.conf
rtpstart=10000
;rtpend=20000
rtpend=10010
Asterisk の設定:/etc/asterisk/extensions.conf
[default] セクションを下記のように変更します。。。。と。
[default] セクションを下記のように変更します。。。。と。
;
;***********2017/04/08 setting*****************
;
exten => _5XXX,1,Dial(SIP/${EXTEN},30)
exten => _5XXX,2,Congestion
exten => _5XXX,102,Busy
exten => 9001,1,Playback(queue-thankyou)
exten => 9002,1,Playback(hello-world)
;
;***********2017/04/08 setting*****************
;
;***********2017/04/08 setting*****************
;
exten => _5XXX,1,Dial(SIP/${EXTEN},30)
exten => _5XXX,2,Congestion
exten => _5XXX,102,Busy
exten => 9001,1,Playback(queue-thankyou)
exten => 9002,1,Playback(hello-world)
;
;***********2017/04/08 setting*****************
;
再起動
$ sudo service asterisk restart
# asterisk -r vvvvvc
>tk2-201-10183*CLI> dialplan reload
Dialplan reloaded.
$ sudo service asterisk restart
# asterisk -r vvvvvc
>tk2-201-10183*CLI> dialplan reload
Dialplan reloaded.
まだWARNINGがでるなあ。。。。。。。。。。ダメ!!