[go: up one dir, main page]

CN117201376A - IPPBX call pressure test method, device and medium based on WebRTC - Google Patents

IPPBX call pressure test method, device and medium based on WebRTC Download PDF

Info

Publication number
CN117201376A
CN117201376A CN202311271997.XA CN202311271997A CN117201376A CN 117201376 A CN117201376 A CN 117201376A CN 202311271997 A CN202311271997 A CN 202311271997A CN 117201376 A CN117201376 A CN 117201376A
Authority
CN
China
Prior art keywords
call
instance
ippbx
information
pbx
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311271997.XA
Other languages
Chinese (zh)
Inventor
陈文团
曾泉清
林文彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiamen Yeastar Digital Technology Co ltd
Original Assignee
Xiamen Yeastar Digital Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xiamen Yeastar Digital Technology Co ltd filed Critical Xiamen Yeastar Digital Technology Co ltd
Priority to CN202311271997.XA priority Critical patent/CN117201376A/en
Publication of CN117201376A publication Critical patent/CN117201376A/en
Pending legal-status Critical Current

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a method, a device and a medium for testing the talking pressure of an IPPBX based on WebRTC, wherein the method comprises the following steps: s1, obtaining configuration information of a call pressure test; s2, based on node. Js environment, creating a number of workbench instances corresponding to the number of registered information and RTCPeERConnection instances corresponding to each workbench instance by using an independent WebRTC module provided by a node. Js package manager npm according to configuration information, and realizing independent real-time call with the IPPBX by using each workbench instance and the corresponding RTCPeeERConnection instance so as to simulate a plurality of users to carry out call pressure test on the IPPBX. By utilizing the technical scheme, the workbench instance and the webrtc function which can be realized only on a browser originally can be realized through the nodejs environment, and the large-scale concurrent call load can be simulated based on the webrtc by only installing the node.js environment on one machine through npm.

Description

IPPBX call pressure test method, device and medium based on WebRTC
Technical Field
The invention relates to the technical field of communication, in particular to an IPPBX call pressure testing method and device based on WebRTC and a storage medium.
Background
Currently, IP PBX or IP-PBX as an enterprise communication solution is subject to high load and high concurrency talk. In order to verify the talk performance of an ip pbx, a stress test is required. However, the current WebRTC-based ip pbx talk pressure test approach has the following problems:
the test environment is highly dependent and the resource consumption is large: the WebRTC API is provided by the google kernel, and a browser relying on the google kernel is required to complete the call test of WebRTC; when the call pressure test is carried out, if a plurality of users need to be simulated to make calls at the same time, a plurality of corresponding browsers are needed, so that a large amount of resources are consumed;
the test learning cost is high: the lack of tools specially used for testing the ip pbx call performance makes it necessary for testers to manually write and execute test scripts, and to know and become familiar with the underlying principles of WebRTC protocol and SIP protocol, thus increasing the complexity and workload of testing;
call task management is difficult: when performing pressure testing, large-scale concurrent call tasks need to be simulated, but no special tools are needed to manage and schedule the tasks, so that testers need to manually control the concurrent execution of the tasks, and the efficiency and accuracy of the testing are limited.
Test equipment requirements: when high concurrency performance test of the IPPBX is completed, not only is the requirement on the IPPBX met, but also high requirements exist in equipment where a client side initiating a call, namely a browser, is located;
the test efficiency is low: the lack of automatic testing tools requires manual operation and monitoring by testers, so that rapid and continuous pressure testing cannot be realized, and the testing efficiency and accuracy are reduced.
Thus, there is currently a lack of WebRTC-based ip pbx call pressure testing methods on the market that address the above problems and are specifically used to interface with an ip pbx, encapsulate SIP packets, and test their call performance.
Disclosure of Invention
The embodiment of the invention provides a WebRTC-based ip pbx call pressure testing method, which provides a simple and effective tool for testing the call performance pressure of an ip pbx for testers.
In order to achieve the above object, in one aspect, an ip pbx call pressure testing method based on WebRTC is provided, including:
s1, obtaining configuration information of a call pressure test, wherein the configuration information comprises: connection information, a registration information list and call parameters with the IPPBX, wherein the registration information list comprises a plurality of registration information, and each registration information corresponds to a simulated user;
s2, based on node. Js environment, creating a corresponding number of work instances and RTCPeerconnection instances corresponding to each work instance by using an independent WebRTC module provided by a node. Js package manager npm according to the configuration information, and realizing independent real-time call with the IPPBX by using each work instance and the corresponding RTCPeerconnection instance so as to simulate a plurality of users to test call pressure of the IPPBX.
Preferably, the ip pbx call pressure testing method, the step S2 includes:
s21, generating a corresponding workbench instance aiming at each piece of registration information in the registration information list;
s22, creating corresponding UA examples in each workbench example according to the connection information of the IPPBX and generating corresponding SIP header information;
s23, establishing WebSocket connection with the IPPBX for each workbench example;
s24, establishing an RTCPeerConnection instance and a corresponding offer object aiming at each workbench instance, and generating corresponding SDP information;
s25, establishing call connection with the IPPBX by using the UA instance, the SIP header information, the RTCPeerconnection instance and the corresponding SDP information corresponding to each workbench instance.
Preferably, the ip pbx call pressure testing method further includes:
after the call with the ip pbx is ended, the rtcp eerconnection connection is closed and the rtcp eerconnection instance is deleted.
Preferably, the ip pbx call pressure testing method, wherein the connection information with the ip pbx includes: ip pbx address, ip pbx port, stun address, and/or turn address.
Preferably, the ip pbx call pressure testing method, wherein the call parameters include: calling interval time; wherein the method further comprises: after the call with the IPPBX is ended, the call with the IPPBX is initiated according to the call interval time cycle.
Preferably, the ip pbx call pressure testing method, wherein the call parameters include: registering an expiration time; wherein, the step S25 includes:
registration processing: the UA instance sends a registration packet to the IPPBX, wherein the registration packet comprises the registration expiration time, and after receiving 401 reply, the UA instance sends an SIP registration request to the IPPBX through the registration packet with authentication information; after receiving 200ok reply, repeating the step of sending the registration packet at regular time according to the registration expiration time;
initiating a call: the UA instance sends an INVITE packet to the IPPBX, and after receiving 401 reply, the INVITE packet with authentication information is passed again, wherein the INVITE packet comprises the SDP information;
and (3) call establishment: after receiving a 200OK reply returned by the IPPBX, the UA instance intercepts the inclusion content of a 200OK reply packet as a response sdp, and sends the response sdp to the RTCPeerConnection instance, and the call is established successfully;
and (3) ending the call: when the Worker instance receives the bye message of the IPPBX, the call ends.
Preferably, the ip pbx call pressure testing method further includes, after sending the response sdp to the rtcp ererconnection instance:
creating an RTCSessionDescription object by the WebRTC module, processing the response sdp by the RTCSessionDescription, and carrying out connectivity detection on an interactive connection establishment ice address provided in the response sdp by the RTCPeeerConnection instance so as to establish an audio and video stream channel with the IPPBX, and sending and/or receiving RTP streams in the channel by the RTCPeeerConnection instance.
Preferably, in the ip pbx call pressure test method, in step S1, the configuration information is obtained by reading a configuration file.
In another aspect, a WebRTC-based ip pbx call pressure testing apparatus is provided that includes a memory and a processor, the memory storing at least one program that is executed by the processor to implement a method as set forth in any one of the preceding claims.
In yet another aspect, a computer readable storage medium is provided, wherein the storage medium has stored therein at least one program that is executed by a processor to implement a method as described in any of the above.
The technical scheme has the following technical effects:
the technical scheme of the embodiment of the invention establishes a corresponding number of workbench examples and RTCPeerconnection examples corresponding to each workbench example based on node. Js environment by using an independent WebRTC module provided by a wrtc npm package, thereby establishing independent real-time call with the IPPBX for each workbench example and realizing simulating a plurality of users to carry out call pressure test on the IPPBX;
the scheme of the further embodiment of the invention can be realized as a testing Tool, namely WebRTC-Test-Tool, which has the following advantages:
flexibility: the solution is based on node. Js so that it can run on different operating systems and can be distributed in the form of executable files, e.g. WebRTC-Test-Tool can be made into executable files using pkg or using npm packages; it can be deployed and executed in a wide variety of environments;
ease of use: the user only needs to fill in necessary test configuration information according to a preset configuration template, and can execute a call task through a simple command, so that the threshold of the user is greatly reduced;
integrity: interaction and communication with the IPPBX can be completed, SIP registration, packaging and SIP packet analysis can be processed, webRTC connection is established, audio and video transmission is performed, heartbeat detection and other operations are performed, and a complete call flow is realized.
The pressure test capability is provided: by utilizing the multithreading characteristic of node. Js and by realizing cyclic calling, the scheme of the embodiment of the invention can continuously and simultaneously initiate a plurality of calling tasks within a period of time, simulate a high concurrency scene and continuously apply pressure to the IPPBX so as to test the stability and the load capacity of the IPPBX;
saving equipment resources: conventionally, in order to perform hanging test on an ip pbx, multiple devices may be required to simulate a large-scale concurrent call load, so that each device needs to install and configure corresponding software and tools, increasing the number of devices and complexity of maintenance; by using the scheme of the embodiment of the invention, the hanging test of the IPPBX can be completed by only installing node. Js environment on one machine and installing or directly using an executable file through a packet manager npm.
By using the technical scheme of the embodiment of the invention, a tester can conveniently and efficiently simulate the multi-thread concurrent call task, record the call quality index and evaluate the performance and stability of the IPPBX.
Drawings
FIG. 1 is a flow chart of a method for testing IP PBX call pressure based on WebRTC according to an embodiment of the invention;
FIG. 2 is a schematic overall diagram of the use of WebRTC-Test-Tool implemented using the Test method according to an embodiment of the present invention;
FIG. 3 is a flow chart illustrating a method for testing IPPBX call pressure according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a call setup flow between the WebRTC module and the ip pbx in the ip pbx call pressure test method according to an embodiment of the invention.
Detailed Description
For further illustration of the various embodiments, the invention is provided with the accompanying drawings. The accompanying drawings, which are incorporated in and constitute a part of this disclosure, illustrate embodiments and together with the description, serve to explain the principles of the embodiments. With reference to these matters, one of ordinary skill in the art will understand other possible embodiments and advantages of the present invention. The components in the figures are not drawn to scale and like reference numerals are generally used to designate like components.
The invention will now be further described with reference to the drawings and detailed description.
Embodiment one:
fig. 1 is a flowchart of an ip pbx call pressure testing method based on WebRTC according to an embodiment of the invention. Referring to fig. 1, the embodiment of the invention provides an ip pbx call pressure testing method based on WebRTC, which includes:
s1, obtaining configuration information of a call pressure test, wherein the configuration information comprises: connection information with the IPPBX, a registration information list and call parameters, wherein the registration information list comprises a plurality of registration information, and each registration information corresponds to a simulated user;
s2, based on node. Js environment, creating a number of workbench instances corresponding to the number of registered information and RTCPeERConnection instances corresponding to each workbench instance by using an independent WebRTC module provided by a node package manager npm according to configuration information, and realizing independent real-time call with the IPPBX by using each workbench instance and the corresponding RTCPeeERConnection instance so as to simulate a plurality of users to carry out call pressure test on the IPPBX.
The scheme of the embodiment of the invention is based on node. Js environment, establishes real-time audio and video communication through a WebRTC module provided by a wrtc npm packet, and combines a WebSocket and an SIP protocol to realize connection establishment with an IPPBX, encapsulation, transmission, reception and analysis of the SIP packet; the asynchronous non-blocking and multithreading characteristics provided by node. Js can be used for realizing network communication and high concurrency task scenes so as to achieve the aim of pressure measurement on the performance and stability of the IPPBX.
Embodiment two:
the WebRTC-based ip pbx call pressure Test method of the embodiments of the present invention may be implemented as a hang-up Tool, for example, the name of which may be WebRTC-Test-Tool. The WebRTC-Test-Tool is based on the node. Js environment, and establishes real-time communication with the ip pbx using a separate WebRTC module creation provided by the wrtc npm package. The encapsulation and the parsing of the SIP packet are completed based on the SIP protocol in the WebRTC-Test-Tool, and the message sending and receiving of the IPPBX are completed by combining the WebSocket technology. WebRTC-Test-Tool provides a simple and effective Tool for testers to conduct pressure testing of ip pbx call performance. Through the tool, a tester can simulate a multi-thread concurrent call task and record a call quality index, so that the performance and stability of the IPPBX are evaluated.
FIG. 2 is an overall schematic diagram of the use of WebRTC-Test-Tool implemented using the Test method of the present invention. As shown in FIG. 2, the user can complete the installation and operation of the WebRTC-Test-Tool and realize the intercommunication with the IPPBX by the packet manager NPM of node. Js and invoking the corresponding execution command. The WebRTC-Test-Tool performs a call task and performs SIP signaling and media transmission with the ip pbx according to the Test configuration information set in the configuration file, thereby performing a hanging Test and a pressure Test. The user can adjust the parameters of the configuration file as needed to meet specific test requirements. Preferably, in step S1, the configuration information is obtained by reading a configuration file.
The use and operation of WebRTC-Test-Tool implemented using the Test method of the embodiment of the present invention is described in detail below.
1) WebRTC-Test-Tool is installed as cli, a command line Tool through npm, using the command WebRTC-Test-Tool to launch and execute programs, an exemplary command is shown in Table 1 below:
TABLE 1
The above-described test tool usage command of this embodiment is not limited, and one of ordinary skill in the art can adjust the specific letters, characters or words used according to the specific needs and actual application scenario.
2) After the WebRTC-Test-Tool or webtc-Test-Tool of the embodiment of the present invention is installed at the target location, executing the webtc-Test-Tool gettpl command creates a configuration file template under the target path, and configures complete Test information by supplementing field values in the template, wherein the description of the template field values is as shown in table 2 below:
TABLE 2
After the field is filled, the webtc-test-tool completes the instance creation, the multithreading task creation and the conversation task creation of WebRTC according to the configuration information in the configuration file by executing a webtc-test-tool-p./configuration.
Fig. 3 is a flow chart of an ip pbx call pressure testing method according to the embodiment of the invention. The flow chart describes the execution flow chart of the WebRTC-Test-Tool Test Tool implemented using the ip pbx call pressure Test method of the embodiment of the present invention.
As shown in fig. 3, the WebRTC-Test-Tool Test Tool is run to read a preset configuration file, sequentially extract the registration information in the registration information list, and then:
creating a corresponding workbench instance for each registration message in the registration message list;
creating corresponding UA examples in each workbench example according to the connection information with the IPPBX and generating corresponding SIP header information;
establishing WebSocket connection with the IPPBX for each workbench example;
after the connection is successful, establishing an RTCPeerConnection instance abbreviated as an RTCPeer instance and a corresponding offer object for each workbench instance, and generating corresponding SDP information;
and establishing call connection with the IPPBX by using the UA instance, the SIP header information, the RTCPeerConnection instance and the corresponding SDP information corresponding to each workbench instance.
In a specific implementation, the call parameters in the configuration information include: registering the expiration time, for example, by describing the value of the registration expiration time through a registerExpires field in the configuration file; wherein, the step of establishing the call connection with the IPPBX comprises the following steps:
judging whether the corresponding UA instance is registered with the IPPBX; if yes, initiating an INVITE packet with SDP information; otherwise, sending a registration packet to the IPPBX to finish the first registration, and then initiating an INVITE packet with SDP information; wherein, according to registering the expiration time, repeat the step to send registration packet above-mentioned regularly;
when the IPPBX responds 200ok, the UA instance establishes a call with the IPPBX;
ending the call when the Websocket instance in the workbench instance receives a BYE packet sent by the IPPBX;
closing the RTCpeer connection and deleting the responsive RTCpeer instance;
according to the calling interval time in the configuration information, after the call with the IPPBX is ended, circularly initiating the call with the IPPBX according to the calling interval time; illustratively, the call interval time is described by a resetSecond field; in one embodiment, the call is initiated by counting down the time between calls and cycling the ip pbx at the end of the count.
Embodiment III:
fig. 4 is a schematic diagram of a call setup procedure between an ip pbx and an ip pbx using a separate WebRTC module based on a node. Js environment in an ip pbx call pressure test method according to an embodiment of the invention. As shown in fig. 4, the call establishment of this embodiment includes the steps of:
1. reading a configuration file: the WebRTC-Test-Tool reads a configuration file firstly, wherein the configuration file comprises connection information, a registration information list, call parameters and the like of the IPPBX;
2. traversing the registration information list: traversing a registration information list in the configuration file by using WebRTC-Test-Tool, wherein each registration information corresponds to one user, namely a simulation user;
3. creating a workbench example: creating a workbench instance for each registration message; the workbench is an independent execution unit and is used for processing a call task of a user;
the WebRTC-Test-Tool is divided into a main thread and a sub thread, wherein the main thread is provided with a WebRTC module for providing a WebRTC API, and the sub thread is generated for a workbench example and is mainly used for establishing communication with an IPPBX. Information transfer is carried out between the child thread workbench instance and the main thread mainly through postmessage;
4. creating UA instance: in each workbench instance, a UA (User Agent) instance is created for processing the related operation of the SIP protocol, and corresponding SIP header information is generated according to the corresponding parameters in the registration information, and a REGISTER packet and an INVITE packet are formed;
when generating a REGISTER packet, the UA instance adds a user name, a domain name, authentication information, etc. in the registration information to the SIP message, and sets the request method as REGISTER; thus, the client can send a registration request to the IPPBX to authenticate and register the user;
when generating the INVITE packet, the UA embodiment adds call-related information, such as a destination user name, a domain name, SDP (session description protocol ) information, etc., to the SIP message, and sets the request method as INVITE; the client can negotiate with the IPPBX for communication by setting the SDP content including audio and video parameters and the like;
5. creating a WebSocket instance and establishing a connection: creating a WebSocket instance in each workbench instance, and establishing connection with the IPPBX service; webSocket is used for sending and receiving SIP signaling and heartbeat packet messages;
6. an rtcp ererconnection instance is created and an offer is created, and then SDP information is acquired according to the local descriptor of the offer setting. Specifically, each Worker creates an rtcp connection instantiation object, thereby creating an Offer object, where the Offer object generates a local Offer dp, and the Offer dp is placed in a body of an INVITE packet when the ip pbx replies with a response dp, that is, an answer dp, and when the WebRTC creates an rtcp ess description object, the answer dp is processed by the rtcp device, and connectivity detection is performed by the rtcp connection to an interactive connection establishment ice address provided in the answer dp, so as to establish an audio and video stream channel with an opposite-end ip pbx call device, and an RTP stream is transmitted and/or received in the channel by the rtcp connection instance;
7. registration processing: the UA instance sends a registration packet, namely a REGISTER packet, to the IPPBX, wherein the registration packet comprises the content of a registration expiration time, namely an expire field, and if a 401 reply is received, the UA instance indicates that authentication information needs to be carried, and then the REGISTER packet with the authentication information is sent again so as to send a SIP registration request to the IPPBX; after receiving the 200ok reply, the steps are repeated at regular time according to the content of the expire field in the REGISTER packet, and the REGISTER packet is sent for survival;
8. initiating a call: the UA instance sends an INVITE packet to the IPPBX to initiate a new call, if a 401 reply is received, the INVITE packet with authentication information is needed to be carried, and then the INVITE packet with authentication information is sent again, wherein the INVITE packet comprises SDP information;
9. and (3) call establishment: after the UA instance receives 200OK reply of IPPBX, namely 200OK packet, intercept the content of the packet body part as answer SDP, and send the answer SDP to RTCPeerconnection instance that the above-mentioned step 6 creates, the conversation is established successfully at this moment;
10. and (3) ending the call: and when receiving the BYE message of the IPPBX, indicating that the call is ended. WebRTC-Test-Tool closes the rtcp eerconnection connection and deletes the rtcp eerconnection instance.
11. And (3) loop calling: and (3) according to the calling interval time, namely resetSecond field, in the configuration file, after the timing of the calling interval time is reached, returning to and executing the steps 6, 8, 9 and 10, and repeatedly initiating a new call to achieve long-time on-hook call concurrency.
Through the steps, the method of the embodiment of the invention or the device or Tool for realizing the method of the embodiment of the invention, such as WebRTC-Test-Tool, can generate a corresponding number of workbench examples according to the number of registration information in the configuration file, wherein each workbench example can independently execute a set of call flows; by utilizing the multithreading characteristic of node. Js, a plurality of call tasks can be performed simultaneously, so that a high concurrency scene is simulated; and the WebRTC-Test-Tool can repeatedly execute the call task through the cyclic call function, and then can realize continuous hanging Test and pressure Test of the ip pbx by checking the service conditions of the ip pbx, such as memory, performance parameters and the like.
Therefore, the method of the embodiment of the invention realizes the workbench instance and the webrtc function which can only be realized on a browser through the nodejs environment, and can simulate a large-scale concurrent call load based on the webrtc by only installing the node.js environment on one machine through npm, thereby being convenient and simple to use, high in efficiency and greatly saving equipment resources.
Embodiment four:
the invention also provides an IPPBX call pressure testing device based on the WebRTC, which comprises a memory and a processor, wherein the memory stores at least one section of program, and the at least one section of program is executed by the processor to realize the method as described in any one of the above.
Further, as an executable scheme, the WebRTC-based ip pbx call pressure testing device may be a computer unit, and the computer unit may be a computing device such as a desktop computer, a notebook computer, a palm computer, and a cloud server. The computer unit may include, but is not limited to, a processor, a memory. It will be appreciated by those skilled in the art that the constituent structures of the computer unit described above are merely examples of the computer unit and are not limiting, and may include more or fewer components than those described above, or may combine certain components, or different components. For example, the computer unit may further include an input/output device, a network access device, a bus, etc., which is not limited by the embodiment of the present invention.
Further, as an implementation, the processor may be a central processing unit (Central Processing Unit, CPU), other general purpose processor, digital signal processor (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like that is a control center of the computer unit, connecting various parts of the entire computer unit using various interfaces and lines.
The memory may be used to store the computer program and/or modules, and the processor may implement the various functions of the computer unit by running or executing the computer program and/or modules stored in the memory, and invoking data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, at least one application program required for a function; the storage data area may store data created according to the use of the cellular phone, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as a hard disk, memory, plug-in hard disk, smart Media Card (SMC), secure Digital (SD) Card, flash Card (Flash Card), at least one disk storage device, flash memory device, or other volatile solid-state storage device.
Fifth embodiment:
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 above-described method of an embodiment of the present invention.
The modules/units integrated with the computer unit may be stored in a computer readable storage medium if implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the present invention may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a software distribution medium, and so forth. It should be noted that the content of the computer readable medium can be appropriately increased or decreased according to the requirements of the legislation and the patent practice in the jurisdiction.
While the invention has been particularly shown and described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. An ip pbx call pressure test method based on WebRTC, comprising:
s1, obtaining configuration information of a call pressure test, wherein the configuration information comprises: connection information, a registration information list and call parameters with the IPPBX, wherein the registration information list comprises a plurality of registration information, and each registration information corresponds to a simulated user;
s2, based on node. Js environment, creating a corresponding number of work instances and RTCPeerconnection instances corresponding to each work instance by using an independent WebRTC module provided by a node. Js package manager npm according to the configuration information, and realizing independent real-time call with the IPPBX by using each work instance and the corresponding RTCPeerconnection instance so as to simulate a plurality of users to test call pressure of the IPPBX.
2. The ip pbx call pressure testing method according to claim 1, wherein said step S2 comprises:
s21, generating a corresponding workbench instance aiming at each piece of registration information in the registration information list;
s22, creating corresponding UA examples in each workbench example according to the connection information of the IPPBX and generating corresponding SIP header information;
s23, establishing WebSocket connection with the IPPBX for each workbench example;
s24, establishing an RTCPeerConnection instance and a corresponding offer object aiming at each workbench instance, and generating corresponding SDP information;
s25, establishing call connection with the IPPBX by using the UA instance, the SIP header information, the RTCPeerconnection instance and the corresponding SDP information corresponding to each workbench instance.
3. The ip pbx call pressure testing method of claim 2, further comprising:
after the call with the ip pbx is ended, the rtcp eerconnection connection is closed and the rtcp eerconnection instance is deleted.
4. The ip pbx call pressure testing method of claim 1, wherein the connection information with the ip pbx comprises: ip pbx address, ip pbx port, stun address, and/or turn address.
5. The ip pbx call pressure testing method of claim 2, wherein the call parameters include: calling interval time; wherein the method further comprises: after the call with the IPPBX is ended, the call with the IPPBX is initiated according to the call interval time cycle.
6. The ip pbx call pressure testing method of claim 2, wherein the call parameters include: registering an expiration time; wherein, the step S25 includes:
registration processing: the UA instance sends a registration packet to the IPPBX, wherein the registration packet comprises the registration expiration time, and after receiving 401 reply, the UA instance sends an SIP registration request to the IPPBX through the registration packet with authentication information; after receiving 200ok reply, repeating the step of sending the registration packet at regular time according to the registration expiration time;
initiating a call: the UA instance sends an INVITE packet to the IPPBX, and after receiving 401 reply, the INVITE packet with authentication information is passed again, wherein the INVITE packet comprises the SDP information;
and (3) call establishment: after receiving a 200OK reply returned by the IPPBX, the UA instance intercepts the inclusion content of a 200OK reply packet as a response sdp, and sends the response sdp to the RTCPeerConnection instance, and the call is established successfully;
and (3) ending the call: when the Worker instance receives the bye message of the IPPBX, the call ends.
7. The ip pbx call pressure testing method of claim 6, further comprising, after sending the answer dp to the rtcp connection instance:
creating an RTCSessionDescription object by the WebRTC module, processing the response sdp by the RTCSessionDescription, and carrying out connectivity detection on an interactive connection establishment ice address provided in the response sdp by the RTCPeeerConnection instance so as to establish an audio and video stream channel with the IPPBX, and sending and/or receiving RTP streams in the channel by the RTCPeeerConnection instance.
8. The ip pbx call pressure testing method according to claim 1, wherein in step S1, the configuration information is obtained by reading a configuration file.
9. WebRTC-based ip pbx call pressure testing apparatus, comprising 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 of any one of claims 1 to 8.
10. A computer readable storage medium, characterized in that at least one program is stored in the storage medium, the at least one program being executed by a processor to implement the method of any one of claims 1 to 8.
CN202311271997.XA 2023-09-28 2023-09-28 IPPBX call pressure test method, device and medium based on WebRTC Pending CN117201376A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311271997.XA CN117201376A (en) 2023-09-28 2023-09-28 IPPBX call pressure test method, device and medium based on WebRTC

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311271997.XA CN117201376A (en) 2023-09-28 2023-09-28 IPPBX call pressure test method, device and medium based on WebRTC

Publications (1)

Publication Number Publication Date
CN117201376A true CN117201376A (en) 2023-12-08

Family

ID=88996089

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311271997.XA Pending CN117201376A (en) 2023-09-28 2023-09-28 IPPBX call pressure test method, device and medium based on WebRTC

Country Status (1)

Country Link
CN (1) CN117201376A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119052216A (en) * 2024-10-29 2024-11-29 厦门星纵数字科技有限公司 RTP data packet transmission method, medium, product and IPPBX based on IPPBX

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119052216A (en) * 2024-10-29 2024-11-29 厦门星纵数字科技有限公司 RTP data packet transmission method, medium, product and IPPBX based on IPPBX
CN119052216B (en) * 2024-10-29 2024-12-31 厦门星纵数字科技有限公司 RTP data packet transmission method, medium, product and IPPBX based on IPPBX

Similar Documents

Publication Publication Date Title
US7853647B2 (en) Network agnostic media server control enabler
US8429288B2 (en) Massive terminals access of a streaming media server including setting maximum count of file handles allowed to be opened
US11386061B2 (en) Telemetry request system
US20080317238A1 (en) DISTRIBUTED MEDIA RESOURCES IN VoIP NETWORKS FOR PROVIDING SERVICES
US20120233334A1 (en) Shared media access for real time first and third party control
CN105487965A (en) Universal server pressure testing method and device
CN108156223A (en) A kind of accurate supplying system of message based on websocket and method
CN107332857B (en) Network data transmission method, device, system and storage medium
CN117201376A (en) IPPBX call pressure test method, device and medium based on WebRTC
CN109729061B (en) Message processing method, device, equipment and readable storage medium
García‐Dorado et al. Low‐cost and high‐performance: VoIP monitoring and full‐data retention at multi‐Gb/s rates using commodity hardware
WO2021238259A1 (en) Data transmission method, apparatus and device, and computer-readable storage medium
CN106559244A (en) A kind of session service test and management method and system and management end, test lead
Adeyeye et al. Determining the signalling overhead of two common WebRTC methods: JSON via XMLHttpRequest and SIP over WebSocket
CN109525539B (en) A capability invocation method, invocation receipt method, information processing method and system
CN117478524A (en) Method, device, equipment and medium for server simulation test
CN116455879A (en) Method, device, medium and equipment for carrying out NLP real-time test based on fresh and WebRTC technology
CN105260179A (en) Method for achieving flex and servlet interaction
CN114244758A (en) Network diagnosis method, storage medium, electronic device and system of android platform
CN114448841A (en) A network card testing method, device, equipment and medium
CN113992644A (en) Internet of things gateway system based on non-service technology and data processing method thereof
CN113163059A (en) IPPBX performance detection method, terminal device and storage medium
CN110971740A (en) Recording service method, device, medium and terminal equipment
CN118714059B (en) Method, device and storage medium for testing gateway equipment
JP6471459B2 (en) COMMUNICATION DEVICE, LOG PROCESSING PROGRAM, COMMUNICATION SYSTEM, AND LOG PROCESSING METHOD

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination