Hi Stefano,
Thanks for your interest. There is no private network such as a VPN being used. I am testing using a virtual cloud server in a CaaS environment which puts it behind a NAT firewall (although later the server may have a fixed IP address). The clients are currently simple console apps (based on Baresip) operating on PC's behind a NAT/firewall on a LAN. Later these clients may operate on a mobile phone, in which case the cellular network will be NAT'ed. Currently, the only mods I have made to the default OpenSIPS (Vers. 1.6.4.2) config file is "alias=<server IP address>" and fix_nat_register() related mods. However I actually get quite far with these mods as you can see from my dialog below. Network architecture: Server = Ubuntu 10.04 LTS server with OpenSIPS 1.6.4.2 LAN clients--NAT------Internet------NAT--OpenSIPS >From my testing and wireshark traces I have constructed an example dialog shown below. In the example dialog below at step 7 when the server sends the "200 - Answering" back to voip2 it includes its local IP address in the "Record-Route" field. This results in voip2 trying to sending its ACK to the server's local IP address (step 8) which of course cannot be reached. Voip2 now starts sending RTP's to voip1 (which actually do reach voip1). However, voip1 does not start sending RTP's to voip2. Instead voip1 just keeps sending "200 Answering" messages, which I assume is because it has not received the ACK for its "200 -Answering" message (step 6). I am also assuming that voip1 does not get the final ACK from the server because the server never gets the final ACK from voip2 at step 8. Example dialog: 1. server <-INVITE-- voip2 2. server -100 Trying-> voip2 3. voip1 <-INVITE-- server 4. voip1 -180 Ringing-> server 5. server -200 Ringing-> voip2 6. voip1 -200 Answering-> server 7. server -200 Answering-> voip2 8. nowhere <-ACK-- voip2 9. voip1 <-----RTP------------------------RTP--- voip2 10.voip1 <-----RTP------------------------RTP--- voip2 11.voip1 <-----RTP------------------------RTP--- voip2 12.voip1 -200 Answering-> server 13.voip1 <-----RTP------------------------RTP--- voip2 14.voip1 <-----RTP------------------------RTP--- voip2 15.voip1 <-----RTP------------------------RTP--- voip2 ... Hope you can help. Regards Mark Currie From: [email protected] [mailto:[email protected]] On Behalf Of Stefano Pisani Sent: 04 January 2013 09:10 To: [email protected] Subject: Re: [OpenSIPS-Users] NAT issues on client and server Could you explaint your scenario better? The server is in a private network? The cliets are in different private networks? s Il 04/01/2013 05:23, Mark Currie ha scritto: Thanks for the advice Flavio. Currently I am actually pretty close with my NAT'ed OpenSIPS and NAT'ed clients. I am assuming this is because I have a simple NAT scenario with full-cone NATs. I get as far as making a call, but when I pick-up the call only one side gets RTP through. I traced the problem to the fact that a local address is being put in the "Record Route" section of an ACK response. I would like to try to get this more controllable scenario working first before I launch into new complexity with RTP proxies etc. I think that I just need to know how to get the fix_nat_sip() and fix_nat_contact() to work. Any pointers with that? Regards Mark From: [email protected] [mailto:[email protected]] On Behalf Of Flavio Goncalves Sent: 03 January 2013 12:27 To: OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] NAT issues on client and server Hi Mark, There is no simple way to traverse NAT. Unless all your routers use a non symmetric NAT, you will have to use rtpproxy or mediaproxy (you can check this with a stun client). OpenSIPS behind NAT make things even more complicated. So I suggest that you follow an example with rtpproxy or media proxy and also use the OpenSIPS in a valid IP address. The setup you are trying to do with OpenSIPS behind NAT is possible, but it is even more complex. Flavio E. Goncalves 2013/1/3 Mark Currie <[email protected]> Hi, I have a very simple setup for a closed network of users (all NAT'ed) with one OpenSIPS server (also NAT'ed). I have managed to solve my first problem with registration by following previous posts and using fix_nat_register(), but I am still having problems with NAT issues during a call. I know that I probably need to use fix_nat_contact() and fix_nat_sip() but I can't figure out how to use these properly through the documentation. I have tried to search for examples of opensips.cfg that suit my scenario but all the ones I found are complicated with proxies etc. Can someone point me to simple example of opensips.cfg that takes care of NAT? Regards Mark Currie _______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users _______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
