On Mon, 2003-12-29 at 20:41, Andres wrote:
[Detecting UAC behind symmetric NAT based on Header fields]
ATA186(fw 3.0.0) and Sipura SPA2000 both have STUN
Support. I have asked for
this "Header" feature to Sipura and they are thinking about it.
Thinking about a general solution the following came to my mind: How
about setting up a 2nd UAS listening at a 2nd IP address and configure
the registrar to forward REGISTER messages from UACs found to be behind
a NAT to this 2nd UAS. This other UAS could then test whether or not it
can "ping" the UAC. Unless this 2nd server would receive a reply from
the UAC, we could assume that the UAC is behind a symmetric NAT. On
success this second UAS would then notify the registrar to not force
UAC's rtp stream through a local proxy.
Such as
UAS A --------> UAS B
<-------
/\ \ 6. / /\
\ \ / /
\ \ / /
\ \ 2. 4. / /
\ \ / /
1. \ \ / /
\ \ / / 5.
\ \ / /
\ \ / /
\ \ / /
\ \/ \/ /
UAC
with UAS A being the "real" registrar and UAS B being the UAS testing
for the type of NAT.
1. REGISTER
2. 200 OK
3. same message as 1.)
4. OPTIONS
5. 200 OK or 486 BUSY
6. ???
However, setting this up I ran into two issues.
I configured UAS B to issue an OPTIONS message by calling
exec_msg("serctl ping"). I have no idea to do this stateful and did not
find any mandatory header fields in the reply ("contact" appears not to
be mandatory according to RFC 3261), which would reveal the identity of
the UAC.
Also, I wonder what message one could use for the 6th message. '200 OK'
as a reply to the 3rd message seems to make the most sense, but I
noticed that one cannot use usrloc's save command inside
onreply_route[]. Is there a message type that can be used for this sort
of notification?
Thilo