of course it can not work - you have to fix the contact of the INVITE
with fix nated contact - you also have to fix it ofor the 200 ok in a
reply route.
further, fix_nated sdp is usually not needed. force_rtp_proxy() is
usually sufficient. Make sure to call it only once. If this still does
corrupt the SDP then its is a bug.
Please create a config file with the wizard from
and study
how NAT traversal is done - this is the correct way.
regards
klaus
Fabian Borot schrieb:
I am trying to set up rtpproxy with kamailio and are
having these 2 issues:
1- the BYEs are not relayed to the other party, I have to hang up the
call at both ends
2- kamailio receives the INVITE from the calling party [behind a nat]
and relays it to the called party but the connection information in the
SDP has to IPs [the source IP and the RTPproxy IP together
c=IN IP4 204.9.239.6765.111.185.187
user 100 is behind a NAT and user 101 is not but I want to force the
RTPs to go thru the rtpproxy server [ in the same IP as kamailio]
the good and weird thing is that there is audio both ways.
this is my config file:
if (loose_route()) {
# mark routing logic in request
xlog("L_INFO","mylog: Loose Route section. Method:
[$rm].\n");
append_hf("P-hint: rr-enforced\r\n");
route(1);
};
if (uri==myself) {
if (method=="REGISTER") {
xlog("L_INFO","mylog: starting to process
REGISTER.Info: [$au].\n");
if (!www_authorize("", "subscriber")) {
xlog("L_INFO","mylog: REGISTER came
without auth, sending challenge.\n");
www_challenge("", "0");
exit;
};
if (nat_uac_test("1")){
xlog("L_INFO","mylog: REGISTER-Device
behind NAT.\n");
fix_nated_register();
}
force_rport();
save("location");
xlog("L_INFO","mylog: save-location
successful.\n");
exit;
} else if (method=="INVITE") {
xlog("L_INFO","mylog: Processing
INVITE.\n");
if (!proxy_authorize("","subscriber")) {
xlog("L_INFO","mylog: INVITE came
without auth, sending challenge.\n");
proxy_challenge("","0");
exit;
};
consume_credentials();
if (nat_uac_test("1")){
xlog("L_INFO","mylog: INVITE-Device
behind NAT.\n");
#fix_nated_contact();
fix_nated_sdp("10");
}
force_rtp_proxy();
if (!lookup("location")) {
sl_send_reply("404", "Not Found");
xlog("L_INFO","mylog: lookup-location
failed, sending 404 Not Found. Method: [$rm].\n");
exit;
};
append_hf("P-hint: usrloc applied\r\n");
};
};
route(1);
}
route[1] {
# send it out now; use stateful forwarding as it works reliably
# even for UDP2TCP
t_on_reply("1");
if (t_relay()) {
xlog("L_INFO","mylog: Route 1 section. Method
[$rm].");
} else {
sl_reply_error();
xlog("L_INFO","mylog: Route 1 section. T_Relay failed.
Method [$rm].");
};
exit;
}
onreply_route[1] {
force_rtp_proxy("","65.111.185.187");
}
thank you in advance
Fabian
------------------------------------------------------------------------
Stay up to date on your PC, the Web, and your mobile phone with Windows
Live Click here <http://clk.atdmt.com/MRT/go/119462413/direct/01/>
------------------------------------------------------------------------
_______________________________________________
Users mailing list
Users(a)lists.kamailio.org
http://lists.kamailio.org/cgi-bin/mailman/listinfo/users