[Users] Openser and NATed users

Bogdan-Andrei Iancu bogdan at voice-system.ro
Fri Feb 16 19:06:46 CET 2007


For the other users information, this solution was posted on the 
tracker: you do no need anything extra, you can do it in the current 
version:

......
$du = $avp(s:redirect-ip);
t_relay();
.......


regards,
bogdan

Victor Gamov wrote:
> 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
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users
>   





More information about the Users mailing list