Method and system for obtaining preset type of telephone based on analysis of SIP network protocol
By configuring detectors and analyzing data flows in the SIP network, the problem of call party judgment errors is solved, and the accuracy and user protection of predetermined types of calls are improved.
Patent Information
- Application Number
- CN202410749539.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2024-10-11
AI Technical Summary
In the prior art, there is a relatively large error in determining whether the calling party belongs to a predetermined type, which affects the accuracy of call restrictions.
By configuring detectors in the network, capture the data flow based on the SIP protocol, obtain the SIP protocol bill, record the communication parties and server information, determine whether all the bill meets the predetermined conditions, obtain the call duration and media stream information, and based on this information Determine whether the server suspected to be a predetermined type is a predetermined type server, and then implement call restrictions.
It improves the accuracy of determining whether the calling party belongs to the predetermined type and enhances the protection of users.
Smart Images

Figure CN118764557A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the network field, and in particular, to a method and system for obtaining a predetermined type of telephone based on analyzing a SIP network protocol. Background Art
[0002] SIP (Session initialization Protocol) is a multimedia communication protocol developed by IETF (Internet Engineering Task Force). It is a text-based application layer control protocol used to create, modify and release sessions of one or more participants. SIP is an IP voice session control protocol originating from the Internet, which has the characteristics of flexibility, easy implementation and easy expansion. With the development of the Internet, nowadays, most calls are made using the SIP protocol, which is a protocol specially designed for IP phones, especially in combination with the Internet. Compared with the traditional H.323 protocol, the SIP protocol has obvious advantages: 1) excellent scalability, which greatly improves the processing power of the system; 2) close integration with the Internet, making communication easier and more convenient; 3) excellent openness, which can not only provide good support for mobile devices such as mobile phones and PDAs, but also can well complete multimedia applications such as online instant communication, voice and video data transmission.
[0003] Currently, there is a possibility that the user's mobile phone number may be leaked. In this case, it is necessary to identify the purpose of the other party of the call. If necessary, the caller with specific behavior will be restricted to ensure the safety of other users. In the prior art, the caller with specific behavior will be identified as a predetermined type, and the caller identified as the predetermined type will be restricted from calling. However, in the prior art, there is a certain error in the judgment of whether the caller belongs to the predetermined type, which affects the accuracy of the judgment. Summary of the invention
[0004] The embodiments of the present application provide a method and system for obtaining a predetermined type of telephone based on analyzing the SIP network protocol, so as to at least solve the problem in the prior art that there is a relatively large error in judging whether a calling party belongs to a predetermined type.
[0005] According to one aspect of the present application, a method for obtaining a predetermined type of telephone based on analyzing a SIP network protocol is provided, comprising: configuring a detector in a network, wherein the detector is used to capture a data stream based on the SIP protocol; obtaining a call sheet of the SIP protocol from the data stream, and determining a server providing the SIP protocol in the network according to the call sheet, wherein information of both parties of communication based on the SIP protocol and information of a server for communication based on the SIP protocol are recorded in the call sheet; for each server, obtaining all call sheets in the server, and determining whether all call sheets meet a predetermined condition; if all call sheets meet the predetermined condition, determining that the server is a server of a suspected predetermined type, wherein the server of the predetermined type provides a predetermined type of telephone, and the initiator of the predetermined type of telephone is subject to call restrictions; obtaining a media stream corresponding to a call whose call duration exceeds a predetermined time in the server of the suspected predetermined type, and determining whether the server of the suspected predetermined type is a server of the predetermined type according to information included in the media stream.
[0006] Furthermore, determining whether the suspected server of the predetermined type is a server of the predetermined type based on the information included in the media stream includes: obtaining the media streams corresponding to all calls in the suspected server of the predetermined type whose duration usually exceeds the predetermined duration; determining whether the media stream corresponding to each call in all calls includes the predetermined information, and determining that the media stream is a media stream of the predetermined type when it includes the predetermined information; and determining whether the suspected server of the predetermined type is a server of the predetermined type based on the number of media streams of the predetermined type.
[0007] Further, based on the number of media streams of the predetermined type, determining whether the suspected server of the predetermined type is a server of the predetermined type includes: when the number of media streams of the predetermined type in the suspected server of the predetermined type exceeds a first threshold, determining that the suspected server of the predetermined type is a server of the predetermined type; wherein the first threshold is determined in advance.
[0008] Furthermore, determining whether the suspected server of the predetermined type is a server of the predetermined type based on the number of media streams of the predetermined type includes: when the ratio of the number of media streams of the predetermined type in the server of the suspected predetermined type to the number of media streams corresponding to all calls exceeds a second threshold, determining that the suspected server of the predetermined type is a server of the predetermined type.
[0009] According to another aspect of the present application, a system for obtaining a predetermined type of telephone based on analyzing a SIP network protocol is also provided, comprising: a configuration module, configured to configure a detector in a network, wherein the detector is used to capture a data stream based on the SIP protocol; a first determination module, configured to obtain a call sheet of the SIP protocol from the data stream, and determine a server providing the SIP protocol in the network according to the call sheet, wherein information of both parties of communication based on the SIP protocol and information of a server for communication based on the SIP protocol are recorded in the call sheet; a second determination module, configured to obtain all call sheets in each server for each server, and determine whether all call sheets meet a predetermined condition; a third determination module, configured to determine that the server is a suspected server of a predetermined type when all call sheets meet the predetermined condition, wherein the server of the predetermined type provides a predetermined type of telephone, and the initiator of the predetermined type of telephone is subject to call restrictions; a fourth determination module, configured to obtain a media stream corresponding to a call whose call duration exceeds a predetermined time in the server of the suspected predetermined type, and determine whether the server of the suspected predetermined type is a server of the predetermined type according to information included in the media stream.
[0010] Furthermore, the fourth determination module is used to: obtain the media streams corresponding to all calls in the server suspected of the predetermined type, whose duration usually exceeds the predetermined duration; determine whether the media stream corresponding to each call in all calls includes the predetermined information, and if it includes the predetermined information, determine that the media stream is a media stream of the predetermined type; and determine whether the server suspected of the predetermined type is a server of the predetermined type based on the number of media streams of the predetermined type.
[0011] Furthermore, the fourth determination module is used to: determine that the suspected server of the predetermined type is a server of the predetermined type when the number of media streams of the predetermined type in the suspected server of the predetermined type exceeds a first threshold; wherein the first threshold is predetermined.
[0012] Furthermore, the fourth determination module is used to determine that the suspected server of the predetermined type is a server of the predetermined type when the ratio of the number of media streams of the predetermined type in the server of the suspected predetermined type to the number of media streams corresponding to all calls exceeds a second threshold.
[0013] According to another aspect of the present application, a server is also provided, comprising a memory and a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the above-mentioned method steps.
[0014] According to another aspect of the present application, a readable storage medium is provided, on which computer instructions are stored, wherein the computer instructions implement the above method steps when executed by a processor.
[0015] In the embodiment of the present application, a detector is configured in the network, wherein the detector is used to capture a data stream based on the SIP protocol; obtain a call sheet of the SIP protocol from the data stream, and determine the server providing the SIP protocol in the network according to the call sheet, wherein the information of the two parties of the communication based on the SIP protocol and the information of the server of the communication based on the SIP protocol are recorded in the call sheet; for each server, all call sheets in the server are obtained to determine whether all call sheets meet the predetermined conditions; if all call sheets meet the predetermined conditions, the server is determined to be a server of a suspected predetermined type, wherein the server of the predetermined type provides a telephone of a predetermined type, and the initiator of the telephone of the predetermined type will be subject to call restrictions; obtain the media stream corresponding to the call whose call duration exceeds the predetermined time in the server of the suspected predetermined type, and determine whether the server of the suspected predetermined type is a server of the predetermined type according to the information included in the media stream. The present application solves the problem of large errors in the judgment of whether the call party belongs to the predetermined type in the prior art, thereby improving the accuracy of judging whether the call party belongs to the predetermined type and strengthening the protection of users. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0017] Figure 1 It is a call diagram using the SIP protocol in the related art;
[0018] Figure 2 It is a flowchart of a method for obtaining a predetermined type of telephone based on analyzing the SIP network protocol according to an embodiment of the present application. DETAILED DESCRIPTION
[0019] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0020] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0021] SIP (Session Initiation Protocol) is an application layer control protocol for multimedia communication on IP networks. It is used to create, modify, and terminate a session process involving one or more participants. It is a communication protocol that defines how communication devices (computers, phones, mobile phones, PDAs, etc.) can be connected and exchange information with each other. SIP is a protocol designed for the Internet. Like the HTTP protocol, it is based on the text UTF-8 character set. It uses a transaction mechanism (request / response mechanism). Each request triggers the operation method of the Server. The request and response constitute a transaction, and the transactions are independent of each other. The SIP protocol is carried on the IP network. The network layer protocol is IP. The transport layer protocol can use TCP or UDP. The UDP protocol is generally used more.
[0022] Figure 1 It is a schematic diagram of a call using the SIP protocol in the related art, such as Figure 1 As shown, the first IP phone (also called the client) sends an invitation message (INVITE), which is sent to a proxy server (Proxy Server). The proxy server (or user proxy server, referred to as UAS) can be referred to as a first proxy server (the proxy server provides support for the SIP protocol, and can also be referred to as a server providing the SIP protocol, referred to as a SIP server). After receiving the invitation message, the first proxy server sends the message to a relocation server (location / Redirect Server). If the invitation message needs to be relocated, the relocation server sends the address of the second proxy server to the first proxy server through Moved Temporarily (temporarily moved message 302). The first proxy server sends a confirmation message (ACK) to the relocation server and sends the invitation message to the second proxy server. The second proxy server sends the invitation message to the second IP phone, and the second IP phone sends a Ringing message (Ringing 180) is sent to the first IP phone through the second proxy server and the first proxy server, and then the confirmation message 200 is sent to the first IP phone through the second proxy server and the first proxy server. After the first IP phone sends the confirmation message (ACK) to the second IP phone through the first proxy server and the second proxy server, the two parties establish a media channel (RTP MEDIAPATH) for communication. After the communication is completed, the second IP phone sends a disconnection message (BYE message). After the first IP phone receives the BYE message, it replies with a 200OK message, and the connection between the two parties is disconnected.
[0023] Combine the following Figure 1 To explain the basic concepts of the SIP protocol.
[0024] Transactions: A SIP transaction consists of a single request and all responses to the request, including zero or more provisional responses and a final response. How to identify a transaction? A transaction can be identified based on the FROM and TO tags and the CALL-ID and CSEQ information. A transaction can also be identified based on the branch value in the VIA header field.
[0025] Dialog: A dialog is a point-to-point SIP relationship between two user agents (UAs) that lasts for a period of time. There can be multiple transactions in a dialog, for example, a dialog can have invite and bye transactions. How to identify a dialog? A dialog is identified by a CALL-ID, a local tag, and a remote tag to ensure that point-to-point dialogs are unique.
[0026] Session: When a session is established by INVITE, a dialog is created based on the response, and when the request / response interaction described by the session is completed, it also creates a session. In other words, a session is an end-to-end concept. Figure 1 You can also use BYE request to end a session.
[0027] The following is an explanation of the message types used in SIP.
[0028] INVITE: used to initiate a new session; ACK: used to complete the establishment of a session; BYE: used to end a session; CANCEL: used to cancel a request (usually for INVITE); OPTIONS: used to query the server's capabilities; REGISTER: used to send a registration request message. In addition to the above methods, there are other extended methods, such as INFO, NOTIFY, etc., which will not be described here one by one.
[0029] The starting line of the SIP response message is the Status-Line, which consists of the protocol version, status code, and status reason phrase, separated by a space character. The SIP protocol defines 6 types of status codes, where the first digit of the status code indicates the response type, and the last two digits indicate the specific response. "1xx" is used below to identify responses with status codes between "100-199".
[0030] 1xx: Provisional response, indicating that the request message is being processed; 2xx: Successful response, indicating that the request has been successfully received, fully understood and accepted; 3xx: Redirection response, indicating that further steps are required to complete the request; 4xx: Client error, indicating that the request message contains syntax error information or the server cannot complete the client request; 5xx: Server error, indicating that the server cannot complete a legal request; 6xx: Global failure, indicating that any server cannot complete the request.
[0031] The following is an explanation of the SIP headers. The From header contains a logical identifier of the initiator of the request, which may be the user's address-of-record. Like the To header, the From header also contains a URI and may contain a display name (sip display info). The To header is the first and foremost "logical" recipient of the request ("first" because it may refer to another recipient). Call-ID is a unique identifier that distinguishes a group of messages in a series of messages. The Call-ID of all requests and all responses of any client in the conversation must be consistent; CSeq consists of a sequence number and a method. The method must be consistent with the request method. It is used to distinguish and serve as the order of transactions; the Via header identifies the transmission device used for transaction transmission and also identifies the address to which the response is sent back. The Via field needs to be included in the header only when it is necessary to reach the next node (hop) by selecting a transmission device; the Contact header provides a contact method for accessing a specific user agent (UA) instance for subsequent requests.
[0032] In the following implementation, a method for obtaining a predetermined type of telephone based on analyzing the SIP network protocol is provided. Figure 2 is a flowchart of a method for obtaining a predetermined type of telephone based on analyzing the SIP network protocol according to an embodiment of the present application. Figure 2 The steps involved are described in detail.
[0033] Step S102: configuring a detector in a network (the network may be a network supporting SIP), wherein the detector is used to capture a data stream based on the SIP protocol.
[0034] In an optional embodiment, the network architecture of the network is obtained, and based on the distribution of routers and servers in the network architecture, the SIP data traffic between routers and routers is obtained, and the SIP data traffic between routers and servers is obtained. If the SIP data traffic counted within one day is greater than a pre-configured traffic value, the detector is configured between the routers that obtain the SIP traffic or between the router and the server.
[0035] Step S104, obtaining a SIP protocol call list from the data stream, and determining a server providing the SIP protocol in the network according to the call list, wherein information of both parties in communication based on the SIP protocol and information of the server in communication based on the SIP protocol are recorded in the call list.
[0036] Step S106: For each server, all call records in the server are obtained to determine whether all call records meet a predetermined condition.
[0037] Step S108, when all call records meet the predetermined condition, determine that the server is a suspected server of a predetermined type, wherein the server of the predetermined type provides a predetermined type of call, and the initiator of the predetermined type of call will be subject to call restrictions.
[0038] As an optional implementation, three threshold values may be set in this step. The first threshold value is used to indicate that the call records with a call duration less than the threshold value are all suspected call records. The first threshold value may be set to 20 seconds, and the number A of call records with a call duration less than the first threshold value is obtained. The second threshold value is used to indicate the number of active calls initiated to a fixed number. The number of all call records initiated to the same number is counted. If the number exceeds the second threshold value, the count is considered to be increased by 1, and the number B obtained by the final count is obtained. When the number A meets the first predetermined condition and the number B meets the second predetermined duration, the server is determined to be a server of the suspected predetermined type.
[0039] Step S110, obtaining a media stream corresponding to a call whose call duration exceeds a predetermined time in the server suspected to be of the predetermined type, and determining whether the server suspected to be of the predetermined type is a server of the predetermined type according to information included in the media stream.
[0040] In an optional embodiment, for a server identified as a predetermined type, the network address of the server of the predetermined type and the router connected to the network address are obtained, and configuration information is added to the router, wherein the configuration information is used to forward all data routed to the server of the predetermined type to other pre-configured network addresses, wherein the other network addresses are configured in a recording server, and the recording server is used to record all forwarded data.
[0041] The above steps solve the problem of relatively large errors in judging whether a calling party belongs to a predetermined type in the prior art, thereby improving the accuracy of judging whether a calling party belongs to a predetermined type and strengthening the protection of users.
[0042] Optionally, determining whether the suspected server of the predetermined type is a server of the predetermined type based on the information included in the media stream includes: obtaining the media streams corresponding to all calls of the suspected server of the predetermined type whose duration usually exceeds the predetermined duration; for the media stream corresponding to each call in all calls, determining whether the media stream includes the predetermined information, and when it includes the predetermined information, determining that the media stream is a media stream of the predetermined type; and determining whether the suspected server of the predetermined type is a server of the predetermined type based on the number of media streams of the predetermined type.
[0043] Optionally, determining whether the suspected server of the predetermined type is a server of the predetermined type based on the number of media streams of the predetermined type includes: determining that the suspected server of the predetermined type is a server of the predetermined type when the number of media streams of the predetermined type in the suspected server of the predetermined type exceeds a first threshold; wherein the first threshold is predetermined.
[0044] Optionally, determining whether the suspected server of the predetermined type is a server of the predetermined type based on the number of media streams of the predetermined type includes: determining that the suspected server of the predetermined type is a server of the predetermined type when the ratio of the number of media streams of the predetermined type in the server of the suspected predetermined type to the number of media streams corresponding to all calls exceeds a second threshold.
[0045] In this embodiment, a method for identifying a predetermined type of telephone is provided, and the identification method is introduced below.
[0046] S1: Obtain real-time call data, and input the real-time call data into the predetermined type phone detection model trained with historical call data to obtain a SIP call record suspected to be of the predetermined type. For the historical call data, after feature extraction, the behavior features and number features in the call data are extracted to determine whether the SIP is of the predetermined type.
[0047] S2: The SIP server (i.e. Figure 1 The proxy server in the example is determined to be a SIP server of a suspected predetermined type.
[0048] S3: parse the media stream generated by the SIP server suspected to be of the predetermined type, and determine the SIP call record that is actually of the predetermined type.
[0049] Acquire the media stream (usually the voice stream), perform voice analysis on the media stream (specifically, convert the voice to text data, and analyze the converted text in combination with semantic analysis), and determine the real SIP call record of the predetermined type. Output the real SIP call record of the predetermined type to the relevant department as the basis for the management of the predetermined type of calls.
[0050] In this step, as an optional implementation, the voice in the media stream can be converted into text, and whether the text includes first-category keywords (wherein the first-category keywords are used to indicate the identity of the caller) is determined from the text, and if one or more of the first-category keywords are included, whether the text includes second-category keywords (wherein the second-category keywords are used to indicate the action to be performed by the caller) is determined from the text, and if one or more of the second-category keywords are included, the SIP call record including the voice is a SIP call record of a predetermined type, and the media stream is a media stream of a predetermined type. The first-category keywords and the second-category keywords are pre-configured.
[0051] As an optional implementation, determining whether the text includes first-category keywords includes: obtaining the total number of all pre-configured first-category keywords, obtaining the number of different first-category keywords included in the text, and determining that the text includes the first-category keywords when the ratio of the number to the total number exceeds a predetermined ratio.
[0052] S4: Determine the SIP server that generates the SIP call record of the real predetermined type as the SIP server of the real predetermined type.
[0053] S5: Determine the IP address of the predetermined type according to the SIP server of the predetermined type; provide the IP address to the relevant unit as the basis for the management of the predetermined type of telephone.
[0054] In the above steps, the number of SIP servers in the network space can also be grasped by active detection, that is, by analyzing the SIP traffic, a SIP call list is generated, and the SIP server is found through the address of the SIP call list; the predetermined type is analyzed by restoring the SIP voice; the SIP call list can include the user's access log, that is, the source IP, destination IP, source port, destination port, and URL. Through the above active detection and analysis of SIP traffic, the number of SIP servers in the network space can be grasped.
[0055] Specifically, the determining of the IP address of the true predetermined type according to the call list generated by the router connected to the SIP server of the true predetermined type includes: determining all the routers connected to the SIP server of the true predetermined type;
[0056] Acquire the call list generated by the router; determine all source IP addresses that have sent data to the SIP server of the truly predetermined type according to the access log recorded in the call list; determine a target area according to the LAC and / or CI parameters contained in the SIP call list of the truly predetermined type; wherein LAC is: Location Area Code; CI is: Cell Identity; determine the source IP address located in the target area as a highly suspicious source IP address; determine the highly suspicious source IP address that is transmitting the SIP call list among the highly suspicious source IP addresses as an IP address of the truly predetermined type, and find the router connected to the IP address of the truly predetermined type.
[0057] The above-mentioned embodiments solve the problem in the prior art that there is a large error in judging whether a calling party belongs to a predetermined type, thereby improving the accuracy of judging whether a calling party belongs to a predetermined type and strengthening the protection of users.
[0058] In this embodiment, an electronic device is provided, including a memory and a processor. The memory stores a computer program, and the processor is configured to run the computer program to execute the method in the above embodiment.
[0059] The above program can be run in the processor, or it can also be stored in the memory (or computer-readable medium), which includes permanent and non-permanent, removable and non-removable media. Information storage can be achieved by any method or technology. Information can be computer-readable instructions, data structures, modules of programs or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0060] These computer programs can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps of the functions specified in one or more blocks can be implemented by different modules corresponding to different steps.
[0061] Such a device or system is provided in this embodiment. The system is called a system for obtaining a predetermined type of telephone based on analyzing the SIP network protocol, and includes: a configuration module, which is used to configure a detector in the network, wherein the detector is used to capture a data stream based on the SIP protocol; a first determination module, which is used to obtain a call sheet of the SIP protocol from the data stream, and determine a server providing the SIP protocol in the network according to the call sheet, wherein information of both parties of communication based on the SIP protocol and information of a server for communication based on the SIP protocol are recorded in the call sheet; a second determination module, which is used to obtain all call sheets in each server, and determine whether all call sheets meet a predetermined condition; a third determination module, which is used to determine that the server is a suspected predetermined type server if all call sheets meet the predetermined condition, wherein the server of the predetermined type provides a predetermined type of telephone, and the initiator of the predetermined type of telephone will be subject to call restrictions; a fourth determination module, which is used to obtain a media stream corresponding to a call whose call duration exceeds a predetermined time in the suspected predetermined type server, and determine whether the suspected predetermined type server is a predetermined type server according to information included in the media stream.
[0062] The system or device is used to implement the functions of the method in the above-mentioned embodiment. Each module in the system or device corresponds to each step in the method, which has been explained in the method and will not be repeated here.
[0063] Optionally, the fourth determination module is used to: obtain the media streams corresponding to all calls in the server suspected of the predetermined type, whose duration usually exceeds the predetermined duration; determine whether the media stream corresponding to each call in all calls includes predetermined information, and if it includes the predetermined information, determine that the media stream is a media stream of the predetermined type; and determine whether the server suspected of the predetermined type is a server of the predetermined type based on the number of media streams of the predetermined type.
[0064] Optionally, the fourth determination module is used to: determine that the suspected server of the predetermined type is a server of the predetermined type when the number of media streams of the predetermined type in the suspected server of the predetermined type exceeds a first threshold; wherein the first threshold is predetermined.
[0065] Optionally, the fourth determination module is used to determine that the suspected server of the predetermined type is a server of the predetermined type when the ratio of the number of media streams of the predetermined type in the server of the suspected predetermined type to the number of media streams corresponding to all calls exceeds a second threshold.
[0066] The above-mentioned embodiments solve the problem in the prior art that there is a large error in judging whether a calling party belongs to a predetermined type, thereby improving the accuracy of judging whether a calling party belongs to a predetermined type and strengthening the protection of users.
[0067] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A method for obtaining a predetermined type of telephone based on analyzing the SIP network protocol, characterized in that: include: A detector is configured in the network, wherein the detector is used to capture a data stream based on the SIP protocol; Acquire a call sheet of the SIP protocol from the data stream, and determine a server providing the SIP protocol in the network according to the call sheet, wherein information of both parties of communication based on the SIP protocol and information of the server of communication based on the SIP protocol are recorded in the call sheet; For each server, all call records in the server are obtained to determine whether all call records meet the predetermined conditions; In the case where all the call records meet the predetermined condition, determining that the server is a suspected server of a predetermined type, wherein the server of the predetermined type provides a predetermined type of phone, and the initiator of the predetermined type of phone will be subject to call restrictions; A media stream corresponding to a call whose call duration exceeds a predetermined time in the server suspected to be of the predetermined type is obtained, and whether the server suspected to be of the predetermined type is a server of the predetermined type is determined according to information included in the media stream.
2. The method according to claim 1, characterized in that Determining whether the suspected server of the predetermined type is a server of the predetermined type according to the information included in the media stream comprises: Acquire the media streams corresponding to all calls in the server of the suspected predetermined type, the duration of which usually exceeds the predetermined duration; For each media stream corresponding to all calls, determining whether the media stream includes predetermined information, and if the predetermined information is included, determining that the media stream is a media stream of a predetermined type; It is determined whether the server suspected to be of the predetermined type is a server of the predetermined type according to the number of the media streams of the predetermined type.
3. The method according to claim 2, characterized in that Determining, according to the number of media streams of the predetermined type, whether the server suspected to be of the predetermined type is a server of the predetermined type includes: When the number of media streams of the predetermined type in the suspected server of the predetermined type exceeds a first threshold, the suspected server of the predetermined type is determined to be a server of the predetermined type; wherein the first threshold is predetermined.
4. The method according to claim 2, characterized in that: Determining, according to the number of media streams of the predetermined type, whether the server suspected to be of the predetermined type is a server of the predetermined type includes: When the ratio of the number of media streams of the predetermined type in the server suspected of the predetermined type to the number of media streams corresponding to all calls exceeds a second threshold, the server suspected of the predetermined type is determined to be a server of the predetermined type.
5. A system for obtaining a predetermined type of telephone based on analyzing the SIP network protocol, characterized in that: include: A configuration module, used for configuring a detector in the network, wherein the detector is used for capturing a data stream based on the SIP protocol; A first determination module is used to obtain a call list of the SIP protocol from the data stream, and determine a server providing the SIP protocol in the network according to the call list, wherein information of both parties of communication based on the SIP protocol and information of the server of communication based on the SIP protocol are recorded in the call list; The second determination module is used to obtain all the call records in each server and determine whether all the call records meet the predetermined conditions; A third determination module is used to determine that the server is a suspected server of a predetermined type when all call records meet the predetermined condition, wherein the server of the predetermined type provides a predetermined type of phone, and the initiator of the predetermined type of phone will be subject to call restrictions; The fourth determination module is used to obtain the media stream corresponding to the call whose call duration exceeds the predetermined time in the server suspected of the predetermined type, and determine whether the server suspected of the predetermined type is a server of the predetermined type according to information included in the media stream.
6. The system according to claim 5, characterized in that The fourth determination module is used for: Acquire the media streams corresponding to all calls in the server of the suspected predetermined type, the duration of which usually exceeds the predetermined duration; For each media stream corresponding to all calls, determining whether the media stream includes predetermined information, and if the predetermined information is included, determining that the media stream is a media stream of a predetermined type; It is determined whether the server suspected to be of the predetermined type is a server of the predetermined type according to the number of the media streams of the predetermined type.
7. The system according to claim 6, characterized in that The fourth determination module is used for: When the number of media streams of the predetermined type in the suspected server of the predetermined type exceeds a first threshold, the suspected server of the predetermined type is determined to be a server of the predetermined type; wherein the first threshold is predetermined.
8. The system according to claim 6, characterized in that The fourth determination module is used for: When the ratio of the number of media streams of the predetermined type in the server suspected of the predetermined type to the number of media streams corresponding to all calls exceeds a second threshold, the server suspected of the predetermined type is determined to be a server of the predetermined type.
9. A server comprising a memory and a processor; wherein: The memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the method steps described in any one of claims 1 to 4.
10. A readable storage medium having computer instructions stored thereon, wherein: When the computer instructions are executed by a processor, the method steps described in any one of claims 1 to 4 are implemented.
