route[NAT] {
xlog("L_INFO", "$rm: route[NAT]\n");
#!ifdef WITH_NAT
force_rport();
if (nat_uac_test("19") && $si!="MY_REAL_IP" && $si!="127.0.0.1") {
xlog("L_INFO", " Request from NAT'd UAC\n");
if (is_method("REGISTER")) {
fix_nated_register();
} else if (is_method("SUBSCRIBE")) {
add_contact_alias();
route(RECORD_ROUTE);
forward(127.0.0.1, MY_REAL_PORT);
exit;
} else {
fix_nated_contact();
}
setflag(FLT_NATS);
}
#!endif
return;
}
route[RECORD_ROUTE]The start of my route[RELAY]:
{
# remove preloaded route headers
remove_hf("Route");
if (is_method("INVITE|SUBSCRIBE"))
record_route();
return;
}
route[RELAY] {
xlog("L_INFO", "$rm: route[RELAY]\n");
#!ifdef WITH_NAT
if (check_route_param("nat=yes")) {
setbflag(FLB_NATB);
}
if (isflagset(FLT_NATS) || isbflagset(FLB_NATB)) {
route(RTPPROXY);
}
handle_ruri_alias();
#!endif
-- Peter Dunkley Technical Director Crocodile RCS Ltd |