Note that there are some explanatory texts on larger screens.

plurals
  1. PORTP Proxying with OpenSIPS/Kamailio/OpenSER
    primarykey
    data
    text
    <p>I have an OpenSIPS server which listens on multiple IPs. If I route the calls back out to the next point, I want to ensure all signalling and media come from the IP the call originally landed on (I don't want the caller and callee to know each other's IP addresses).</p> <p>I believe what I need for this something like RTPProxy.</p> <p>My question is do I need one RTPProxy server per IP address, or can I route multiple IPs through a single server? Is there a better solution?</p> <p>I'm going to try this myself, but I'm struggling to get the RTPProxy server running correctly (my ignorance rather than necessarily any issues with RTPProxy). I asked ahead of time just to see if anyone knew if I was wasting my time setting it up or not.</p> <p>[UPDATE]</p> <p>For anyone interested, this is how I got it working, though I'm not sure I want to run with this as the final solution. Needs more testing. For 2 IPs, with topology hiding and RTP proxying. Along with the answer below, I hope it helps someone.</p> <p>Load the rtpproxy processes -</p> <pre><code>rtpproxy -l _your_public_ip_1_ -s udp:localhost:7722 rtpproxy -l _your_public_ip_2_ -s udp:localhost:7723 </code></pre> <p>Then mod the kamailio.cfg file -</p> <pre><code>loadmodule "/usr/local/lib64/kamailio/modules/topoh.so" modparam("topoh", "mask_key", "Your_key_here") modparam("topoh", "mask_ip", "10.0.0.1") </code></pre> <p>The next bit creates two groups for RTP proxy - 1 &amp; 2 -</p> <pre><code>#!ifdef WITH_NAT # ----- rtpproxy params ----- modparam("rtpproxy", "rtpproxy_sock", "1 == udp:127.0.0.1:7722") modparam("rtpproxy", "rtpproxy_sock", "2 == udp:127.0.0.1:7723") </code></pre> <p>then in the NAT section of the standard (shipped) config, you select which group to use in the proxying based on the IP the inbound call landed on. rtp_proxy_manage is a very high level version of the force_ and unforce_ commands. Basically it just fires up and does everything for you -</p> <pre><code>route[NATMANAGE] { #!ifdef WITH_NAT .... if($Ri=="X.X.X.1") set_rtp_proxy_set("1"); if($Ri=="X.X.X.2") set_rtp_proxy_set("2"); rtpproxy_manage("",$Ri); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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