rtpproxy in bridge mode.
And route[NATMANAGE] from Asipto tutorial (
http://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb) changed for my needs :
# RTPProxy control
route[NATMANAGE] {
#!ifdef WITH_NAT
if (is_request()) {
if(has_totag()) {
if(check_route_param("nat=yes")) {
setbflag(FLB_NATB);
}
}
}
if (!(isflagset(FLT_NATS) || isbflagset(FLB_NATB)))
return;
if((src_ip==ASTERISK_LAN1) || (src_ip==ASTERISK_LAN2))
{
rtpproxy_manage("cwei");
} else {
rtpproxy_manage("cwie");
}
if (is_request()) {
if (!has_totag()) {
add_rr_param(";nat=yes");
}
}
if (is_reply()) {
if(isbflagset(FLB_NATB)) {
fix_nated_contact();
}
}
#!endif
return;
}
Tested and worked on both tested Asterisk (LAN1 and LAN2). Kamailio just one - in the LAN1.