pjsip 搭建 sip服务器

来源:互联网 发布:java分割字符串 编辑:程序博客网 时间:2024/06/05 19:31


1、由于最新pjsip不支持高版本的ffmpeg,只能支持1.2.5以下的版本

ffmpeg 1.2.5的编译:

http://www.ffmpeg.org/release/ 

下载

./configure  --enable-shared --disable-static --enable-memalign-hack --enable-gpl --enable-libx264


2、pjsip库的编译:

下载pjsip库:

http://www.pjsip.org/download.htm

 ./configure --enable-epoll --enable-shared --enable-sound --enable-video --enable-speex-aec --enable-sdl --enable-ffmpeg --enable-v4l2 

make & make install 编译安装



3、安装MinisipServer linux版本 搭建VOIP服务器

http://www.myvoipapp.com/cn/docs/mss_services/linux/index.html

运行

在Linux桌面环境,例如Gnome/KDE/Unity,您仅需要点击miniSIPServer的链接图标即可运行和配置miniSIPServer,而且您可以看到界面与windows系统下的miniSIPServer是完全一致的。

如果不是在Linux桌面环境,我们可以运行miniSIPServer CLI(命令行)版本。请运行以下命令:

/opt/sipserver/msscli&

miniSIPServer CLI将打开TCP 8080端口并启动Web管理系统 (默认没有密码)。您可以使用浏览器,例如IE/FireFox/Chrome,访问该端口并配置miniSIPServer。


4、安装客户端:

使用3CX 客户端VOIP/SIP电话软件 6.0

http://xiazai.zol.com.cn/index.php?c=Detail_DetailMini&n=57fbcd7411b92e669&softid=330516

客户端3CX软件的设置: http://www.lxvoip.net/voip-beginner/3cx-setup.html

这个也很多,我使用的是3CX Phone Client。登录账户100.

3、在iPhone的pjsip界面中登录账户101:

+a Your SIP URL: (empty to cancel): sip:101@192.168.1.1 URL of the registrar: (empty to cancel): sip:192.168.1.1 Auth Realm: (empty to cancel): * Auth Username: (empty to cancel): 101 Auth Password: (empty to cancel): 123456

和100打电话:

+b Enter buddy's URI: (empty to cancel): sip:100@192.168.1.1 m Make call: 1

打电话操作还可以简化:

m Make call: sip:sip:100@192.168.1.1

这时,听到电话响声的你是不是感到很兴奋呢!



0 0