[SR-Users] Minimal configuration without database support

Eugene Prokopiev enp at itx.ru
Tue Aug 26 12:31:19 CEST 2014


Now I need to hide local topology: rewrite public ip addresses in
sip/sdp headers with internal kamailio address (10.10.10.7) for
incoming requests, rewrite internal softswitch address with public
kamailio ip address (10.7.7.7) and forward rtp packets. So, I have
rtpproxy running:

$ ps aux | grep rtpproxy
rtpproxy 12568 97.8  0.0  98588   988 ?        Ssl  13:57  14:02
/usr/bin/rtpproxy -p /var/run/rtpproxy.pid -u rtpproxy -F -s
udp:127.0.0.1 22222 -l 10.7.7.7 10.10.10.7 -d DBUG LOG_LOCAL0 -u
rtpproxy

My kamailio configuration looks like:

loadmodule "mi_fifo.so"
loadmodule "kex.so"
loadmodule "tm.so"
loadmodule "sl.so"
loadmodule "pv.so"
loadmodule "nathelper.so"
loadmodule "rtpproxy.so"

modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")

modparam("nathelper", "received_avp", "$avp(RECEIVED)")

modparam("rtpproxy", "rtpproxy_sock", "udp:127.0.0.1:22222")

route {
  force_rport();
  if (nat_uac_test("19")) {
    if (method=="REGISTER") {
      fix_nated_register();
    } else {
      fix_nated_contact();
    }
  }
  rtpproxy_manage("cwei");
  $du = "sip:10.10.10.50:5060;transport=udp";
  forward();
}

onreply_route {
  rtpproxy_manage("cwie");
  fix_nated_contact();
  return(1);
}

I see additional Via header with internal kamailio address in
forwarded REGISTER, but all other headers contains public ip
addresses.

What is wrong in my configuration and how to fix it?

-- 
WBR,
Eugene Prokopiev



More information about the sr-users mailing list