用freeswitch架设局域网内sip电话

FreeSWITCH 是一个电话的软交换解决方案,包括一个软电话和软交换机用以提供语音和聊天的产品驱动。FreeSWITCH 能够用做交换机引擎、PBX、多媒体网关以及多媒体服务器等。linux

首先保证已经有libjpeg-devel,libtoo,libncurses5,libncurses5-devgit

git clone git://git.freeswitch.org/freeswitch.git  
cd freeswitch  
./bootstrap.sh

若是要测试IVR的话,须要修改modules.conf,找到mod_flite的行,把它的注释去掉

 ./configure
make
make install

而后须要安装语音文件
sounds-install moh-install (8 kHz)
hd-sounds-install hd-moh-install (16 kHz)
uhd-sounds-install uhd-moh-install (32 kHz)
cd-sounds-install cd-moh-install (48 kHz)
选一个,8 kHz是普通电话的音质,越高越好
make sounds-install moh-install

下载安装完后就算完成了
运行/usr/local/freeswitch/bin/freeswitch开启服务器,要关闭的话,运行shutdown
加参数 -nc 能够在后台运行,fs-cli能够链接到服务器,freeswitch -stop关闭

服务器已经运行起来,能够装sip电话软件来测试,windows下能够用x-lite,linux下能够ekiga或者linphone
默认配置了1000-1019 20个帐户,密码都是1234

若是在服务器上安装的电话软件,会出现5060端口冲突,须要修改电话软件的监听端口
linphone在preferences,Network settings,ports里把5060改为别的,好比5072
而后注册账号,在Manage SIP Account,Proxy accounts,add
your sip identity: sip:1000@192.168.1.x
sip proxy address: sip:1000@192.168.1.x:5060
按肯定后会出现一个输入密码的框,输入1234,就注册成功了

ekiga的话,须要用gconfig-editor,在apps,ekiga,protocols,sip,把listen-port改为其余,好比5082
而后在ekiga的菜单,编辑,帐户,增长一个sip帐户
姓名1001,注册商192.168.1.x:5060,用户1001,已验证用户1001,密码1234,注册成功

如今两个电话均可以用了,试试拨打9664或者sip:9664@192.168.1.x,听听系统音
也能够两个互相打电话bootstrap

相关文章
相关标签/搜索