A method and device for replaying RTP packets based on timing retention
The time-preservation-based RTP packet replay test method and apparatus solves the problem that existing technologies cannot accurately simulate RTP packet anomalies. It enables rapid and accurate reproduction and localization of compatibility and network anomalies of video conferencing equipment in the laboratory, supports flexible packet filtering and variable-speed replay, and improves the efficiency of problem localization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- FUJIAN STAR NET WISDOM TECH CO LTD
- Filing Date
- 2026-04-23
- Publication Date
- 2026-07-10
AI Technical Summary
Existing testing tools cannot accurately simulate RTP packet anomalies at customer sites, resulting in video conferencing equipment being unable to reproduce real-world compatibility and network anomaly issues in the laboratory.
This invention provides a timing-preserving RTP packet replay test method and apparatus, which establishes an effective media session through SIP negotiation, accurately preserves the timing characteristics of RTP packets, and supports flexible packet filtering and variable-speed replay to simulate abnormal situations in customer sites.
It enables rapid and accurate reproduction and localization of compatibility and network anomalies of video conferencing equipment in experimental environments, improves the accuracy of problem reproduction, supports compatibility with various commercial devices, and accelerates problem localization through variable speed replay.
Smart Images

Figure CN122372409A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of RTP message replay technology, and in particular to a timing-preserving RTP message replay test method and apparatus. Background Technology
[0002] RTP (Real-Time Transport Protocol) is the core protocol for transmitting audio and video data in video conferencing systems. In practical applications, due to network conditions (such as packet loss, jitter, and out-of-order delivery) and differences in implementation across different vendors' platforms, RTP packets often exhibit occasional anomalies. These anomalies are the root cause of problems such as stuttering, screen tearing, and audio-video desynchronization in video conferencing. However, in a typical laboratory testing environment, it is difficult to accurately simulate the complex and intermittent RTP packet anomalies encountered at a customer's site.
[0003] Existing general-purpose testing tools (such as iperf and OBS streamers) can only send "standard" media streams conforming to protocol specifications. They cannot directly use raw RTP packets captured from the customer's site that contain specific abnormal patterns (such as packet loss in specific sequences, duplicate packets, out-of-order packets, and abnormal timestamp increments). This simple replay ignores the original arrival intervals and timestamp increments between packets, resulting in reproduced phenomena that do not match the actual situation. While general-purpose network packet replay tools (such as tcpreplay) can send packets from PCAP files, they do not include SIP signaling interaction capabilities. They cannot simulate a complete, stateful video conferencing call and cannot form a "call-media negotiation-replay" service loop. This causes the device under test to fail to enter the correct media reception state, thus making it impossible to reproduce problems that depend on the complete session context. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a time-preserving RTP packet replay test method and apparatus, which can accurately preserve the time characteristics of the RTP packets in the field and establish an effective media session through SIP negotiation for RTP packet replay test, thereby quickly and accurately reproducing and locating compatibility and network anomaly issues of video conferencing equipment in an experimental environment.
[0005] In a first aspect, the present invention provides a time-preserving RTP packet replay test method, comprising: Packet filtering process: Obtain packet files, configure test network card address and device under test address, and filter out RTP packets to be replayed; SIP signaling call process: Interact with the device under test via SIP to complete call setup, media parameter negotiation, and obtain session parameters for this session; Preservation of time replay process: parse the relative arrival time interval and RTP timestamp increment of each original RTP packet in the RTP packets to be replayed, and control the packet sending rate according to the relative time interval of the original packets during replay. Session binding process: The specified fields in the replayed RTP message are dynamically modified to be consistent with the session parameters negotiated during the SIP signaling call process, so that the device under test can recognize the replayed stream as a legitimate media stream of the current call.
[0006] Furthermore, during the packet filtering process, RTP packets to be replayed are filtered out according to parameters set by the user. These parameters include audio / video ports, payload type, and / or sequence number range.
[0007] Furthermore, the session parameters include SSRC and Call-ID.
[0008] Furthermore, during the timing-preserving replay process, a variable-speed replay function is provided, which dynamically adjusts the message transmission rate according to the speed factor set by the user and the relative time interval of the original messages.
[0009] Furthermore, the specified fields in the replayed RTP message include SSRC and sequence number increment mode.
[0010] Secondly, the present invention provides a time-preserving RTP packet replay testing apparatus, comprising: The packet filtering module is used to obtain packet files, configure the test network card address and the address of the device under test, and filter out the RTP packets to be replayed. The SIP signaling call module is used to interact with the device under test via SIP, complete call setup, media parameter negotiation, and obtain session parameters for the current session. The timing-preserving replay module is used to parse the relative arrival time interval and RTP timestamp increment of each original RTP packet in the RTP packets to be replayed, and control the packet sending rate according to the relative time interval of the original packets during replay. The session binding module is used to dynamically correct specified fields in the replayed RTP packets to match the session parameters negotiated during the SIP signaling call process, so that the device under test can recognize the replayed stream as a legitimate media stream of the current call.
[0011] Furthermore, the packet filtering module filters out the RTP packets to be replayed according to the parameters set by the user, including audio / video ports, payload type and / or sequence number range.
[0012] Furthermore, the session parameters include SSRC and Call-ID.
[0013] Furthermore, the timing-preserving replay module provides a variable-speed replay function, which dynamically adjusts the message transmission rate according to the speed factor set by the user and the relative time interval of the original message.
[0014] Furthermore, the specified fields in the replayed RTP message include SSRC and sequence number increment mode.
[0015] The technical solutions provided in the embodiments of the present invention have at least the following technical effects: 1. High reproducibility: By maintaining the relative timing of the original messages, the problem of "being able to replay but the phenomenon is not correct" is solved, which greatly improves the accuracy of problem reproduction.
[0016] 2. Good compatibility: Through SIP signaling and session binding technology, the replay stream can be received normally by various commercial video conferencing devices without the need to modify the device side.
[0017] 3. High efficiency in problem localization: The unique variable speed replay function can slow down "second-level" occasional problems into "minute-level" clear processes, or accelerate the testing of stable reproducible problems, greatly assisting R&D personnel in locating the root cause.
[0018] 4. High flexibility: Supports filtering and replay by port, payload, serial number range, etc., to achieve precise injection of abnormal segments.
[0019] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0020] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0021] Figure 1 This is a flowchart illustrating the overall process of the method in Embodiment 1 of the present invention. Figure 2 This is a schematic diagram of the configuration interface in Embodiment 1 of the present invention; Figure 3 This is a schematic diagram of the test operation process in Embodiment 1 of the present invention; Figure 4 This is a schematic diagram of the device in Embodiment 2 of the present invention. Detailed Implementation
[0022] This invention provides a timing-preserving RTP packet replay test method and apparatus, which accurately preserves the timing characteristics of RTP packets in the field and establishes an effective media session through SIP negotiation for RTP packet replay testing. This allows for the rapid and accurate reproduction and localization of compatibility and network anomalies of video conferencing equipment in an experimental environment.
[0023] The overall concept of the technical solutions in the embodiments of the present invention is as follows: Addressing the shortcomings of existing technologies (including general-purpose network testers, streaming software, and packet replay tools): 1. Unable to maintain the timing characteristics of the original messages: Simple replay ignores the original arrival interval and timestamp increment between messages, resulting in the reproduced phenomenon not matching the actual situation.
[0024] 2. Lack of linkage with SIP signaling: It cannot simulate a complete, stateful video conferencing call, so that the replayed media stream can be accepted by the device under test.
[0025] 3. Does not support selective injection of abnormal messages: It cannot flexibly replay only the abnormal segments of the message, or adjust the replay speed to amplify the problem.
[0026] This embodiment designs an RTP packet replay testing method and tool that can accurately maintain the timing characteristics of RTP packets at the customer's site, establish effective media sessions through SIP negotiation, and support flexible speed adjustment and filtering. This allows for the rapid and accurate reproduction and localization of compatibility and network anomalies in video conferencing equipment in a laboratory environment. Key design features include: 1. Time-preserving replay engine: Instead of simply sending at a fixed bit rate or timestamp as is, it dynamically simulates the arrival interval of the original message.
[0027] 2. Session-bound media injection: Dynamically associate the replayed RTP stream with the SIP session (SSRC, Call-ID) initiated by the tool to trick the device under test into entering the receiving state.
[0028] 3. Variable speed playback and abnormal amplification: Provides a playback speed adjustment slider and supports time axis compression / stretching to make latent defects explicit. Example 1
[0029] This embodiment provides a time-preserving RTP packet replay test method, such as... Figure 1 As shown, including; S1. Packet filtering process: Obtain the PCAP packet file, configure the test network card address and the address of the device under test, and filter out the RTP packets to be replayed based on the parameters set by the user, such as audio / video port, payload type and / or serial number range.
[0030] S2, SIP signaling call process: Interact with the device under test via SIP to complete call establishment, media parameter negotiation, and obtain session parameters for this session, such as SSRC, Call-ID, etc., to "bind" a legitimate identity to the media stream.
[0031] S3. Timing-Preserving Replay Process: Design a replay engine, including an adaptive timing control unit. This unit parses the relative arrival time interval and RTP timestamp increment of each original message in the RTP message to be replayed. During replay, a high-precision timer is used to control the message sending rate according to the relative time interval of the original messages.
[0032] In a preferred implementation, a variable-speed replay function is also provided, which dynamically adjusts the message transmission rate based on the user-defined speed factor and the relative time interval of the original messages. In this embodiment, a "variable-speed slider" (e.g., 0.1x, 0.5x, 1x, 2x, 5x) is specifically provided, allowing users to manually compress or stretch the replay timeline to enhance or weaken specific timing issues, thereby accelerating the exposure or localization of problems.
[0033] Session binding process: The specified fields (such as SSRC, sequence number increment mode, etc.) in the RTP message sent by the replay engine are dynamically modified to be consistent with the session parameters negotiated in the SIP signaling call process, so that the device under test can recognize the replay stream as the legitimate media stream of the current call.
[0034] In one specific embodiment, the user-configured UI interface is as follows: Figure 2 As shown. The operation procedure is as follows. Figure 3 As shown: 1. Configuration: Users import the PCAP file captured on-site into the UI interface, select the PC network card IP and device IP, and fill in the audio / video port and payload value.
[0035] 2. Parsing and Filtering: Click the "Parse RTP Packets" button. The tool will filter out the target RTP packets based on the port / Payload and automatically analyze and record the original arrival time interval sequence of each packet.
[0036] 3. Initiate a call: Click "Start Dialing Call". The SIP call module sends an INVITE to the device, completes the handshake, and establishes an audio / video call. At this point, the device is ready to receive media streams.
[0037] 4. Replay: Click "Start Replay". The replay engine controls the message sending rhythm according to the time interval sequence recorded in step 2. Users can adjust the speed slider at any time.
[0038] 5. Observation and Localization: Observe the phenomena of the device under test (such as screen flickering or lag), and quickly locate the message sequence that causes the problem by adjusting the playback speed or filtering specific message segments.
[0039] Based on the same inventive concept, this application also provides an apparatus corresponding to the method in Embodiment 1, as detailed in Embodiment 2. Example 2
[0040] This embodiment provides a timing-preserving RTP packet replay testing device, such as... Figure 4 As shown, it includes: The packet filtering module is used to obtain packet files, configure the test network card address and the address of the device under test, and filter out the RTP packets to be replayed. The SIP signaling call module is used to interact with the device under test via SIP, complete call setup, media parameter negotiation, and obtain session parameters for the current session. The timing-preserving replay module is used to parse the relative arrival time interval and RTP timestamp increment of each original RTP packet in the RTP packets to be replayed, and control the packet sending rate according to the relative time interval of the original packets during replay. The session binding module is used to dynamically correct specified fields in the replayed RTP packets to match the session parameters negotiated during the SIP signaling call process, so that the device under test can recognize the replayed stream as a legitimate media stream of the current call.
[0041] In one specific embodiment, the packet filtering module filters out RTP packets to be replayed according to parameters set by the user, including audio / video ports, payload type and / or sequence number range.
[0042] The session parameters include SSRC and Call-ID.
[0043] The timing-preserving replay module provides variable-speed replay functionality, dynamically adjusting the message transmission rate based on the user-defined speed factor and the relative time interval of the original messages.
[0044] The specified fields in the replayed RTP message include SSRC and sequence number increment mode.
[0045] Since the apparatus described in Embodiment 2 of the present invention is an apparatus used to implement the method of Embodiment 1 of the present invention, those skilled in the art can understand the specific structure and variations of the apparatus based on the method described in Embodiment 1 of the present invention, and therefore will not be described again here. All apparatuses used in the method of Embodiment 1 of the present invention fall within the scope of protection of the present invention.
[0046] The technical solutions provided in the embodiments of the present invention have at least the following technical effects: 1. High reproducibility: By maintaining the relative timing of the original messages, the problem of "being able to replay but the phenomenon is not correct" is solved, which greatly improves the accuracy of problem reproduction.
[0047] 2. Good compatibility: Through SIP signaling and session binding technology, the replay stream can be received normally by various commercial video conferencing devices without the need to modify the device side.
[0048] 3. High efficiency in problem localization: The unique variable speed replay function can slow down "second-level" occasional problems into "minute-level" clear processes, or accelerate the testing of stable reproducible problems, greatly assisting R&D personnel in locating the root cause.
[0049] 4. High flexibility: Supports filtering and replay by port, payload, serial number range, etc., to achieve precise injection of abnormal segments.
[0050] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0051] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0052] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0053] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0054] While specific embodiments of the present invention have been described above, those skilled in the art should understand that the specific embodiments described are merely illustrative and not intended to limit the scope of the present invention. Equivalent modifications and variations made by those skilled in the art in accordance with the spirit of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A time-preserving RTP packet replay test method, characterized in that, include: Packet filtering process: Obtain packet files, configure test network card address and device under test address, and filter out RTP packets to be replayed; SIP signaling call process: Interact with the device under test via SIP to complete call setup, media parameter negotiation, and obtain session parameters for this session; Preservation of time replay process: parse the relative arrival time interval and RTP timestamp increment of each original RTP packet in the RTP packets to be replayed, and control the packet sending rate according to the relative time interval of the original packets during replay. Session binding process: The specified fields in the replayed RTP message are dynamically modified to be consistent with the session parameters negotiated during the SIP signaling call process, so that the device under test can recognize the replayed stream as a legitimate media stream of the current call.
2. The method according to claim 1, characterized in that: During the packet filtering process, RTP packets to be replayed are filtered out according to user-defined parameters, including audio / video ports, payload type, and / or sequence number range.
3. The method according to claim 1, characterized in that: The session parameters include SSRC and Call-ID.
4. The method according to claim 1, characterized in that: During the timing-preserving replay process, a variable-speed replay function is provided, which dynamically adjusts the message transmission rate according to the speed factor set by the user and the relative time interval of the original message.
5. The method according to claim 1, characterized in that: The specified fields in the replayed RTP message include SSRC and sequence number increment mode.
6. A timing-preserving RTP packet replay test device, characterized in that, include: The packet filtering module is used to obtain packet files, configure the test network card address and the address of the device under test, and filter out the RTP packets to be replayed. The SIP signaling call module is used to interact with the device under test via SIP, complete call setup, media parameter negotiation, and obtain session parameters for the current session. The timing-preserving replay module is used to parse the relative arrival time interval and RTP timestamp increment of each original RTP packet in the RTP packets to be replayed, and control the packet sending rate according to the relative time interval of the original packets during replay. The session binding module is used to dynamically correct specified fields in the replayed RTP packets to match the session parameters negotiated during the SIP signaling call process, so that the device under test can recognize the replayed stream as a legitimate media stream of the current call.
7. The apparatus according to claim 6, characterized in that: The packet filtering module filters out RTP packets to be replayed based on user-defined parameters, including audio / video ports, payload type, and / or sequence number range.
8. The apparatus according to claim 6, characterized in that: The session parameters include SSRC and Call-ID.
9. The apparatus according to claim 6, characterized in that: The timing-preserving replay module provides variable-speed replay functionality, dynamically adjusting the message transmission rate based on the user-defined speed factor and the relative time interval of the original messages.
10. The apparatus according to claim 6, characterized in that: The specified fields in the replayed RTP message include SSRC and sequence number increment mode.