[Serusers] NAT

Michael Shuler mike at bwsys.net
Wed Aug 25 00:50:06 CEST 2004


I'm trying to understand the NAT process, can someone tell me if this is
correct

Here is my original INVITE from client IP 123.123.123.123 which is received
from port 5002 (because its behind a NAT router): 

INVITE sip:2175850357 at sip2.bwsys.net;user=phone SIP/2.0
Via: SIP/2.0/UDP 192.168.100.2:5060;branch=z9hG4bK-4qxhdyvuyz6t;rport
From: "Mike's Springfield snom 1"
<sip:MikeSnom1 at sip2.bwsys.net>;tag=k91lt5ydem
To: <sip:2175850357 at sip2.bwsys.net;user=phone>
Call-ID: 3c275253ad55-krb7eduyhd2m at 192-168-100-2
CSeq: 1 INVITE
Max-Forwards: 70
Contact: <sip:MikeSnom1 at 192.168.100.2:5060;line=rygvn8mw>
P-Key-Flags: keys="3"
User-Agent: snom200-3.42
Accept-Language: en
Accept: application/sdp
Allow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, NOTIFY, SUBSCRIBE, PRACK,
MESSAGE, INFO
Allow-Events: talk, hold, refer
Supported: timer, 100rel, replaces
Session-Expires: 3600
Content-Type: application/sdp
Content-Length: 256

v=0
o=root 20147217 20147217 IN IP4 192.168.100.2
s=call
c=IN IP4 192.168.100.2
t=0 0
m=audio 10048 RTP/AVP 18 0 8 101
a=rtpmap:18 g729/8000
a=rtpmap:0 pcmu/8000
a=rtpmap:8 pcma/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv



Now this invite is going to get forwarded to my TNT (with a public IP) which
has SIP capabilities and hands of PRI to a phone switch.  So to make NAT
support work what would this message look like after being proxied and NAT
"adjusted" and what function in SER would be needed to make the changes
happen?

Now I know the proxy should be able to learn the port that the INVITE comes
in on and can send SIP messages back via the learned port, but I do not
understand how the RTP stream works when NAT is involved.  My guess is that
anything what says 192.168.100.2 (the NAT'ed IP) needs to get changed to the
proxy's public IP of 198.88.216.87:5060.  This would include the Via and
Contact.  Now the SDP "c" line has to be changed because it says
192.168.100.2 but it should be changed to 123.123.123.123 (the clients
learned IP).  Now that leaves us to the problem of the RTP port.  The client
says it wants to receive on 10048, but how does the generic NAT router know
that the snom wants this port opened?


----------------------------------------

Michael Shuler, C.E.O.
BitWise Systems, Inc.
682 High Point Lane
East Peoria, IL 61611
Office: (217) 585-0357
Cell: (309) 657-6365
Fax: (309) 213-3500
E-Mail: mike at bwsys.net
Customer Service: (877) 976-0711 




More information about the sr-users mailing list