WebRTC-based ippbx call stress test method, device and medium
Patent Information
- Application Number
- CN202311271997.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-28
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2043-09-28
AI Technical Summary
[0007]测试效率低下:缺乏自动化的测试工具,测试人员需要进行手动操作和监控,无法实现快速、连续的压力测试,降低了测试的效率和准确性
[0034]本发明实施例的技术方案基于Node.js环境通过使用wrtc npm包提供的独立WebRTC模块创建与所述注册信息的数目相应数量的Worker实例和与每一所述Worker实例对应的RTCPeerConnection实例,并从而针对每一Worker实例建立与IPPBX的独立实时通话,实现了模拟多个用户对IPPBX进行通话压力测试;
Smart Images

Figure CN117201376B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, and in particular to a WebRTC-based method, apparatus, and storage medium for IPPBX call stress testing. Background Technology
[0002] Currently, IPPBXs, or IP-PBXs, as enterprise communication solutions, need to withstand high loads and high-concurrency calls. Stress testing is required to verify the call performance of an IPPBX. However, current WebRTC-based IPPBX call stress testing methods have the following problems:
[0003] The testing environment is highly dependent and resource-intensive: The WebRTC API is provided by the Google kernel, and completing WebRTC call testing requires a browser with the Google kernel; when conducting call stress testing, if it is necessary to simulate multiple users making calls at the same time, a corresponding number of browsers are required, which consumes a lot of resources.
[0004] High testing and learning costs: The lack of dedicated tools for testing IPPBX call performance forces testers to manually write and execute test scripts, and to understand and be familiar with the underlying call principles such as WebRTC and SIP protocols, increasing the complexity and workload of testing.
[0005] Call task management is difficult: When conducting stress tests, it is necessary to simulate large-scale concurrent call tasks, but there are no dedicated tools to manage and schedule these tasks, which requires testers to manually control the concurrent execution of tasks, limiting the efficiency and accuracy of the test.
[0006] Test equipment requirements: When performing high-concurrency performance tests on an IPPBX, there are requirements not only for the IPPBX itself, but also for the memory of the client device initiating the call, i.e., the browser.
[0007] Low testing efficiency: The lack of automated testing tools requires testers to perform manual operations and monitoring, making it impossible to achieve fast and continuous stress testing, which reduces the efficiency and accuracy of testing.
[0008] Therefore, there is currently a lack of a WebRTC-based IPPBX call stress testing method on the market that can solve the above problems and is specifically designed for interfacing with IPPBXs, encapsulating SIP packets, and testing their call performance. Summary of the Invention
[0009] The embodiments of the present invention provide a WebRTC-based method for IPPBX call stress testing, providing testers with a simple and effective tool for performing call performance stress testing on IPPBXs.
[0010] To achieve the above objectives, on the one hand, a WebRTC-based IPPBX call stress testing method is provided, including:
[0011] S1, obtain the configuration information for the call stress test. The configuration information includes: connection information with the IPPBX, a registration information list, and call parameters. The registration information list includes multiple registration information entries, each of which corresponds to a simulated user.
[0012] S2, based on the configuration information, using the independent WebRTC module provided by the Node.js package manager npm, a number of Worker instances corresponding to the number of registered information and an RTCPeerConnection instance corresponding to each Worker instance are created. Each Worker instance and its corresponding RTCPeerConnection instance are used to implement independent real-time calls with the IPPBX to simulate multiple users performing call stress tests on the IPPBX.
[0013] Preferably, in the IPPBX call stress testing method, step S2 includes:
[0014] S21, generate a corresponding Worker instance for each piece of registration information in the registration information list;
[0015] S22, Based on the connection information with the IPPBX, create a corresponding UA instance in each Worker instance and generate the corresponding SIP header information;
[0016] S23, For each Worker instance, establish a WebSocket connection with the IPPBX;
[0017] S24. For each Worker instance, create an RTCPeerConnection instance and a corresponding offer object, and generate the corresponding SDP information.
[0018] S25, establish a call connection with the IPPBX using the UA instance, SIP header information, RTCPeerConnection instance and corresponding SDP information corresponding to each Worker instance.
[0019] Preferably, the IPPBX call stress testing method further includes:
[0020] After the call with the IPPBX ends, close the RTCPeerConnection connection and delete the RTCPeerConnection instance.
[0021] Preferably, in the IPPBX call stress testing method, the connection information with the IPPBX includes: the IPPBX address, the IPPBX port, the STUN address, and / or the TUN address.
[0022] Preferably, in the IPPBX call stress testing method, the call parameters include: call interval time; and the method further includes: after the call with the IPPBX ends, repeatedly initiating calls with the IPPBX according to the call interval time.
[0023] Preferably, in the IPPBX call stress testing method, the call parameters include: registration expiration time; wherein, step S25 includes:
[0024] Registration process: The UA instance sends a registration packet to the IPPBX, which includes the registration expiration time. After receiving a 401 response, it sends a SIP registration request to the IPPBX again with a registration packet containing authentication information. After receiving a 200 OK response, it repeats the above steps of sending registration packets periodically according to the registration expiration time.
[0025] Initiating a call: The UA instance sends an INVITE packet to the IPPBX. After receiving a 401 response, it sends another INVITE packet with authentication information, wherein the INVITE packet includes the SDP information.
[0026] Call establishment: After receiving the 200 OK reply from the IPPBX, the UA instance extracts the packet body of the 200 OK reply packet as the response SDP, and sends the response SDP to the RTCPeerConnection instance. At this time, the call is successfully established.
[0027] Call End: The call ends when the Worker instance receives a bye message from the IPPBX.
[0028] Preferably, the IPPBX call stress testing method further includes, after sending the response sdp to the RTCPeerConnection instance:
[0029] The WebRTC module creates an RTCSessionDescription object, processes the response sdp through RTCSessionDescription.setRemoteDescription, and the RTCPeerConnection instance performs connectivity detection on the interactive connection establishment ICE address provided in the response sdp to establish an audio and video stream channel with the IPPBX. The RTCPeerConnection instance then sends and / or receives RTP streams in the channel.
[0030] Preferably, in the IPPBX call stress testing method, in step S1, the configuration information is obtained by reading a configuration file.
[0031] On the other hand, a WebRTC-based IPPBX call stress testing device is provided, including a memory and a processor, wherein the memory stores at least one program, which is executed by the processor to implement any of the methods described above.
[0032] In another aspect, a computer-readable storage medium is provided, wherein the storage medium stores at least one program that is executed by a processor to implement any of the methods described above.
[0033] The above technical solution has the following technical effects:
[0034] The technical solution of this invention is based on the Node.js environment and uses the independent WebRTC module provided by the wrtc npm package to create a number of Worker instances corresponding to the number of registered information and an RTCPeerConnection instance corresponding to each Worker instance. Thus, an independent real-time call is established between each Worker instance and the IPPBX, thereby simulating multiple users to perform call stress tests on the IPPBX.
[0035] A further embodiment of the present invention can be implemented as a testing tool, namely WebRTC-Test-Tool, which has the following advantages:
[0036] Flexibility: This solution is based on Node.js, which allows it to run on different operating systems and can be distributed as an executable file, such as WebRTC-Test-Tool, which can be made into an executable file using pkg or as an npm package; therefore, it can be deployed and executed in a variety of environments.
[0037] Ease of use: Users only need to fill in the necessary test configuration information according to the preset configuration template, and can execute call tasks through simple commands, which greatly reduces the user threshold;
[0038] Completeness: It can complete interaction and communication with IPPBX, handle SIP registration, encapsulate and parse SIP packets, establish WebRTC connections, transmit audio and video, and perform heartbeat detection, thus realizing a complete call process.
[0039] Capable of stress testing: By utilizing the multi-threading features of Node.js and implementing loop calls, the solution of this embodiment of the invention can continuously and simultaneously initiate multiple call tasks over a period of time, simulating high-concurrency scenarios and continuously applying pressure to the IPPBX to test the stability and load capacity of the IPPBX.
[0040] Saves equipment resources: Traditionally, to test an IPPBX, multiple devices may be needed to simulate a large-scale concurrent call load. Each device needs to have corresponding software and tools installed and configured, which increases the number of devices and the complexity of maintenance. However, using the solution of this invention, only a Node.js environment needs to be installed on one machine, and the IPPBX can be tested by installing it through the package manager npm or by directly using the executable file.
[0041] Using the technical solution of this invention, testers can conveniently and efficiently simulate multi-threaded concurrent call tasks and record call quality indicators to evaluate the performance and stability of IPPBX. Attached Figure Description
[0042] Figure 1 This is a flowchart illustrating an embodiment of the WebRTC-based IPPBX call stress testing method of the present invention.
[0043] Figure 2 This is an overall schematic diagram of the WebRTC-Test-Tool implemented using a testing method according to an embodiment of the present invention;
[0044] Figure 3 This is a flowchart illustrating an IPPBX call stress testing method according to an embodiment of the present invention.
[0045] Figure 4 This is a schematic diagram of the call establishment process between the WebRTC module and the IPPBX in an IPPBX call stress testing method according to an embodiment of the present invention. Detailed Implementation
[0046] To further illustrate the various embodiments, the present invention provides accompanying drawings. These drawings are part of the disclosure of the present invention, primarily used to illustrate the embodiments and to explain the operating principles of the embodiments in conjunction with the relevant descriptions in the specification. With reference to these drawings, those skilled in the art should be able to understand other possible implementations and the advantages of the present invention. Components in the drawings are not drawn to scale, and similar component symbols are generally used to represent similar components.
[0047] The present invention will now be further described in conjunction with the accompanying drawings and specific embodiments.
[0048] Example 1:
[0049] Figure 1 This is a flowchart illustrating an embodiment of the WebRTC-based IPPBX call stress testing method of the present invention. Figure 1 This invention provides a WebRTC-based method for IPPBX call stress testing, including:
[0050] S1, obtain the configuration information for the call stress test. The configuration information includes: connection information with the IPPBX, a list of registration information, and call parameters. The list of registration information includes multiple registration information entries, each of which corresponds to a simulated user.
[0051] S2, based on the configuration information and the Node.js environment, uses the independent WebRTC module provided by the npm package manager to create a number of Worker instances and an RTCPeerConnection instance corresponding to the number of registered information. Each Worker instance and its corresponding RTCPeerConnection instance are then used to implement independent real-time calls with the IPPBX to simulate multiple users performing call stress tests on the IPPBX.
[0052] The solution of this invention is based on the Node.js environment. It establishes real-time audio and video communication through the WebRTC module provided by the wrtc npm package, and combines WebSocket and SIP protocols to realize the establishment of connection with IPPBX, encapsulation, sending, receiving and parsing of SIP packets. It utilizes the asynchronous non-blocking and multi-threaded features provided by Node.js to realize network communication and high-concurrency task scenarios, so as to achieve the purpose of stress testing the performance and stability of IPPBX.
[0053] Example 2:
[0054] The WebRTC-based IPPBX call stress testing method of this invention can be implemented as a testing tool, for example, named WebRTC-Test-Tool. This WebRTC-Test-Tool is based on a Node.js environment and uses the independent WebRTC module provided by the wrtc npm package to establish real-time communication with the IPPBX. Within WebRTC-Test-Tool, SIP packets are encapsulated and parsed based on the SIP protocol, and WebSocket technology is used to complete message sending and receiving with the IPPBX. WebRTC-Test-Tool provides testers with a simple and effective tool for stress testing the call performance of an IPPBX. Through this tool, testers can simulate multi-threaded concurrent call tasks and record call quality metrics, thereby evaluating the performance and stability of the IPPBX.
[0055] Figure 2 This is a schematic diagram illustrating the overall usage of the WebRTC-Test-Tool implemented using the testing method of this embodiment of the invention. Figure 2 Users can install and run the WebRTC-Test-Tool using the Node.js package manager NPM and by calling the corresponding execution commands, enabling communication with the IPPBX. The WebRTC-Test-Tool executes call tasks and performs SIP signaling and media transmission with the IPPBX based on the test configuration information set in the configuration file, thereby conducting load testing and stress testing. Users can adjust the parameters in the configuration file to meet specific testing requirements. Preferably, in step S1, the configuration information is obtained by reading the configuration file.
[0056] The following provides a detailed description of the use and operation of the WebRTC-Test-Tool implemented using the testing method of this invention.
[0057] 1) WebRTC-Test-Tool is installed via npm as a CLI (command-line tool). The command `webrtc-test-tool` is used to start and execute the program. Example commands are shown in Table 1 below:
[0058]
[0059]
[0060] Table 1
[0061] The above-described test tool commands in this embodiment are not restrictive. Those skilled in the art can adjust the specific letters, characters, or text used according to specific needs and actual application scenarios.
[0062] 2) After installing the WebRTC-Test-Tool or webrtc-test-tool tool of this embodiment at the target location, execute the webrtc-test-tool gettpl command to create a configuration file template in the target path. Configure complete test information by supplementing the field values in the template. The description of the template field values is shown in Table 2 below:
[0063]
[0064]
[0065] Table 2
[0066] After the fields are filled in, by executing the command webrtc-test-tool-p. / config.json or other pre-defined commands, webrtc-test-tool will complete the creation of WebRTC instance, multi-threaded task, and call task based on the configuration information in the configuration file.
[0067] Figure 3 This is a flowchart illustrating the IPPBX call stress testing method according to an embodiment of the present invention. The flowchart describes the execution flow of the WebRTC-Test-Tool testing tool implemented using the IPPBX call stress testing method of this embodiment.
[0068] like Figure 3 Run the WebRTC-Test-Tool to read the pre-configured configuration file, retrieve the registration information from the registration information list in sequence, and then:
[0069] Create a corresponding Worker instance for each piece of registration information in the registration information list;
[0070] Based on the connection information with the IPPBX, a corresponding UA instance is created in each Worker instance and the corresponding SIP header information is generated.
[0071] For each Worker instance, establish a WebSocket connection with the IPPBX;
[0072] After a successful connection, for each Worker instance, an RTCPeerConnection instance (referred to as RTCPeer instance) and a corresponding offer object are created, and the corresponding SDP information is generated.
[0073] Establish a call connection with the IPPBX using the UA instance, SIP header information, RTCPeerConnection instance, and corresponding SDP information for each Worker instance.
[0074] In one specific implementation, the call parameters in the configuration information include: registration expiration time, for example, described by the registerExpires field in the configuration file; wherein, the steps for establishing a call connection with the IPPBX include:
[0075] Determine whether the corresponding UA instance has already registered with the IPPBX; if so, initiate an INVITE packet with SDP information; otherwise, send a registration packet to the IPPBX to complete the initial registration, and then initiate an INVITE packet with SDP information; the above steps of sending registration packets are repeated periodically according to the registration expiration time.
[0076] When the IPPBX responds with a 200 OK response, the call between the UA instance and the IPPBX is established.
[0077] When the Websocket instance in the Worker instance receives the BYE packet sent by the IPPBX, the call ends.
[0078] Close the RTCpeer connection and delete the corresponding RTCpeer instance;
[0079] Based on the call interval time in the configuration information, after the call with the IPPBX ends, calls with the IPPBX are initiated cyclically according to the call interval time; for example, the call interval time is described by the resetSecond field; in a specific implementation, the call interval time is counted down, and calls with the IPPBX are initiated cyclically when the countdown ends.
[0080] Example 3:
[0081] Figure 4 This is a schematic diagram illustrating the call establishment process between an IPPBX and a standalone WebRTC module in a Node.js environment, as part of an embodiment of the IPPBX call stress testing method of the present invention. Figure 4 The call establishment process in this embodiment includes the following steps:
[0082] 1. Read the configuration file: WebRTC-Test-Tool first reads the configuration file, which contains connection information with the IPPBX, a list of registration information, call parameters, etc.
[0083] 2. Traverse the registration information list: WebRTC-Test-Tool traverses the registration information list in the configuration file, with each registration information corresponding to a user, i.e., a simulated user;
[0084] 3. Create a Worker instance: Create a Worker instance for each registration information; a Worker is an independent execution unit used to handle a user's call task;
[0085] The WebRTC-Test-Tool consists of a main thread and child threads. The main thread contains the WebRTC module, which provides the WebRTC API. The child threads are created from Worker instances and are primarily used for communication with the IPPBX. The child worker instances and the main thread exchange information mainly through postmessage.
[0086] 4. Create UA instance: In each Worker instance, create a UA (User Agent) instance to handle SIP protocol-related operations, and generate the corresponding SIP header information, as well as REGISTER and INVITE packets, based on the corresponding parameters in the registration information;
[0087] When generating the REGISTER packet, the UA instance adds the username, domain name, authentication information, etc. from the registration information to the SIP message and sets the request method to REGISTER; in this way, the client can send a registration request to the IPPBX to authenticate and register the user.
[0088] When generating the INVITE packet, the UA instance adds call-related information, such as the target username, domain name, and SDP (Session Description Protocol) information, to the SIP message and sets the request method to INVITE. By setting the SDP content, including audio and video parameters, the client can negotiate the call with the IPPBX.
[0089] 5. Create a WebSocket instance and establish a connection: In each Worker instance, create a WebSocket instance and establish a connection with the IPPBX service; WebSocket is used to send and receive SIP signaling and heartbeat messages;
[0090] 6. Create an RTCPeerConnection instance and an offer, then obtain SDP information based on the local descriptor set in the offer. Specifically, each Worker creates an RTCPeerConnection instance, which in turn creates an Offer object. The Offer object generates a local offer SDP, which is placed in the body of the INVITE packet when initiating a call. When the IPPBX replies with an answer SDP, WebRTC creates an RTCSessionDescription object, processes the answer SDP using RTCSessionDescription.setRemoteDescription, and RTCPeerConnection establishes an ICE address for connectivity testing based on the interactive connection provided in the answer SDP. This establishes an audio and video stream channel with the peer, i.e., the IPPBX calling device, and the RTCPeerConnection instance sends and / or receives RTP streams in this channel.
[0091] 7. Registration Processing: The UA instance sends a registration packet (REGISTER packet) to the IPPBX. The registration packet includes the registration expiration time (Expires field). If a 401 response is received, it indicates that authentication information is required. Subsequently, a REGISTER packet with authentication information is sent again to send a SIP registration request to the IPPBX. After receiving a 200 OK response, the above steps are repeated periodically to send registration packets to maintain the instance's activity, based on the Expires field content in the REGISTER packet.
[0092] 8. Initiating a call: The UA instance sends an INVITE packet to the IPPBX to initiate a new call. If a 401 response is received, it indicates that authentication information is required. The UA instance then sends another INVITE packet with authentication information, which includes SDP information.
[0093] 9. Call Establishment: When the UA instance receives the 200 OK reply (i.e., the 200 OK packet) from the IPPBX, it extracts the content of the packet body as the answer SDP and sends the answer SDP to the RTCPeerConnection instance created in step 6 above. At this point, the call is successfully established.
[0094] 10. Call End: When a BYE message is received from the IPPBX, the call has ended. The WebRTC-Test-Tool closes the RTCPeerConnection connection and deletes the RTCPeerConnection instance.
[0095] 11. Looping Calls: Based on the call interval time (resetSecond field) in the configuration file, after the call interval timer expires, return to steps 6, 8, 9, and 10 to repeatedly initiate new calls to achieve long-term call concurrency testing.
[0096] Through the above steps, the method of this embodiment of the present invention, or the apparatus or tool used to implement the method of this embodiment of the present invention, such as WebRTC-Test-Tool, can generate a corresponding number of Worker instances based on the number of registration information in the configuration file. Each Worker instance can independently execute a set of call processes. Utilizing the multi-threading characteristics of Node.js, multiple call tasks can be performed simultaneously, thereby simulating high-concurrency scenarios. Furthermore, WebRTC-Test-Tool can repeatedly execute call tasks through the loop call function. Then, by viewing the usage of the IPPBX, such as memory and performance parameters, continuous testing and stress testing of the IPPBX can be achieved.
[0097] Therefore, the method of this embodiment of the invention realizes worker instances and WebRTC functionality that were originally only possible in a browser through the Node.js environment. Only the Node.js environment needs to be installed on a machine via npm to simulate large-scale concurrent call load based on WebRTC. It is convenient and simple to use, highly efficient, and greatly saves device resources.
[0098] Example 4:
[0099] The present invention also provides an IPPBX call stress testing device based on WebRTC, including a memory and a processor. The memory stores at least one program, which is executed by the processor to implement any of the methods described above.
[0100] Furthermore, as an executable solution, the WebRTC-based IPPBX call stress testing device can be a computer unit, which can be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer unit may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the above-described computer unit structure is merely an example and does not constitute a limitation on the computer unit. It may include more or fewer components, or combine certain components, or use different components. For example, the computer unit may also include input / output devices, network access devices, buses, etc., and this embodiment of the invention does not limit this.
[0101] Furthermore, as an executable solution, the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc. The processor is the control center of the computer unit, connecting various parts of the entire computer unit via various interfaces and lines.
[0102] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the computer unit by running or executing the computer programs and / or modules stored in the memory and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a function; the data storage area may store data created based on the use of the mobile phone, etc. In addition, the memory may include high-speed random access memory and may also include non-volatile memory, such as hard disk, RAM, plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0103] Example 5:
[0104] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method described in the embodiments of the present invention.
[0105] If the modules / units integrated in the computer unit are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), and software distribution media, etc. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction.
[0106] Although the invention has been specifically shown and described in conjunction with preferred embodiments, those skilled in the art will understand that various changes in form and detail may be made to the invention without departing from the spirit and scope of the invention as defined in the appended claims, all of which shall be within the scope of protection of the invention.
Claims
1. A WebRTC-based method for stress testing IPPBX calls, characterized in that, include: S1, obtain the configuration information for the call stress test. The configuration information includes: connection information with the IPPBX, a registration information list, and call parameters. The registration information list includes multiple registration information entries, each of which corresponds to a simulated user. S2, based on the configuration information, using the independent WebRTC module provided by the Node.js package manager npm, a number of Worker instances corresponding to the number of registered information and an RTCPeerConnection instance corresponding to each Worker instance are created. Each Worker instance and its corresponding RTCPeerConnection instance are used to implement independent real-time calls with the IPPBX to simulate multiple users performing call stress tests on the IPPBX.
2. The IPPBX call stress testing method according to claim 1, characterized in that, Step S2 includes: S21, generate a corresponding Worker instance for each piece of registration information in the registration information list; S22, Based on the connection information with the IPPBX, create a corresponding UA instance in each Worker instance and generate the corresponding SIP header information; S23, For each Worker instance, establish a WebSocket connection with the IPPBX; S24. For each Worker instance, create an RTCPeerConnection instance and a corresponding offer object, and generate the corresponding SDP information. S25, establish a call connection with the IPPBX using the UA instance, SIP header information, RTCPeerConnection instance and corresponding SDP information corresponding to each Worker instance.
3. The IPPBX call stress testing method according to claim 2, characterized in that, Also includes: After the call with the IPPBX ends, close the RTCPeerConnection connection and delete the RTCPeerConnection instance.
4. The IPPBX call stress testing method according to claim 1, characterized in that, The connection information with the IPPBX includes: the IPPBX address, IPPBX port, STUN address, and / or TURN address.
5. The IPPBX call stress testing method according to claim 2, characterized in that, The call parameters include: call interval time; wherein, the method further includes: after the call with the IPPBX ends, repeatedly initiating calls with the IPPBX according to the call interval time.
6. The IPPBX call stress testing method according to claim 2, characterized in that, The call parameters include: registration expiration time; wherein, step S25 includes: Registration process: The UA instance sends a registration packet to the IPPBX, which includes the registration expiration time. After receiving a 401 response, it sends a SIP registration request to the IPPBX again with a registration packet containing authentication information. After receiving a 200 OK response, it repeats the above steps of sending registration packets periodically according to the registration expiration time. Initiating a call: The UA instance sends an INVITE packet to the IPPBX. After receiving a 401 response, it sends another INVITE packet with authentication information, wherein the INVITE packet includes the SDP information. Call establishment: After receiving the 200 OK reply from the IPPBX, the UA instance extracts the packet body of the 200 OK reply packet as the response SDP, and sends the response SDP to the RTCPeerConnection instance. At this time, the call is successfully established. Call End: The call ends when the Worker instance receives a bye message from the IPPBX.
7. The IPPBX call stress testing method according to claim 6, characterized in that, After the response sdp is sent to the RTCPeerConnection instance, the following is also included: The WebRTC module creates an RTCSessionDescription object, processes the response sdp through RTCSessionDescription.setRemoteDescription, and the RTCPeerConnection instance performs connectivity detection on the interactive connection establishment ICE address provided in the response sdp to establish an audio and video stream channel with the IPPBX. The RTCPeerConnection instance then sends and / or receives RTP streams in the channel.
8. The IPPBX call stress testing method according to claim 1, characterized in that, In step S1, the configuration information is obtained by reading the configuration file.
9. A WebRTC-based IPPBX call stress testing device, characterized in that, The method includes a memory and a processor, the memory storing at least one program, the at least one program being executed by the processor to implement the method as described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, The storage medium stores at least one program segment, which is executed by a processor to implement the method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
WebRTC audio and video call function integration method, terminal equipment and storage medium
CN116743715A
Load testing for IP PBX systems
US20040032833A1