STUN is indeed used by SIP to traverse NAT, as part of a whole pile of techniques called ICE. However, this ultimately requires that you have a central server on which you can "advertise" your SIP presence and exchange SDP data. Yes, the session payload transport (RTP) is peer to peer, but the signalling still requires a central point.
> How can I get your js/css from outside, if you are behind NAT?
The same way you get the HTML, whatever approach is used.
I don't think it's impossible to build a system involving distributing "advertisements" saying how to reach systems on a distributed hash table, then using either ports opened through UPNP on home routers or a "supernode" collection of STUN servers to communicate to home systems. There are three big downsides to this which are probably why we've not seen one yet:
- no way to monetise it if it's truly distributed and open source => reduced incentive to build and maintain
- no central party to fight spam and abuse => system will drown in spam and abuse
- necessarily broadcasts an association between home IP address and person => vulnerable to privacy problems and DOS attacks