Re: NAT and NOTIFY messages
"M. Rangnathan" <[email protected]>
| Newsgroups | gmane.comp.voip.nist-sip |
|---|---|
| Message-ID | <[email protected]> |
Lauri, Want to do a lttle wiki wirteup (please apply for content-developer or developer access to the project on java.net and send me your login id so I know who you are and can approve)? Else you can send me a code snipptet or how to and I can post it to the wiki. The question of NAT traversal comes up an awful lot. Your findings could help others. Thanks, Regards Ranga Lauri Tielinen wrote: > Thanks for the help. I got NAT working already last week after I > noticed to use VIA header for the received IP & port, just as you > suggested. > > I guess whole confusion was because I was somehow in understanding > that this would have been something that JAIN-SIP would have done out > of the box. The fact that OK responses went nicely through the NAT > didn't help me on resolving the issue. > > Nevertheless, Jeroen's comments are valuable for anyone trying to get > SIP working through NAT. > > Best Regards, > > - Lauri > > [email protected] wrote: > >> Lauri, >> >> NAT traversal is quite tricky to get right, it may or may not work >> depending on the type of NAT device you have. >> The best solution would probably be to use outbound (recent IETF >> draft) but that is not supported by JAIN 1.2. >> If you add "rport" to the via header that the client adds, you may >> see (in the trace) on which port the NAT device sends it. Then you >> may need a hack which uses this port for the remote Contact header >> too (which is used as request URI to send the NOTIFYs to) >> >> The 1.2 API has support for rport, but the reverse direction will not >> work without modifications (not even using TCP) >> >> Regards, >> >> Jeroen >> >>> Lauri, >>> >>> Are you using the same provider to send out the NOTIFY as the >>> provider you use to respond to the SUBSCRIBE? . Maybe its a >>> different UDP socket which would be the case if you used a different >>> provider. That could be one reason. >>> >>> Regards >>> >>> Ranga >>> >>> Lauri Tielinen wrote: >>> >>>> Hello! >>>> >>>> I'm working on presence server using JAIN-SIP and I'm wondering if >>>> someone could give me some help with traversing through NAT. >>>> >>>> I've got following quite basic SIPp flow: >>>> Client Server >>>> REGISTER ----------> >>>> 200 <---------- >>>> SUBSCRIBE ----------> >>>> 200 <---------- >>>> NOTIFY <---------- >>>> 200 ----------> >>>> >>>> Currently responses (200) are going nicely through the NAT with UDP >>>> and TCP, but I'm unable to get NOTIFY messages through to the client. >>>> >>>> Responses are sent by using server transaction and I've tested >>>> NOTIFY messages by using Dialog so far. I've also tried sending >>>> NOTIFY statelessly, but that fails naturally. I also tried setting >>>> CACHE_SERVER_CONNECTIONS and CACHE_CLIENT_CONNECTIONS to true, but >>>> didn't notice any difference. >>>> >>>> What approach would be correct to handle sending of NOTIFY >>>> messages? The NAT mapping is planned to be kept alive by sending >>>> REGISTER messages often enough. I'm feeling that I'm looking in >>>> wrong direction at the moment or missing something pretty simple so >>>> little help would be appreciated. >>>> >>>> I'm using latest JAIN-SIP 1.2 from CVS. >>>> >>>> Best Regards, >>>> >>>> - Lauri Tielinen >>>> > -- M. Ranganathan Advanced Networking Technologies Division, National Institute of Standards and Technology (NIST), 100 Bureau Drive, Stop 8920, Gaithersburg, MD 20899. tel:301 975 3664 , fax:301 590 0932 http://w3.antd.nist.gov/ Advanced Networking Technologies For the People!