Short answer: you can't
Long answer: the problem of NAT traversal requires a 10+ man-year effort, and as far as i know there is no other product out there that does this reliably except for skype (skype allows you to write plugins which essentially use skype as a reliable P2P connection provider that you don't have to care about, see e.g. here and here). Sure enough, using skype as a "provide me a P2P connection please" service provider ties you to a proprietary and out-of-your-hands solution, so it's not really a... solution.
Now, there's another problem which will only make things get tougher w/r to NAT traversal on IPv4 in the years to come: specifically, ISPs will start introducing what it's called "Carrier-Grade NATs" (CGN, see this for an intro) which use a different type of algorithms for port allocation than the home NATs use (plus, on top of this, you'll now have TWO cascaded NATs to deal with). In a nutshell, w/o having a 10+ man-year developing resource at your hands, forget about ANYTHING P2P over IPv4. BTW, even skype is expected to succumb to CGNs (which are already THE NORM for mobile connections, i.e. there are almost no mobile carriers left that provide the handsets with a public IPv4 address), and this is (most likely IMHO) the reason why one of the first things that MS did after acquiring skype was to put thousand of RELAYS in place so that these will be able to deal with the impossibility to establish P2P connections over IPv4 in the coming years, see this (and forget about MS' reply at the end of the article, it's BS)
What you can do is to start learning some more about IPv6: with IPv6 things SHOULD be much easier because there will (allegedly) be no more NATs (there's something called NPT, but that's a P2P-friendly protocol). The problem with IPv6 routers is that there is (as-yet) no port control standard protocol, but there's something currently in the making, see this, so shoud/when this (or some other) protocol will become standardized AND adopted by CPE manufactures, then IPv6 router traversal will be next to trivial.
So, either way, your best option right now is to FORGET ABOUT P2P for the next 3 to 5 years. unfortunately...
PS. 2 more links:
- This is my project, and believe me, it's a mess;
- CGNs in the wild.