[Users] Openser and NATed users

Victor Gamov vit at lipetsk.ru
Fri Feb 16 09:55:34 CET 2007


Hi guys!

I try to use OpenSER with NATed-users and now I have some problem.
No I'll try to explain it.

I have the following network scheme:

mySIP-phone_behind_NAT --> NAT --> OpenSER --> OtherProxy -->
other_SIP_phone

mySIP-phone_behind_NAT have some knowledges about external NAT_ip so it
successfully
registered on OpenSER using nathelper module and location table have new
record looks like:

user at mydomain
Contact: user at NAT_ip:5060
Received: NAT_ip:NAT_port

Then mySIP-phone_behind_NAT send new INVITE with Contact=user at NAT_ip:5060
OpenSER fixup this Contact using fix_nated_contact() and send INVITE to
OtherProxy
with Contact=user at NAT_ip:NAT_port;nat=yes

Then 200OK and ACK successfully traversed via OpenSER and dialog
esteblished.

Then other_SIP_phone sends BYE request using R-URI learned from previous
INVITE Contact-header=ser at NAT_ip:NAT_port;nat=yes
OpenSER rewrite this R-URI to user at NAT_ip:NAT_port and send it using
t_relay(). The packet goes to NAT_ip:NAT_port
but mySIP-phone_behind_NAT sends "404 Not found" because it does not know
anything about user at NAT_ip:NAT_port --
it expected user at NAT_ip:5060 as sended in first INVITE.

So, my question is:  is this my misconfiguration or incorrect logic
understanding ?

I have some ideas how to fix this problem, for eaxample:
when I got INVITE from mySIP-phone_behind_NAT I must rewrite Contact to
user at mydomain
(assuming that requests to mydomain goes to OpenSER always). Then if OpenSER
got BYE from other_SIP_phone
it will lookup() and restore Contact and Received info.  But I have problem
again: If I rewrite R-URI to Contact and t_relay() it -- packet will be
discarded by NAT because it does not anything about port 5060. If I rewrite
R-URI using Received info I will get problem discribed early.

Feature request "Allow AVP in t_relay()" (published in Tracker) will solve
this problem

Any suggestion?


-- 
CU,
Victor Gamov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kamailio.org/pipermail/users/attachments/20070216/e03566b5/attachment.htm 


More information about the Users mailing list