Learning OpenSips

CentOS7中安装:

 

安装依赖:
 

yum -y install gcc make
yum -y install ncurses ncurses-devel bison flex lynx

git clone https://github.com/redis/hiredis.git
make & make install

mysql安装:https://blog.csdn.net/chunzhenzyd/article/details/87008612

 

下载安装:
 

git clone -b 2.4 https://github.com/OpenSIPS/opensips.git opensips_2_4

cd opensips_2_4/

make menuconfig (添加编译组件redis,mysql)

https://mp.weixin.qq.com/s?__biz=MzI1NjY1ODQ0OQ==&mid=2247483672&idx=1&sn=4ba52c38910711d2d01597b23946f118&chksm=ea221c66dd5595700a5fc2ab37faf5b2b69b77e626a0fd1b3f9cb2df1966acddb7ff489be88f&scene=21#wechat_redirect

 

修改配置:

[/usr/local/etc/opensips/opensips.cfg]

 

[/usr/local/etc/opensips/opensipsctlrc]

SIP_DOMAIN=192.168.17.53

Learning OpenSips_第1张图片

NOTICE: 如果密码不为opensipsrw,那么配置文件中也需要改动密码。

由于使用的是mysql8,所以脚本里需要改动:

[/usr/local/lib64/opensips/opensipsctl/opensipsdbctl.mysql]

    if [ "$DBROOTUSER" != "$DBRWUSER" ] ; then
    sql_query "" "
        CREATE USER '$DBRWUSER'@'%' IDENTIFIED BY '$DBRWPW';
        GRANT ALL PRIVILEGES ON $1.* TO '$DBRWUSER'@'%';
        ALTER user '$DBRWUSER'@'%' IDENTIFIED WITH mysql_native_password BY '$DBRWPW';
    "
    fi
    
    # GRANT ALL PRIVILEGES ON $1.* TO '$DBRWUSER' IDENTIFIED  BY '$DBRWPW';
    # GRANT ALL PRIVILEGES ON $1.* TO '${DBRWUSER}'@'$DBHOST' IDENTIFIED BY '$DBRWPW';

即将mysql5 GRANT语句改成mysql8 语句

创建数据库:

opensipsdbctl create

运行:

opensipsctl start

客户端

Linphone: http://www.linphone.org/

 

你可能感兴趣的:(OpenSips,Sip)