Hi Users,
I install the openser 1.0.1 and rtp proxy 0.3 in same Linux System
openser server is located with public id xx.xxx.xxx.xx of 192.168.2.2 ,
And UAC are outside the NAT,
When one UAC call to other UAC( are both in outside the NAT where openser
server), after the INVITE method get request by server, after 32 second its
hung up automatically, Voice is ok , and callee is hung upping, not caller,
UAC ( inside the nAT , openser server ) in not hung uping and voice is not
ok....
Where is the problem, in NAt with rtp or networking,
route{
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
exit;
};
if (msg:len >= 2048 ) {
sl_send_reply("513", "Message too big");
exit;
};
# NAT detection
route(2);
if (!method=="REGISTER")
record_route();
if (loose_route()) {
append_hf("P-hint: rr-enforced\r\n");
route(1);
};
if (!uri==myself) {
append_hf("P-hint: outbound\r\n");
route(1);
};
if (uri==myself) {
if (method=="REGISTER") {
if (!www_authorize("xx.xxx.xxx.xxx", "subscriber")) {
www_challenge("xx.xxx.xxx.xxx", "0");
exit;
};
if (isflagset(5)) {
setflag(6);
# if you want OPTIONS natpings uncomment next
# setflag(7);
};
save("location");
exit;
};
if (!lookup("location")) {
sl_send_reply("404", "Not Found");
exit;
};
append_hf("P-hint: usrloc applied\r\n");
};
route(1);
}
route[1] {
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]{
force_rport();
if (nat_uac_test("19")) {
if (method=="REGISTER") {
fix_nated_register();
} else {
fix_nated_contact();
};
setflag(5);
};
}
route[3] {
if (is_method("BYE|CANCEL")) {
unforce_rtp_proxy();
} else if (is_method("INVITE")){
force_rtp_proxy();
t_on_failure("1");
};
if (isflagset(5))
search_append('Contact:.*sip:[^>[:cntrl:]]*', ';nat=yes');
t_on_reply("1");
}
failure_route[1] {
if (isflagset(6) || isflagset(5)) {
unforce_rtp_proxy();
}
}
onreply_route[1] {
if ((isflagset(5) || isflagset(6)) && status=~"(183)|(2[0-9][0-9])")
{
force_rtp_proxy();
}
search_append('Contact:.*sip:[^>[:cntrl:]]*', ';nat=yes');
if (isflagset(6)) {
fix_nated_contact();
}
exit;
}
--
Thanks and Regards with cheers
Sunkara Ravi Prakash (Voip Developer)
Hyperion Technology
Kondapur, Hi-tech city,
Hyderabad.
www.hyperion-tech.com
+91-9985077535