Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>If you use RTPProxy, you would need one RTPProxy server per IP address. You can specify the IP to listen on with the '-l' parameter:</p> <pre><code># /usr/sbin/rtpproxy -l 10.10.10.10 -s unix:/var/run/rtpproxy/rtpproxy1.sock -u rtpproxy rtpproxy -p /var/run/rtpproxy/rtpproxy1.pid &amp; # /usr/sbin/rtpproxy -l 10.10.10.11 -s unix:/var/run/rtpproxy/rtpproxy2.sock -u rtpproxy rtpproxy -p /var/run/rtpproxy/rtpproxy2.pid &amp; </code></pre> <p>You would need to match that up with independant opensips/openser/kamailio instances:</p> <pre><code>listen=udp:10.10.10.10:5060 ... loadmodule "rtpproxy.so" modparam("rtpproxy", "rtpproxy_sock", "unix:/var/run/rtpproxy/rtpproxy1.sock") ... unforce_rtp_proxy(); ... force_rtp_proxy(); </code></pre> <p>and</p> <pre><code>listen=udp:10.10.10.11:5060 ... loadmodule "rtpproxy.so" modparam("rtpproxy", "rtpproxy_sock", "unix:/var/run/rtpproxy/rtpproxy2.sock") ... unforce_rtp_proxy(); ... force_rtp_proxy(); </code></pre> <p>If you have some experience with C, you could conceivably modify the rtpproxy module to be aware of multiple rtpproxy instances.</p> <p>Also, if the thought of relaying RTP through userspace bothers you, MediaProxy is an alternative.</p> <p>Rather than a userspace daemon relaying the RTP traffic, your openser/opensips/kamailio tells a python MediaDispatcher through a JSON web post to contact an available MediaRelay to setup a linux kernel level conntrack traffic forwarding entry. </p> <p>The downside to this approach is that the current python media-dispatcher and media-relay read /etc/mediaproxy/config.ini - you would need to hack the python to take a configuration parameter so you could conceivably have multiple config.ini files, one for each instance to setup the correct redirect.</p> <p>An example /etc/mediaproxy/config.ini might look like:</p> <pre><code>[Relay] dispatchers = 10.10.10.10:25060 [Dispatcher] socket_path = /var/run/mediaproxy/dispatcher.sock listen = 10.10.10.10:25060 listen_management = 10.10.10.10:25061 [OpenSIPS] socket_path = '/var/run/opensips/socket' </code></pre> <p>And in your opensips config file:</p> <pre><code>modparam("mi_datagram", "socket_name", "/var/run/opensips/socket") ... loadmodule "mediaproxy.so" # ----- mediaproxy params ----- modparam("mediaproxy", "mediaproxy_socket", "/var/run/mediaproxy/dispatcher.sock") #modparam("mediaproxy", "disable", 1) #modparam("mediaproxy", "natping_interval", 60) ... engage_media_proxy(); ... end_media_session(); </code></pre> <p>It sounds like you may have better luck with rtpproxy for your particular needs.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload