[Serusers] nathelper / rtpproxy

Nhadie nhadie at tbgi.net.ph
Thu Jan 25 12:29:39 CET 2007


Hi All,

Can i use nathelper/rtpproxy on extension to extension and not use when an
extension calls PSTN? Please see config if it makes sense. Thank You

if (nat_uac_test("3")) {

if (method == "REGISTER" || ! search("^Record-Route:")) {
log("LOG: Someone trying to register from private IP, rewritingn");


fix_nated_contact(); # Rewrite contact with source IP of signalling
if (method == "INVITE") {
fix_nated_sdp("1");  # Add direction=active to SDP
};
force_rport();  # Add rport parameter to topmost Via
setflag(6);     # Mark as NATed

};
};




if ((uri=~"^(sip:)?00[0-9]*@([a-z]+.)?mydomain.com") ||
(uri=~"^(sip:)?00[0-9]*@2.2.2.2")) {

if  (is_user_in("From", "onstun")) {
if (isflagset(8)) {xlog("L_INFO", "THIS GROUP SHOULD NOT USE RTPPROXYn");};
# Strip first to digits (00)
strip(2);
prefix("37333#");
rewritehostport("10.10.10.10:5060");
consume_credentials();
t_relay_to_udp("10.10.10.10","5060");
break;
} else {
if (isflagset(8)) {xlog("L_INFO", "THIS WILL USE RTPPROXYn");};

if (isflagset(6)) route(1); <----- WILL CHECK SET FLAG 6 so that it will USE
NATHELPER/RTPPROXY WILL THIS WORK?

strip(2);
prefix("37333#");
rewritehostport("10.10.10.10:5060");
consume_credentials();
t_relay_to_udp("10.10.10.10","5060");
break;
}





route[1] {

xlog("L_INFO", "User-Agent behind NATn");
force_rtp_proxy();
if (method=="INVITE") {
t_on_reply("1");
};
append_hf("P-Behind-NAT: Yesrn");
break;
}




________________________________________________
Message sent using UebiMiau 2.7




More information about the sr-users mailing list