因为工作中需要使用到opensips+mediaproxy,这边就介绍下CentOS5.11下面安装mediaproxy2.4.4.
yum -y install gcc gcc-c++ libgpg-error-devel python-devel libgcrypt-devel python-setuptools rpm -ivh libnfnetlink-0.0.40-1.el5.rf.x86_64.rpm rpm -ivh libnfnetlink-devel-0.0.40-1.el5.rf.x86_64.rpm rpm -ivh libnetfilter_conntrack-0.0.97-1.el5.rf.x86_64.rpm rpm -ivh libnetfilter_conntrack-devel-0.0.97-1.el5.rf.x86_64.rpm tar jxf gnutls-2.4.2.tar.bz2 cd gnutls-2.4.2 ./configure --with-included-libtasn1 --libdir=/usr/local/lib64/ make make install ln -s /usr/local/lib64/libgnutl* /usr/lib64/ ln -s /usr/lib64/libgcrypt.11 /usr/lib64/libgcrypt.11.2.2 ln -s /usr/lib64/libgcrypt.11 /usr/lib64/libgcrypt.11.2.3 cd tar zxf ctypes-1.0.2.tar.gz cd ctypes-1.0.2 ./setup.py build ./setup.py install cd tar zxf python-application-1.1.5.tar.gz cd python-application-1.1.5 ./setup.py build ./setup.py install cd tar zxf python-cjson-1.0.5.tar.gz cd python-cjson-1.0.5 ./setup.py build ./setup.py install cd tar zxf python-gnutls-1.1.9.tar.gz cd python-gnutls-1.1.9 ./setup.py build ./setup.py install cd rpm -ivh python-zopeinterface-3.3.0-114.2.x86_64.rpm tar jxf Twisted-8.1.0.tar.bz2 cd Twisted-8.1.0 ./setup.py build ./setup.py install cd tar zxf mediaproxy-2.4.4.tar.gz cd mediaproxy-2.4.4 ./setup.py build ./setup.py install cd mkdir /etc/mediaproxy mkdir -p /var/run/opensips/ mkdir -p /var/run/mediaproxy cp /root/mediaproxy-2.4.4/config.ini.sample /etc/mediaproxy/config.ini cp -rf /root/mediaproxy-2.4.4/tls/ /etc/mediaproxy/ 开启ip_forward sed -i ‘s#net.ipv4.ip_forward = 0#net.ipv4.ip_forward = 1#g‘ /etc/sysctl.conf sysctl -p config.ini [Relay] dispatchers = 192.168.88.245 passport = None relay_ip = 192.168.88.245 port_range = 50000:60000 log_level = DEBUG on_hold_timeout = 1800 [Dispatcher] socket_path = dispatcher.sock listen = 192.168.88.245 listen_management = 192.168.88.245 management_use_tls = no passport = None management_passport = None log_level = DEBUG [TLS] [Database] [Radius] [OpenSIPS] socket_path = /var/run/opensips/socket max_connections = 10
在opensips的配置文件opensips.cfg的route上面增加
loadmodule "mediaproxy.so" modparam("mediaproxy", "disable", 0) modparam("mediaproxy", "mediaproxy_socket", "/var/run/mediaproxy/dispatcher.sock") modparam("mediaproxy", "mediaproxy_timeout", 1000) modparam("mediaproxy", "signaling_ip_avp", "$avp(nat_ip)") modparam("mediaproxy", "media_relay_avp", "$avp(media_relay)") modparam("mediaproxy", "ice_candidate", "low-priority")
所需软件地址:http://down.51cto.com/data/2048260
本文出自 “枫林晚” 博客,请务必保留此出处http://fengwan.blog.51cto.com/508652/1652807
原文地址:http://fengwan.blog.51cto.com/508652/1652807