Dec 4, 2009 1:13 AM
OpenSER+OpenSBC(with two NICs) nat problem
Hi to all!
I've installed the last version of OpenSBC(
OpenSBC-1.1.5_RC5-Final-Setup.msi)on WIndows XP OS with two NICs,
one for outside and the other for inside,
sip clients and OpenSER in pulic network,Our sip Application Server in internal LAN
OpenSBC WAN IP: 172.19.1.yy
OpenSBC LAN IP: 172.16.0.y
Sip Server: 172.16.0.x
OpenSER is used to be a load balancer for OpenSBC cluster,just relaying sip message to corresponding OpenSBC according to its algorithm,then OpenSBC will relay this message to sip server
OpenSER's main route logic is :
route {
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483", "Too Many Hops");
exit;
};
if (msg:len>= max_len) {
sl_send_reply("513", "Message Overflow");
exit;
};
if (loose_route()) {
append_hf("P-hint: rr-enforced\r\n");
record_route();
route(2);
exit;
};
route(1);
if ( (method=="CANCEL") || (method=="ACK") ) {
record_route();
route(2);
#xlog("Forward to <$ru> with CID $ci\n");
exit;
};
}
#if stateless LB
route[1]
{
ds_select_domain("2", "0");
record_route();
t_relay();
}
My OpenSBC configure is
SBC-Application-Mode=B2BUpperReg Mode
[Upper-Registration]Route-List 1=[sip*]sip:server ip
[B2BUA-Routes]Route-List 1=[sip*]sip:server ip
[SIP-Transports]Interface-Route-List = 172.16.0.y
The problem is
after receiving the
invite from Outside, a 200 OK is sent including a record-route to the
Internal IP, so the ACK is being sent by the remote client the the
wrong address. OpenSBC keeps sending several 200 OK until it finally
sends a BYE (because it is not getting any ACK back).
if
[SIP-Transports]Interface-Route-List = 172.16.0.y;external=172.19.1.yy
UserA send inviite,but the callee can't receive the invite,because when sip sever receive this invite,it relay this invite to OpenSBC WLAN,of course this destination is unreachable
Do you have any idea on how to fix this problem?Does OpenSER's route logic bring any effects?