opensips-1.8.3在RHEL5.5的搭建过程

wget http://opensips.org/pub/opensips/1.8.3/src/opensips-1.8.3_src.tar.gz
tar -xzvf opensips-1.8.3_src.tar.gz 
cd opensips-1.8.3-tls/
make menuconfig

spacer.gifwKioL1XLLo7jy3NUAACPX9QueBM782.jpg

wKioL1XLLvTg692KAABweh8sFiw273.jpg

wKiom1XLLPGDMyCdAADbjobNo20396.jpgwKioL1XLLvTy-LfjAAB6mXCCxxw219.jpgwKiom1XLLPGiZN3pAABuLne-hBc464.jpg

选择红色部分,然后会编译安装,opensips

安装过程有可能会报错,不过都是因为缺少一些库导致的,用163yum安装即可,例如我安装了bison,flex,ncurses-devel,ncurses

安装完成后查下

whereis opensips
opensips: /usr/local/sbin/opensips /usr/local/etc/opensips /usr/local/lib/opensips
vim /usr/local/etc/opensips/opensipsctlrc
 SIP_DOMAIN=your ip
 DBENGINE=MYSQL
 DBHOST=localhost
 DBNAME=opensips
 DB_PATH="/usr/local/etc/opensips/dbtext"
 DBRWUSER=opensips
 DBRWPW="opensipsrw"
 DBROOTUSER="root"
 USERCOL="username"
 /usr/local/sbin/opensipsdbctl create

/usr/local/sbin/opensipsdbctl create 

  如果出现以下错误

    “ERROR: could not load the script in /usr/local/lib/opensips/opensipsctl/opensipsdbctl.mysql for database engine MYSQL
     ERROR: database engine not loaded - tried 'MYSQL'”

     则,

     cd /usr/local/lib/opensips/opensipsctl/

     cp $(你的opensips目录)/scrips/opensipsdbctrl.mysql  ./

     mkdir mysql

     cp  $(你的opensips目录)/scrips/mysql/*.sql ./

成功后,会有两个选项,全选y

/usr/local/sbin/opensipsctl -c

 /usr/local/sbin/opensipsctl start

添加sip用户 :opensipsctl add username password  

opensipsctl add 8000 1234

opensipsctl add 8001 1234

opensipsctl add 8002 1234

用csipsipmle和eyebeam测试

wKiom1XLLj-ykO8HAAJw0sAhys4677.jpgwKioL1XLMEPyBh_vAAEe3ZKkTC0342.jpg

察看注册的sip用户

opensipsctl ul show

wKiom1XLLkDC8OTRAADH3h2cImI294.jpg

wKiom1XLLkCCggRpAADgw85ZSF0802.jpg

是否在线

opensipsctl online

8000

8001

8002

拨打电话

wKioL1XLMESj9edMAAEnca5qTB4471.jpgwKiom1XLLkKCSukfAAEa7gU6EKA650.jpg

wKioL1XLMEXQbOJEAAGnth10ghc941.jpg


你可能感兴趣的:(voip,opensip)