Hi Users...
The UAC's behind the NAT is hung up the softphones.. Automatically...
I think Ack is Losting .. So the Session is Looses..
here ...... in this :----> nat_uac_test(paramter)
what parameters should placed
here.... 3 or 10 or 1
Same fo fix_naed_sdp()..
--------------------------- opense,cfg....
route {
route(2);
if(!method=='ReGISTER') {
record_route();
};
if(uri==myself)
{
.....
......
....
}
route(1);
}
route[1] {
log("Testing-------> route[1] \n");
if (subst_uri('/(sip:.*);nat=yes/\1/')){
setflag(6);
};
if (isflagset(5)||isflagset(6)) {
route(3);
}
if (!t_relay()) {
sl_reply_error();
};
exit;
}
route[2]{
log("Testing-------> route[2] \n");
# force_rport();
if (nat_uac_test("19")) {
log("Testing-------> nat_uac-test_19\n");
if (method=="REGISTER") {
log("Testing-------> nat _ reg \n");
fix_nated_contact();
} else if (method=="INVITE") {
log("Testing-------> nat_cantact \n");
fix_nated_sdp("1");
# fix_nated_contact();
};
force_rport();
setflag(5);
};
}
route[3] {
log("Testing-------> route 3 \n");
if (is_method("BYE|CANCEL")) {
log("Testing-------> Bye\n");
acc_db_request("Stop","acc");
unforce_rtp_proxy();
} else if (is_method("INVITE")){
log("Testing-------> Invite in route [3\n");
# fix_nated_sdp("3");
acc_db_request("Start","acc");
force_rtp_proxy();
t_on_failure("1");
} else if(is_method("ACK")) {
log("Testing-------------------> ACK\n");
force_rtp_proxy();
};
if (isflagset(5))
{
# fix_nated_sdp("3");
search_append('Contact:.*sip:[^>[:cntrl:]]*',
';nat=yes');
};
t_on_reply("1");
}
failure_route[1] {
if (isflagset(6) || isflagset(5)) {
acc_db_request("Stop","acc");
unforce_rtp_proxy();
}
}
onreply_route[1] {
log("Testing-------> t_on_reply\n");
if ((isflagset(5) || isflagset(6)) &&
status=~"(183)|(2[0-9][0-9])"
&& (!search("^Content-Length:\ 0"))) {
log("Testing ---> 183 200 \n");
force_rtp_proxy();
}
search_append('Contact:.*sip:[^>[:cntrl:]]*', ';nat=yes');
# if (isflagset(6)) {
## fix_nated_sdp("1");
# fix_nated_contact();
# }
exit;
}
--
Thanks and Regards with cheers
Sunkara Ravi Prakash (Voip Developer)
Hyperion Technology
www.hyperion-tech.com