PJNATH - Open Source ICE, STUN, and TURN Library
PJNATH (PJSIP NAT Helper) is an open source library providing NAT traversal functionalities by using standard based protocols such as STUN, TURN, and ICE.
Network Address Translation (NAT) is commonly deployed everywhere primarily to alleviate the exhaustion of IPv4 address space by allowing multiple hosts to share a public/Internet address. While NAT would work well for typical client server communications (such as web and email), since it's always the client that initiates the conversation and normally client doesn't need to maintain the connection for a long time, installation of NAT would cause major problem for peer-to-peer communication, such as (and especially) VoIP.
PJSIP NAT Helper (PJNATH) is a library which contains the implementation of standard based NAT traversal solutions. PJNATH can be used as a stand-alone library for your software, or you may use PJSUA-LIB library, a very high level library integrating PJSIP, PJMEDIA, and PJNATH into simple to use APIs.
PJNATH has the following features:
In the future, more protocols will be implemented (such as UPnP IGD, and SOCKS5).
The library provides the following main component groups:
Apart from the NAT Classification/Detection Tool, each component group are further divided into two functionalities:
For more information about each component groups, please click the component link above.
The PJNATH library depends (and only depends) on PJLIB and PJLIB-UTIL libraries. All these libraries should have been packaged together with the main PJSIP distribution. You can download the PJSIP distribution from PJSIP website
Please click on the appropriate component under Library Organization section above, which will take you to the documentation on how to use the component.
We attempt to provide simple samples to use each functionality of the PJNATH library.
Please see PJNATH Samples and screenshots page for the list of samples.