[OpenSIPS-Users] [nat_traversal] Replacement of bflag(NAT_CALLED) ?
Dan Pascu
dan at ag-projects.com
Wed Nov 12 10:28:45 CET 2008
On Wednesday 12 November 2008, Iñaki Baz Castillo wrote:
> Hi, usually (with nathelper module) a bflag(NAT_CALLED) is enabled when
> the user is registered behind NAT, so when "lookup(location)" gets the
> user information, that bflag is set to 1 and we can decide to use
> RtpProxy or whatever.
>
> AFAIK this mechanism (using bflag(NAT_CALLED)) is still necessary when
> using "nat_traversal" since it's the only way we can know if the caller
> user location is behind NAT. Is it?
Yes, however that mechanism is provided by usrloc, so it has nothing to do
with either nat_traversal or nathelper. It was just a means to help other
modules (like nathelper or mediaproxy) to take a decision per contact.
There seems to be some confusion here about the role of this module. The
nat_traversal module is there to provide help with NAT traversal for SIP
signaling purposes (that means NAT tests, fixing contacts and keeping
devices behind NAT alive). You will use both nat_traversal and nathelper
or mediaproxy. The only thing that changed, is that SIP signaling NAT
traversal functionality has been moved to nat_traversal, while nathelper
and mediaproxy will only provide NAT traversal for media. That and the
fact that nat_traversal implements a much more flexible and complete
solution to keepalive devices behind NAT than either nathelper or
mediaproxy ever did.
As a side note, nat_traversal itself doesn't need that mechanism because
it can figure out itself if a destination device is behind NAT and it
needs to keep it alive during a call. So you only call nat_traversal()
when you have a caller behind NAT that you want to keep reachable (for
either REGISTER, SUBSCRIBE or INVITE sessions).
--
Dan
More information about the Users
mailing list