本文介绍IP电话机RTP流穿透的背景、工作原理、配置方法与抓包验证,说明在NAT环境中如何通过RTP Keep Alive维持路由器映射,避免跨网通话、长时间Hold后Resume以及X6视频通话中的媒体流中断问题,适合维护人员排查语音与视频通信故障。
当话机跨越 NAT 进行通信时,外部媒体流由于不能穿越内网从而导致无法通信。这种情况在两台已经通信的设备在长时间 Hold 后也会出现,由于外网路由器保存的 NAT 映射信息超时,从而导致 Resume 后仍然无法通信。
为保证 NAT 下的正常通信,保证 RTP 流穿透显得尤为重要。
根据 RFC6263 , 工作在 INACTIVE 和 RECVONLY 的情况下,要采用规范里推荐的一种方式来定期发送 RTP 包。规范推荐用 RTCP 复用 RTP 的方法,担心很多终端没有实现,考虑兼容的问题决定采用其他方式。
参考规范第四节,考虑通过定时发送错误 Payload Type 的 RTP 包来保证通信。
1.3.1配置
开启上图配置后,会使能 RTP 流穿透,在以下情况会发送 RTP Keep Alive 包:
1话机拨通电话后会发送 RTP 包来打通 NAT 通道(应用于 x6 视频通话)
2话机通话 Hold 后会定时发送 RTP 来保持 NAT 连接
1.3.2抓包
下图显示了发送的 RTP Keep Alive 包,可以看到 wireshark 解析出来的包,正常通话的包编码为 G.711 PCMU,与发出去的 RTP Keep Alive 包的编码是不一致的。
下图显示一个完整的 RTP Keep Alive 包
This Cookie Policy explains how we use cookies and similar technologies when you access or use our website and related services. Please read this Policy together with our Terms and Conditions and Privacy Policy so that you understand how we collect, use, and protect information.
By continuing to access or use our Services, you acknowledge that cookies and similar technologies may be used as described in this Policy, subject to applicable law and your available choices.
We may revise this Cookie Policy from time to time to reflect changes in legal requirements, technology, or our business practices. When we make updates, the revised version will be posted on this page and will become effective from the date of publication unless otherwise required by law.
Where required, we will provide additional notice or request your consent before applying material changes that affect your rights or choices.
Cookies are small text files placed on your device when you visit a website or interact with certain online content. They help websites recognize your browser or device, remember your preferences, support essential functionality, and improve the overall user experience.
In this Cookie Policy, the term “cookies” also includes similar technologies such as pixels, tags, web beacons, and other tracking tools that perform comparable functions.
We use cookies to help our website function properly, remember user preferences, enhance website performance, understand how visitors interact with our pages, and support security, analytics, and marketing activities where permitted by law.
We use cookies to keep our website functional, secure, efficient, and more relevant to your browsing experience.
These cookies are essential for the operation of the website and cannot be disabled in our systems where they are required to provide the service you request. They are typically set in response to actions such as setting privacy preferences, signing in, or submitting forms.
Without these cookies, certain parts of the website may not function correctly.
Functional cookies enable enhanced features and personalization, such as remembering your preferences, language settings, or previously selected options. These cookies may be set by us or by third-party providers whose services are integrated into our website.
If you disable these cookies, some services or features may not work as intended.
These cookies help us understand how visitors use our website by collecting information such as traffic sources, page visits, navigation behavior, and general interaction patterns. In many cases, this information is aggregated and does not directly identify individual users.
We use this information to improve website performance, usability, and content relevance.
These cookies may be placed by our advertising or marketing partners to help deliver more relevant ads and measure the effectiveness of campaigns. They may use information about your browsing activity across different websites and services to build a profile of your interests.
These cookies generally do not store directly identifying personal information, but they may identify your browser or device.
Some cookies are set directly by our website and are referred to as first-party cookies. Other cookies are set by third-party services, such as analytics providers, embedded content providers, or advertising partners, and are referred to as third-party cookies.
Third-party providers may use their own cookies in accordance with their own privacy and cookie policies.
Depending on the type of cookie used, the information collected may include browser type, device type, IP address, referring website, pages viewed, time spent on pages, clickstream behavior, and general usage patterns.
This information helps us maintain the website, improve performance, enhance security, and provide a better user experience.
You can control or disable cookies through your browser settings and, where available, through our cookie consent or preference management tools. Depending on your location, you may also have the right to accept or reject certain categories of cookies, especially those used for analytics, personalization, or advertising purposes.
Please note that blocking or deleting certain cookies may affect the availability, functionality, or performance of some parts of the website.
Restricting cookies may limit certain features and reduce the quality of your experience on the website.
Where our mobile applications use cookie-like technologies, they are generally limited to those required for core functionality, security, and service delivery. Disabling these essential technologies may affect the normal operation of the application.
We do not use essential mobile application cookies to store unnecessary personal information.
Most web browsers allow you to manage cookies through browser settings. You can usually choose to block, delete, or receive alerts before cookies are stored. Because browser controls vary, please refer to your browser provider’s support documentation for details on how to manage cookie settings.
If you have any questions about this Cookie Policy or our use of cookies and similar technologies, please contact us at support@becke.cc .