1 :checkout Asterisk source code revision 373330
svn checkout -r 373330 http://svn.digium.com/svn/asterisk/trunk asterisk (下载最新asterisk版本)
2 :asterisk 上面需要打一个补丁支持 VP8 video编码
wget http://sipml5.googlecode.com/svn/trunk/asterisk/asterisk_373330.patch
3 :拷贝补丁 patch 到asterisk 文件夹 cd asterisk
patch -p0 -i ./asterisk_373330.patch
4 :安装asterisk
先安装srtp
yum -y install gcc gcc-c++ pkgconfig zlib-devel openssl-devel ncurses-devel
yum -y install autoconf automake libtool
cd srtp-1.4.4
./configure
make
make install
安装asterisk
cd asterisk
./configure --with-crypto --with-ssl --without-srtp --prefix=/opt/asterisk
make
make install
make samples
5 :配置asterisk
vi sip.conf
[general]
realm=192.168.1.18
domainsasrealm=192.168.1.18
udpbindaddr=0.0.0.0:5060
tcpenable=no
tcpbindaddr=0.0.0.0
transport=udp
videosupport=yes
directmedia=yes(奇怪这个值为no的时候视频速度最快,但是语音通话的时候就会有显示问题)
分机配置
[2005]
username=2005
secret=2005
accountcode=2005
callerid="2005" <2005>
mailbox=2005
context=lrm
type=friend
host=dynamic
compensate=yes
hassip = yes
[2006]
username=2006
secret=2006
accountcode=2006
callerid="2006" <2006>
mailbox=2006
context=lrm
type=friend
host=dynamic
compensate=yes
hassip = yes
在配置拨号方案
vi extensions.conf
[lrm]
exten => _[1-6]XXX,1,Dial(SIP/${EXTEN})
exten => _[1-6]XXX,n,Hangup()
现在可以在安卓上安卓sip电话去互拨了
本文出自 “信不信由你” 博客,请务必保留此出处http://312461613.blog.51cto.com/965442/1197430