I have 2.4.4 running on centos 5.5. Here are my notes for getting it working using mostly rpms.<div>Hope this helps you out and others too. If anyone wanted to put this in an official doc for installing mediaproxy, that would be cool or point me to where I could do that. :)<br>
<div><br></div><div>install stuff for opensips (plus some essential tools like vim and screen) install that some is also used for mediaproxy. This is from a centos minimal/barebones install point:</div><div><br></div><div>
<meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="font-family: Arial, Verdana, sans-serif; font-size: 13px; "><font face="'times new roman', serif" size="3">rpm -Uhv "<a href="http://yum.pgsqlrpms.org/reporpms/8.4/pgdg-centos-8.4-2.noarch.rpm">http://yum.pgsqlrpms.org/reporpms/8.4/pgdg-centos-8.4-2.noarch.rpm</a>"</font></span></div>
<div><span class="Apple-style-span" style="font-family: Arial, Verdana, sans-serif; font-size: 13px; "><font face="'times new roman', serif" size="3"># had to use wget because rpm couldn't pull the url for some reason, probably a redirection.<br>
wget "<a href="http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm">http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm</a>"<br>rpm -Uhv rpmforge-release-*.rpm</font><div>
<font face="'times new roman', serif" size="3">rpm -Uhv "<a href="http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm">http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm</a>"<br>
<span>yum install -y </span>yum-fastestmirror yum-priorities vim-enhanced man rsyslog wget screen </font></div></span></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="font-family: Arial, Verdana, sans-serif; font-size: medium; "><font face="'times new roman', serif">yum install -y vixie-cron monit rsyslog logrotate rsync tcpdump wireshark ngrep patch postgresql-server mysql-devel postgresql-devel bison lynx flex openssl-devel libxslt subversion make gcc wget vim-enhanced screen which </font></span><span class="Apple-style-span" style="font-family: Arial, Verdana, sans-serif; font-size: medium; "><span style="font-family: 'times new roman', serif; ">libxml2-devel pcre-devel db4-devel net-snmp-devel expat-devel libmemcache-devel </span></span><span class="Apple-style-span" style="font-family: Arial, Verdana, sans-serif; font-size: medium; "><span style="font-family: 'times new roman', serif; ">mysql-server mysql</span></span><br>
<meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="font-family: 'times new roman', serif; font-size: medium; "><div>sed -r -i '/^\[/apriority = 20' /etc/yum.repos.d/epel* </div>
<div>sed -r -i '/^\[/apriority = 30' /etc/yum.repos.d/rpmforge.repo</div><div>sed -r -i '/^\[/apriority = 10' /etc/yum.repos.d/CentOS-*</div><div>sed -r -i '/^\[/apriority = 5' /etc/yum.repos.d/pgdg-84-centos.repo</div>
<div><br></div></span></div><div>Mediproxy install:</div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="font-family: Arial, Verdana, sans-serif; font-size: 13px; ">put this together primarily using the links below<br>
<a href="http://voiprookie.blogspot.com/2009/04/blog-post.html" style="color: rgb(78, 125, 191); ">http://voiprookie.blogspot.com/2009/04/blog-post.html</a><br><a href="http://www.google.com/url?q=http%3A%2F%2Fwww.smartvox.co.uk%2Fserfaq_install_mediaproxy2.htm&sa=D&sntz=1&usg=AFrqEzf1fhZRLKRLKJ4P-SXFadnpG0NJog" style="color: rgb(78, 125, 191); ">http://www.smartvox.co.uk/serfaq_install_mediaproxy2.htm</a><br>
</span></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="font-family: Arial, Verdana, sans-serif; font-size: 13px; "><h4>CentOS 5.5 install prerequisites:</h4>
<div>NOTES:</div><div> DO NOT install twisted or gnutls stuff with yum!! remove if rpm is installed installed. ( rpm -qa | grep -E "twisted|gnutls" )</div><div> Some newer versions of source packages below may not work because of conflicts with CentOS versions of stuff like the kernel.</div>
<div><div><div><br></div><div>yum install libnetfilter_conntrack libnetfilter_conntrack-devel python-dns python-ctypes pyOpenSSL python-application python-cjson python-devel python-sqlobject python-zope-interface</div><div>
<br></div><div>wget "<a href="ftp://ftp.gnupg.ca/gnutls/gnutls-2.4.2.tar.bz2">ftp://ftp.gnupg.ca/gnutls/gnutls-2.4.2.tar.bz2</a>"</div><div>tar -xjf gnutls-2.4.2.tar.bz2</div><div>cd gnutls-2.4.2</div><div>##./configure --with-included-libtasn1 --libdir=/usr/local/lib64</div>
<div>./configure --with-included-libtasn1 --libdir=/usr/lib64</div><div>make</div><div>make install</div><div>cd /usr/local/lib64/</div><div>##for i in libgnutls.so.26 libgnutls.so.26.4.6 libgnutls-extra.so.26 libgnutls-extra.so.26.4.6 libgnutls-openssl.so.26 libgnutls-openssl.so.26.4.6 ; do cp -v $i /usr/lib64/ ; done </div>
<div>cd /usr/local/src/</div><div>wget "<a href="http://pypi.python.org/packages/source/p/python-gnutls/python-gnutls-1.1.9.tar.gz#md5=bdd81a9dd3c2f87393cd6c014bf6885b">http://pypi.python.org/packages/source/p/python-gnutls/python-gnutls-1.1.9.tar.gz#md5=bdd81a9dd3c2f87393cd6c014bf6885b</a>"</div>
<div>tar -xzf python-gnutls-1.1.9.tar.gz</div><div>cd python-gnutls-1.1.9</div><div>./setup.py build</div><div>./setup.py install</div><div>cd ..</div><div>wget "<a href="http://tmrc.mit.edu/mirror/twisted/Twisted/8.1/Twisted-8.1.0.tar.bz2">http://tmrc.mit.edu/mirror/twisted/Twisted/8.1/Twisted-8.1.0.tar.bz2</a>"</div>
<div>tar -xjf Twisted-8.1.0.tar.bz2</div><div>cd Twisted-8.1.0</div><div><div>./setup.py build</div><div>./setup.py install</div></div></div></div><div><br></div></span></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="font-family: Arial, Verdana, sans-serif; font-size: 13px; "><div>
<div><h4>setup mediaproxy</h4><div>wget "<a href="http://download.ag-projects.com/MediaProxy/mediaproxy-2.4.3.tar.gz">http://download.ag-projects.com/MediaProxy/mediaproxy-2.4.3.tar.gz</a>"</div><div>tar -xzf mediaproxy-2.4.3.tar.gz</div>
<div>mv mediaproxy-2.4.3 /opt/mediaproxy</div><div>cd /opt/mediaproxy</div><div>./build_inplace</div><div>./media-relay --no-fork</div><div>lsmod</div><div>/etc/init.d/iptables status </div><div>/etc/init.d/iptables start</div>
<div>/etc/init.d/iptables status </div><div>modprobe ip_tables</div><div>lsmod</div><div>./media-relay --no-fork</div><div>./media-dispatcher --no-fork</div></div></div><div><br></div><div>sysctl -w net.ipv4.ip_forward=1<br>
sed -i -r 's/^.*\<net.ipv4.ip_forward[[:space:]]*=[[:space:]][01]/net.ipv4.ip_forward = 1/' /etc/sysctl.conf<br><span style="color: rgb(0, 0, 153); ">mkdir -p /var/run/mediaproxy</span> <span style="color: rgb(0, 0, 153); ">/etc/mediaproxy/tls</span><br>
<span style="color: rgb(0, 0, 153); ">cp config.ini.sample /etc/mediaproxy/config.ini</span><br><span style="color: rgb(0, 0, 153); ">cp tls/* /etc/mediaproxy/tls/</span><br><br>important stuff in /etc/mediaproxy/config.ini<br>
[Relay]<br>dispatchers = <match listen value from dispatcher section><br>relay_ip = <ip of relay host that media will proxy through><br>port_range = 20000:60000<br>log_level = ERROR<br>; log_level options ( DEBUG, INFO, WARNING, ERROR and CRITICAL)<br>
[Dispatcher]<br>socket_path = /var/run/mediaproxy-dispatcher.sock<br>management_use_tls = no<br>listen = <same ip as opensips>:5500<br>log_level = ERROR<br>; log_level options (DEBUG, INFO, WARNING, ERROR and CRITICAL)<br>
[OpenSIPS]<br>socket_path = /tmp/opensips_fifo<br>max_connections = 10<br></div><h4><a name="TOC-Opensips.cfg-Stuff" style="color: rgb(78, 125, 191); "></a>Opensips.cfg Stuff</h4>opensips modules to load in opensips.cfg:<br>
loadmodule "dialog.so" # requred for mediaproxy_engage and kill of (dead calls)<br>loadmodule "mediaproxy.so" # if using mediaproxy_engage it is the only mediaproxy function used in the script and only for initial INVITE.<br>
loadmodule "mi_datagram.so" # required for mediaproxy to tell opensips to end a call that rtp has timed out for (dead calls).<br>loadmodule "nathelper.so" # needed to fix sdp origin header to hide topoloty that media doesn't fix but should. -eg- fix_nated_sdp("8","208.76.155.250"); # with ip of rtp relay, can be var. use in invite and replies with sdp - detect sdp with if ( $cl > 0 )<br>
<br>params:<br>modparam("mi_datagram", "socket_name", "/tmp/opensips.sock")<br>modparam("mi_datagram", "children_count", 4)<br>modparam("dialog", "dlg_flag", 13)<br>
# db_mode: 0 - NO_DB, 1 - REALTIME, 2 - DELAYED, 3 - ON SHUTDOWN<br>modparam("dialog", "db_mode", 3)<br>modparam("dialog", "db_url","postgres://opensips:passwd@localhost/opensips")<br>
modparam("mediaproxy", "mediaproxy_socket", "/var/run/mediaproxy-dispatcher.sock")<br>modparam("mediaproxy", "mediaproxy_timeout", 500)<br>modparam("mediaproxy", "signaling_ip_avp", "$avp(s:nat_ip)")<br>
modparam("mediaproxy", "media_relay_avp", "$avp(s:media_relay)")<br><br><br><span style="font-weight: bold; ">System performance tuning</span><br>cat /proc/interrupts | grep eth<br><br>echo 0200 > /proc/irq/<irq from above cmd>/smp_affinity<br>
each char represents a cpu. each core is represented by a bit ( 1, 2, 4, 8 )<br><br>seems to be best to keep on different cores but same cpu (not cpu 0, first cpu)<br><br>taskset -pc "8" `cat /var/run/mediaproxy-relay.pid`<br>
<br>actually should all be part of mediaproxy-relay init file so affinity is set before media proxy is run and <br>mediaproxy-relay started:<br>taskset -c "<core number 0-16>" <command that actually runs the relay><br>
the core number can be a comma separated list or range: "0,5,7,9-11"<br>though it seems to work better set to a single core</span></div><div><font class="Apple-style-span" face="Arial, Verdana, sans-serif"><br>
</font></div>
<div><font class="Apple-style-span" face="Arial, Verdana, sans-serif"><br></font></div><div><font class="Apple-style-span" face="Arial, Verdana, sans-serif"><br></font><div class="gmail_quote">On Tue, Jan 25, 2011 at 7:51 AM, Saúl Ibarra Corretgé <span dir="ltr"><<a href="mailto:saul@ag-projects.com">saul@ag-projects.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Ok, I'll check. Is the 2.4.4 version from the repository considered the<br>
latest, or do I need to build something specific?<br>
<br>
</blockquote>
<br></div>
Yes, that's the latest.<div><div></div><div class="h5"><br>
<br>
-- <br>
Saúl Ibarra Corretgé<br>
AG Projects<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</div></div></blockquote></div><br></div></div>