Re: NAT and NOTIFY messages
Lauri Tielinen <[email protected]>
| Newsgroups | gmane.comp.voip.nist-sip |
|---|---|
| Organization | Futurice Oy |
| Message-ID | <[email protected]> |
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 >>>