opensip rtpproxy - housekeeper-software/tech GitHub Wiki
rtpproxy
从源码编译安装
git clone -b master https://github.com/sippy/rtpproxy.git
git -C rtpproxy submodule update --init --recursive
cd rtpproxy
./configure
make clean all
make install
创建服务
[Unit]
Description=A symmetric RTP proxy
After=network.target
[Service]
Type=simple
Environment='OPTIONS= -A 106.15.55.22 -l 0.0.0.0 -s udp:192.168.2.158:7890 -m 50000 -M 60000 -F -d ERR:LOG_LOCAL3'
PIDFile=/run/rtpproxy/rtpproxy.pid
Restart=always
RestartSec=5
ExecStartPre=-/bin/mkdir /run/rtpproxy
#ExecStartPre=-/bin/chown rtpproxy:rtpproxy /run/rtpproxy
ExecStart=/usr/local/bin/rtpproxy -p /run/rtpproxy/rtpproxy.pid $OPTIONS
ExecStop=/usr/bin/pkill -F /run/rtpproxy/rtpproxy.pid
ExecStopPost=-/bin/rm -R /run/rtpproxy
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=rtpproxy
SyslogFacility=local5
TimeoutStartSec=10
TimeoutStopSec=10
[Install]
WantedBy=multi-user.target
其他
将上述内容保存为 rtpproxy.service
chmod 644 rtpproxy.service
cp rtpproxy.service /etc/systemd/system
systemctl daemon-reload
systemctl enable rtpproxy
systemctl start rtpproxy
服务启动失败怎么办
服务启动之后,ps -ef | grep rtpproxy
如果没有进程,则说明服务启动失败,此刻
systemctl status rtpproxy
如果显示有错误,则可能没找到 libelperiodic
可以将 /usr/local/lib下的 libelperiodic.so libelperiodic.so.1 libelperiodic.so.1.0.0
复制到 /usr/lib目录下,执行systemctl start rtpproxy 即可正常
systemd-analyze verify rtpproxy
看看输出什么问题
具体可看:
https://www.rtpproxy.org/doc/master/user_manual.html
https://github.com/lmangani/docker-hepswitch/blob/master/conf/opensips-rtpengine.cfg https://github.com/baron2050/doc/blob/1b185b455a73bb04c40974c2e30562542f5cd8c4/blog/source/_posts/OPENSIPS%E7%9B%B8%E5%85%B3%E6%A8%A1%E5%9D%97.md?plain=1#L138
https://www.cnblogs.com/zhangxianrong/p/14446874.html https://git.webitel.com/projects/WEP/repos/opensips/raw/opensips.cfg?at=refs%2Fheads%2Fmaster