NAT使得SIP端到端的应用变得非常困难,文章分析了几种SIP穿越NAT方法及其不足,提出了一种基于STUN和TURN方法的穿越方案.其基本思想是根据NAT的不同采用不同的方式实现SIP信令的穿越,而媒体流的穿越则通过对所有可用媒体地址进行连接检查来实现.方案不改动现有NAT,在应用层上实现了对所有NAT的有效穿越,避免单独使用其它方法带来的缺陷.
The NATs caused the SIP end-to-end application to become extremely difficult. In this paper we analyzed several kinds of method of NAT traversal for SIP and their pitfalls, proposed a solution for NAT traversal based on STUN and TURN methods. Its basic idea is that for SIP signaling, it takes different methodology to traverse the NAT by the NAT type, and for the associated media it traverses the NAT by the connectivity checks to all the media addresses available. This solution can traverse all NATs in the application layer not changing the existing NAT, and avoids the pitfalls of using any of the other methods alone.