CN112153109A - Method, device, computer equipment and storage medium for establishing communication connection - Google Patents
Method, device, computer equipment and storage medium for establishing communication connection Download PDFInfo
- Publication number
- CN112153109A CN112153109A CN202010820582.3A CN202010820582A CN112153109A CN 112153109 A CN112153109 A CN 112153109A CN 202010820582 A CN202010820582 A CN 202010820582A CN 112153109 A CN112153109 A CN 112153109A
- Authority
- CN
- China
- Prior art keywords
- terminal
- address
- call request
- network
- communication connection
- 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.)
- Granted
Links
- 238000004891 communication Methods 0.000 title claims abstract description 131
- 238000000034 method Methods 0.000 title claims abstract description 41
- 230000004044 response Effects 0.000 claims abstract description 17
- 238000013507 mapping Methods 0.000 claims description 36
- 238000004590 computer program Methods 0.000 claims description 25
- 238000012508 change request Methods 0.000 claims description 22
- 238000010586 diagram Methods 0.000 description 8
- 239000000284 extract Substances 0.000 description 6
- 230000011664 signaling Effects 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 238000013519 translation Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 238000012790 confirmation Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/09—Mapping addresses
- H04L61/25—Mapping addresses of the same type
- H04L61/2503—Translation of Internet protocol [IP] addresses
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/141—Setup of application sessions
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The application relates to a method, an apparatus, a computer device and a storage medium for establishing a communication connection. The method comprises the following steps: receiving a first call request sent by a first terminal; the first terminal is a terminal in a public network, and the first call request is used for establishing communication connection with a second terminal; acquiring an address identifier of the second terminal according to the first call request; judging whether the second terminal is a terminal in a private network or not according to the address identifier; when the second terminal is a terminal in a private network, sending request information to the second terminal; receiving a second call request sent by the second terminal in response to the request information; and establishing a communication connection between the second terminal and the first terminal based on the second call request. By adopting the method, the communication connection can be smoothly established with the terminal in the private network under the condition that the NAT equipment and the firewall do not support the communication protocol.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for establishing a communication connection, a computer device, and a storage medium.
Background
With the development of computer technology, the number and size of private networks is continuously expanding. Because of the problems of the IPv4, such as the shortage of addresses and the Network security, NAT (Network Address Translation) devices are generally used in private networks or firewalls are provided. When a terminal in a public network communicates by using a certain communication protocol (such as an h.323 protocol), if the NAT device and the firewall do not support the communication protocol, the terminal in the public network cannot pass through the NAT device and the firewall to establish a communication connection with the terminal in the private network.
Disclosure of Invention
In view of the above, it is necessary to provide a method, an apparatus, a computer device and a storage medium for establishing a communication connection, so that the communication connection can be successfully established with a terminal in a private network even when the NAT device and the firewall do not support such a communication protocol.
A method of establishing a communication connection, the method comprising:
receiving a first call request sent by a first terminal; the first terminal is a terminal in a public network, and the first call request is used for establishing communication connection with a second terminal;
acquiring an address identifier of the second terminal according to the call request;
judging whether the second terminal is a terminal in a private network or not according to the address identifier;
when the second terminal is a terminal in a private network, sending request information to the second terminal;
receiving a second call request sent by the second terminal in response to the request information;
and establishing a communication connection between the second terminal and the first terminal based on the second call request.
In one embodiment, before receiving the first call request sent by the first terminal, the method further includes:
receiving a first registration message of the first terminal and a second registration message of the second terminal;
extracting the address identification of the first terminal from the first registration message, and extracting the address identification of the second terminal from the second registration message;
and respectively storing the address identifier of the first terminal and the address identifier of the second terminal in an address mapping table.
In one embodiment, the address identifier of the first terminal comprises a first terminal number and a first IP address, and the address identifier of the second terminal comprises a second terminal number and a second IP address; the storing the address identifier of the first terminal and the address identifier of the second terminal in an address mapping table respectively comprises:
respectively judging whether the first terminal number and the second terminal number belong to the serial numbers in the current domain;
when the first terminal number belongs to the number in the current network domain, storing the first terminal number and the first IP address in the address mapping table;
and when the second terminal number belongs to the number in the current network domain, storing the second terminal number and the second IP address in the address mapping table.
In one embodiment, the address identification comprises a second terminal number; the judging whether the second terminal is a terminal in a private network according to the address identifier comprises:
searching a second IP address corresponding to the second terminal number from an address mapping table;
judging whether the second IP address is a private address;
and when the second IP address is a private address, determining that the second terminal is a terminal in a private network.
In one embodiment, after sending the request information to the second terminal, the method further includes:
starting a timer to time;
and when the second call request is not received within the specified timing duration, sending call failure information to the first terminal.
In one embodiment, the establishing of the communication connection between the second terminal and the first terminal based on the second call request includes:
sending a first permission instruction to the second terminal according to the second call request so that the second terminal sends a connection establishment message to the first terminal according to the first permission instruction;
receiving an solicitation message sent by the first terminal in response to the connection establishment message;
and sending a second permission instruction to the first terminal so that the first terminal establishes communication connection with the second terminal after receiving the second permission instruction.
In one embodiment, after the establishing of the communication connection between the second terminal and the first terminal based on the second call request, the method further includes:
receiving a bandwidth change request;
responding to the bandwidth change request, and judging whether the first terminal and the second terminal have the use permission of a target bandwidth value;
and if so, changing the bandwidth of the communication channel between the first terminal and the second terminal according to the bandwidth change request.
An apparatus for establishing a communication connection, the apparatus comprising:
the receiving module is used for receiving a first call request sent by a first terminal; the first terminal is a terminal in a public network, and the first call request is used for establishing communication connection with a second terminal;
an obtaining module, configured to obtain an address identifier of the second terminal according to the call request;
the judging module is used for judging whether the second terminal is a terminal in a private network or not according to the address identifier;
a sending module, configured to send request information to the second terminal when the second terminal is a terminal in a private network;
the receiving module is further configured to receive a second call request sent by the second terminal in response to the request information;
and the establishing module is used for establishing the communication connection between the second terminal and the first terminal based on the second call request.
In one embodiment, the apparatus further comprises:
the receiving module is further configured to receive a first registration message of the first terminal and a second registration message of the second terminal;
an extracting module, configured to extract the address identifier of the first terminal from the first registration message, and extract the address identifier of the second terminal from the second registration message;
and the storage module is used for respectively storing the address identifier of the first terminal and the address identifier of the second terminal in an address mapping table.
In one embodiment, the address identifier of the first terminal comprises a first terminal number and a first IP address, and the address identifier of the second terminal comprises a second terminal number and a second IP address; the storage module is further configured to:
respectively judging whether the first terminal number and the second terminal number belong to the serial numbers in the current domain;
when the first terminal number belongs to the number in the current network domain, storing the first terminal number and the first IP address in the address mapping table;
and when the second terminal number belongs to the number in the current network domain, storing the second terminal number and the second IP address in the address mapping table.
In one embodiment, the address identification comprises a second terminal number; the judging module is further configured to:
searching a second IP address corresponding to the second terminal number from an address mapping table;
judging whether the second IP address is a private address;
and when the second IP address is a private address, determining that the second terminal is a terminal in a private network.
In one embodiment, the apparatus further comprises:
the starting module is used for starting the timer to time;
and the sending module is used for sending call failure information to the first terminal when the second call request is not received within the specified timing duration.
In one embodiment, the establishing module is further configured to:
sending a first permission instruction to the second terminal according to the second call request so that the second terminal sends a connection establishment message to the first terminal according to the first permission instruction;
receiving an solicitation message sent by the first terminal in response to the connection establishment message;
and sending a second permission instruction to the first terminal so that the first terminal establishes communication connection with the second terminal after receiving the second permission instruction.
In one embodiment, the apparatus further comprises:
a receiving module, configured to receive a bandwidth change request;
the judging module is used for responding to the bandwidth change request and judging whether the first terminal and the second terminal have the use permission of a target bandwidth value;
and if so, the changing module is used for changing the bandwidth of the communication channel between the first terminal and the second terminal according to the bandwidth changing request.
A computer arrangement comprising a memory and a processor, the memory storing a computer program, characterized in that the processor realizes the steps of the method of establishing a communication connection when executing the computer program.
A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of establishing a communication connection.
In the above embodiment, after receiving the first call request sent by the first terminal in the public network, the network device in the communication network sends request information to the second terminal to instruct the second terminal to call the first terminal through the request information if the second terminal called by the first terminal is a terminal in the private network. The network equipment converts a terminal in a public network calling a terminal in a private network into a terminal in a private network calling a terminal in a public network, and under the condition that the NAT equipment and the firewall do not support a communication protocol used by the communication network, the terminal in the public network and the terminal in the private network can be enabled to establish communication connection smoothly, so that the situation that the terminal in the public network cannot establish communication connection with the terminal in the private network is prevented.
Drawings
FIG. 1 is a diagram of an application environment for a method of establishing a communication connection in one embodiment;
FIG. 2 is a flow diagram illustrating a method for establishing a communication connection in one embodiment;
FIG. 3 is a timing diagram of establishing a communication connection in one embodiment;
FIG. 4 is a block diagram of an apparatus for establishing a communication connection in one embodiment;
FIG. 5 is a block diagram showing the structure of an apparatus for establishing a communication connection according to another embodiment;
FIG. 6 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The method for establishing communication connection provided by the application can be applied to the application environment shown in fig. 1. Wherein the network device 102 communicates with the first terminal 104 and the second terminal 106 via a network. After receiving a first call request sent by a first terminal 104 in a public network, the network device determines whether a second terminal 106 called by the first terminal 104 is a terminal in a private network, and if the second terminal 106 is a terminal in the private network, the network device 102 sends request information to the second terminal 106 to instruct the second terminal 106 to call the first terminal 104 through the request information, so that a communication connection is established between the first terminal 104 and the second terminal 106. The network device 102 may be a gatekeeper or other network device, and the first terminal 104 and the second terminal 106 may be, but are not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices.
In one embodiment, as shown in fig. 2, a method for establishing a communication connection is provided, which is described by taking the method as an example for being applied to the network device in fig. 1, and includes the following steps:
s202, a network device receives a first call request sent by a first terminal; the first terminal is a terminal in a public network, and the first call request is used for establishing communication connection with the second terminal.
The network device is an entity in the communication network, and is configured to provide management services, such as address translation and network access control, for a gateway, a multipoint control unit, a terminal, and the like in the communication network.
The first terminal and the second terminal are nodes in a communication network. The first terminal is a terminal in a public network.
The first terminal and the second terminal may be various user devices, for example, computer devices of users in a video conference system (for example, a personal computer desktop terminal or a conference room terminal), a multipoint control unit in the video conference system, a router in a communication network, a telephone, and the like.
The first call request is used for prompting the network equipment that the first terminal wants to establish communication connection with the second terminal. The call request includes an address identifier of the calling party first terminal and an address identifier of the called party second terminal.
The first call request may be signaling of a network layer protocol, for example, signaling of a q.931 protocol.
The IP address of the terminal in the public network is a non-reserved address, and other terminals on the Internet can randomly access the terminal in the public network.
And S204, the network equipment acquires the address identifier of the second terminal according to the first call request.
The address identifier is an identifier of the second terminal in the network, and may be a network Protocol ID used by the communication network, for example, an h.323 Protocol ID (e.g., gwy1@ domain.com), an e.164 number (standard telephone number), or an IP (Internet Protocol) address.
After acquiring the first call request, the network device may directly extract the network protocol ID or e.164 number of the second terminal from the first call request. Or after the network protocol ID or the e.164 number of the second terminal is obtained, the IP address of the second terminal may be obtained according to the network protocol ID or the e.164 number.
And S206, the network equipment judges whether the second terminal is a terminal in the private network or not according to the address identifier.
The private network is a network inside a special institution, and a terminal in the private network uses a private IP address. The terminal in the private network can not directly access the internet through the private IP address, but firstly maps the private IP address into the public IP address in the NAT mode. The private IP addresses include class A (10.0.0.0-10.255.255.255), class B (172.16.0.0-172.31.255.255), and class C (192.168.0-192.168.255.255) addresses.
The network equipment acquires the address identifier of the second terminal according to the first call request, acquires the IP address of the second terminal according to the address identifier of the second terminal, and judges whether the second terminal is a terminal in a private network or not by comparing the IP address of the second terminal with the private IP address.
S208, when the second terminal is a terminal in the private network, the network device sends request information to the second terminal.
The request information is used for indicating the second terminal to initiate a call request to the first terminal, and establishing communication connection between the second terminal and the first terminal in a mode that the second terminal calls the first terminal.
When the second terminal is a terminal in the private network, the IP address of the second terminal is a private address and is not routable in the internet, and when the NAT device and the firewall in the private network do not support the communication protocol used by the communication network, the second terminal cannot receive the call from the first terminal in the public network, but the second terminal in the private network can freely call the first terminal in the public network. Therefore, after receiving the first call request of the first terminal, the network device converts the call mode of the first terminal in the public network calling the second terminal in the private network into the call mode of the second terminal in the private network calling the first terminal in the public network, so as to establish communication connection between the first terminal and the second terminal.
S210, the network equipment receives a second call request sent by the second terminal in response to the request information.
Wherein the second call request is used for prompting the network device that the second terminal wants to establish a communication connection with the first terminal. The second call request may be signaling of a network layer protocol, for example, may be q.931 protocol signaling.
Before sending the second call request, the second terminal may determine whether to approve the establishment of the communication connection with the first terminal according to the request information, and if the second terminal approves the establishment of the communication connection with the first terminal, send the second call request to the network device; and if the second terminal does not agree to establish the communication connection with the first terminal, sending a rejection message to the network equipment, and recording a rejection reason in the rejection message. And after receiving the rejection message, the network equipment forwards the rejection message to the first terminal.
The second terminal may determine whether to approve the establishment of the communication connection with the first terminal according to the address identifier of the first terminal obtained from the request message. Or, it may also determine whether to approve the establishment of the communication connection with the first terminal according to the network condition of the second terminal, for example, when the communication load of the second terminal reaches the load on line, the second terminal may refuse to establish the communication connection with the first terminal. Or, it may also decide whether to approve the establishment of the communication connection with the first terminal according to the ongoing communication service situation of the second terminal, for example, if the second terminal is performing video communication with other terminals, the establishment of the communication connection with the first terminal may be rejected.
S212, the network device establishes a communication connection between the second terminal and the first terminal based on the second call request.
And after the network equipment acquires the second call request, establishing communication connection between the first terminal and the second terminal. The network device may select a communication mode between the first terminal and the second terminal. For example, the network device may enable a communication connection to be established directly between the first terminal and the second terminal for exchanging data. Or the first terminal and the second terminal can exchange data through the network equipment, and the data is not directly exchanged between the two terminals, so that the data security and the service quality are ensured.
In the above embodiment, after receiving the first call request sent by the first terminal in the public network, the network device in the communication network sends request information to the second terminal to instruct the second terminal to call the first terminal through the request information if the second terminal called by the first terminal is a terminal in the private network. The network equipment converts a terminal in a public network calling a terminal in a private network into a terminal in a private network calling a terminal in a public network, and under the condition that the NAT equipment and the firewall do not support a communication protocol used by the communication network, the terminal in the public network and the terminal in the private network can be enabled to establish communication connection smoothly, so that the situation that the terminal in the public network cannot establish communication connection with the terminal in the private network is prevented.
In one embodiment, the first terminal and the second terminal first look for network devices in the network domain before starting communication. The first terminal and the second terminal send a request for finding the network device to the target port. After receiving a request for searching for network equipment sent by a first terminal and a second terminal, if the first terminal and the second terminal are allowed to join a network domain managed by the first terminal and the second terminal, the network equipment sends a confirmation message to the first terminal and the second terminal, and sends a network equipment address to the first terminal and the second terminal, so that the first terminal and the second terminal communicate with the network equipment through the network equipment address. And if the network equipment does not allow the first terminal and the second terminal to join the network domain governed by the network equipment, sending a rejection message to the first terminal and the second terminal. When the terminal needs the service provided by the network device, the terminal dynamically joins the network device instead of configuring the network device statically for all terminals, so that the overhead of managing the terminal by the network device can be reduced. And if the terminal can try to discover a new network device again after the network device connected with the terminal is offline, the communication activity is not influenced by the offline of the network device.
In one embodiment, before receiving the first call request sent by the first terminal, the network device further includes: receiving a first registration message of a first terminal and a second registration message of a second terminal; extracting the address identification of the first terminal from the first registration message, and extracting the address identification of the second terminal from the second registration message; and respectively storing the address identifier of the first terminal and the address identifier of the second terminal in an address mapping table.
The first registration message is a message sent by the first terminal to the network device for registration. The first registration message includes an address identifier of the first terminal. The address identifier of the first terminal includes a first terminal number and a first IP address.
The second registration message is a message that the second terminal sends to the network device for registration. The second registration message includes an address identifier of the second terminal. The address identifier of the second terminal includes a second terminal number and a second IP address.
In addition, the first registration message and the second registration message may further include a first password identifier and a second password identifier indicating a data encryption mode adopted by the first terminal and the second terminal, and the network device decrypts the encrypted data sent by the first terminal and the second terminal in a corresponding decryption mode according to the indication of the first password identifier and the second password identifier.
The address mapping table stores address identifiers of all terminals registered in the network device, including terminal numbers of the terminals and corresponding IP addresses.
In one embodiment, the address identifier of the first terminal comprises a first terminal number and a first IP address, and the address identifier of the second terminal comprises a second terminal number and a second IP address; the network device respectively stores the address identifier of the first terminal and the address identifier of the second terminal in an address mapping table, and the method comprises the following steps: respectively judging whether the first terminal number and the second terminal number belong to the number in the current domain; when the first terminal number belongs to the number in the current network domain, storing the first terminal number and the first IP address in an address mapping table; and when the second terminal number belongs to the number in the current network domain, storing the second terminal number and the second IP address in the address mapping table.
In addition, the network device judges whether the first terminal and the second terminal are registered with other network devices by communicating with the other network devices, and rejects repeated registration of the terminal if the first terminal or the second terminal is registered with other network devices, so as to prevent the terminal from repeatedly registering a plurality of network devices.
In one embodiment, the address identification of the second terminal comprises a second terminal number; the network device judging whether the second terminal is a terminal in the private network according to the address identifier of the second terminal includes: searching a second IP address corresponding to the second terminal number from the address mapping table; judging whether the second IP address is a private address; and when the second IP address is a private address, determining that the second terminal is a terminal in a private network.
After the network device obtains the second terminal number of the second terminal, the network device searches for the second IP address corresponding to the second terminal number in the address mapping table, and then determines whether the second IP address is a private address by comparing the second IP address with the A, B, C-type private IP address.
In one embodiment, after the network device sends the request information to the second terminal, the method further includes: starting a timer to time; and when the second call request is not received within the specified timing duration, sending call failure information to the first terminal.
The network equipment designates timing duration in the timer, the network equipment can designate the timing duration according to the network congestion condition, and if network communication is smooth, a second call request sent by a second terminal can reach the network equipment in a short time, and a short timing duration is designated; if the network congestion is severe, the second call request sent by the second terminal will take a longer time to reach the network device, and a longer timing duration is specified.
If the network device does not receive the second call request within the specified timing duration, it indicates that the connection with the second terminal cannot be established, or the second terminal refuses to establish communication connection with the first terminal. Therefore, the network device sends the call failure information to the first terminal to prevent the first terminal from continuously waiting for establishing the communication connection with the second terminal, thereby wasting network resources.
In one embodiment, the network device establishing the communication connection between the second terminal and the first terminal based on the second call request includes: sending a first permission instruction to the second terminal according to the second call request so that the second terminal sends a connection establishment message to the first terminal according to the first permission instruction; receiving an invitation message sent by the first terminal in response to the connection establishment message; and sending a second permission instruction to the first terminal so that the first terminal establishes communication connection with the second terminal after receiving the second permission instruction.
The first permission instruction is used for informing the second terminal that the network equipment is allowed to establish communication connection with the first terminal. The first permission instruction may include a communication time interval or a communication duration for the second terminal to communicate with the first terminal, and may also include a network bandwidth that the second terminal may utilize when communicating with the first terminal.
The connection establishment message is a message instruction sent by the second terminal to the first terminal and used for requesting the first terminal to establish the communication connection.
The request message is a message which is sent by the first terminal to the network device after receiving the connection establishment message sent by the second terminal and is used for requesting the network device whether the communication connection with the second terminal can be established.
Wherein the second permission instruction is used for informing the first terminal that the network device allows the first terminal to establish a communication connection with the second terminal. The second grant instruction may include a communication time interval or a communication duration for the second terminal to communicate with the first terminal, and may also include a network bandwidth that the second terminal may utilize when communicating with the first terminal.
After receiving a second call request sent by a second terminal, the network device extracts the address identifier of the called first terminal from the second call request, if the network device allows the second terminal to establish communication connection with the first terminal, a first permission instruction is sent to the second terminal, and if the network device does not allow the second terminal to establish communication connection with the first terminal, a message is sent to the second terminal to inform the rejection reason of the second terminal.
And after receiving the first permission instruction sent by the network equipment, the second terminal sends a connection establishment message to the first terminal to request to establish communication connection with the first terminal. The first terminal requests the network equipment whether the communication connection with the second terminal can be established or not after receiving the connection establishment message sent by the second terminal, and if the second permission instruction sent by the network equipment is received, the first terminal establishes the communication connection with the second terminal.
In one embodiment, after the network device establishes the communication connection between the second terminal and the first terminal based on the second call request, the method further includes: receiving a bandwidth change request; responding to the bandwidth change request, and judging whether the first terminal and the second terminal have the use permission of the target bandwidth value; if so, the bandwidth of the communication channel between the first terminal and the second terminal is changed according to the bandwidth change request.
The bandwidth change request is a request sent by the first terminal or the second terminal to the network device to change the bandwidth of the communication link between the first terminal and the second terminal. The bandwidth change request includes a target bandwidth value of a bandwidth requested by the first terminal or the second terminal.
In one embodiment, the first terminal, the second terminal and the network device interact to make a timing diagram of the communication connection established between the first terminal and the second terminal as shown in fig. 3.
After the first terminal sends the first registration message to the network device, the network device extracts the address identifier of the first terminal from the first registration message sent by the first terminal. And after the second terminal sends the second registration message to the network equipment, the network equipment extracts the address identifier of the second terminal from the second registration message sent by the second terminal. Then, the network device stores the address identifier of the first terminal and the address identifier of the second terminal in an address mapping table.
The network equipment receives a first call request of a first terminal and acquires an address identifier of a second terminal according to the first call request. And then judging whether the second terminal is a terminal in the private network, and if the second terminal is the terminal in the private network, sending request information to the second terminal. And after the network equipment sends the request information to the second terminal, receiving a second call request sent by the second terminal in response to the request information. And after receiving the second call request, the network equipment sends a first permission instruction to the second terminal. And after receiving the first permission instruction, the second terminal sends a connection establishment message to the first terminal. The first terminal responds to the connection establishment message sent by the second terminal and sends an invitation message to the network equipment. And after receiving the request message sent by the first terminal, the network equipment sends a second permission instruction to the first terminal. And the first terminal establishes communication connection with the second terminal after receiving the second permission instruction.
It should be understood that although the various steps in the flow charts of fig. 2-3 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-3 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps.
In one embodiment, as shown in fig. 4, there is provided an apparatus for establishing a communication connection, including: a receiving module 402, an obtaining module 404, a judging module 406, a sending module 408 and a establishing module 410, wherein:
a receiving module 402, configured to receive a first call request sent by a first terminal; the first terminal is a terminal in a public network, and the first call request is used for establishing communication connection with the second terminal;
an obtaining module 404, configured to obtain an address identifier of the second terminal according to the call request;
a judging module 406, configured to judge whether the second terminal is a terminal in the private network according to the address identifier;
a sending module 408, configured to send request information to the second terminal when the second terminal is a terminal in the private network;
a receiving module 402, configured to receive a second call request sent by the second terminal in response to the request information;
a establishing module 410, configured to establish a communication connection between the second terminal and the first terminal based on the second call request.
In the above embodiment, after receiving the first call request sent by the first terminal in the public network, the network device in the communication network sends request information to the second terminal to instruct the second terminal to call the first terminal through the request information if the second terminal called by the first terminal is a terminal in the private network. The network equipment converts a terminal in a public network calling a terminal in a private network into a terminal in a private network calling a terminal in a public network, and under the condition that the NAT equipment and the firewall do not support a communication protocol used by the communication network, the terminal in the public network and the terminal in the private network can be enabled to establish communication connection smoothly, so that the situation that the terminal in the public network cannot establish communication connection with the terminal in the private network is prevented.
In one embodiment, as shown in fig. 5, the apparatus further comprises:
a receiving module 402, configured to receive a first registration message of a first terminal and a second registration message of a second terminal;
an extracting module 412, configured to extract an address identifier of the first terminal from the first registration message, and extract an address identifier of the second terminal from the second registration message;
a storage module 414, configured to store the address identifier of the first terminal and the address identifier of the second terminal in the address mapping table, respectively.
In one embodiment, the address identifier of the first terminal comprises a first terminal number and a first IP address, and the address identifier of the second terminal comprises a second terminal number and a second IP address; the storage module 414 is further configured to:
respectively judging whether the first terminal number and the second terminal number belong to the number in the current domain;
when the first terminal number belongs to the number in the current network domain, storing the first terminal number and the first IP address in an address mapping table;
and when the second terminal number belongs to the number in the current network domain, storing the second terminal number and the second IP address in the address mapping table.
In one embodiment, the address identification includes a second terminal number; the determining module 406 is further configured to:
searching a second IP address corresponding to the second terminal number from the address mapping table;
judging whether the second IP address is a private address;
and when the second IP address is a private address, determining that the second terminal is a terminal in a private network.
In one embodiment, the apparatus further comprises:
a starting module 416, configured to start a timer to count time;
the sending module 408 is configured to send call failure information to the first terminal when the second call request is not received within the specified timing duration.
In one embodiment, the establishing module 410 is further configured to:
sending a first permission instruction to the second terminal according to the second call request so that the second terminal sends a connection establishment message to the first terminal according to the first permission instruction;
receiving an invitation message sent by the first terminal in response to the connection establishment message;
and sending a second permission instruction to the first terminal so that the first terminal establishes communication connection with the second terminal after receiving the second permission instruction.
In one embodiment, the apparatus further comprises:
a receiving module 402, configured to receive a bandwidth change request;
the judging module 406, responding to the bandwidth change request, is further configured to judge whether the first terminal and the second terminal have the usage right of the target bandwidth value;
and a changing module 418, if yes, for changing the bandwidth of the communication channel between the first terminal and the second terminal according to the bandwidth change request.
For specific limitations of the apparatus for establishing a communication connection, reference may be made to the above limitations of the method for establishing a communication connection, which are not described herein again. The respective modules in the above-mentioned apparatus for establishing communication connection may be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a network device, the internal structure of which may be as shown in fig. 6. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing data for establishing a communication connection. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of establishing a communication connection.
Those skilled in the art will appreciate that the architecture shown in fig. 6 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program: receiving a first call request sent by a first terminal; the first terminal is a terminal in a public network, and the first call request is used for establishing communication connection with the second terminal; acquiring an address identifier of a second terminal according to the first call request; judging whether the second terminal is a terminal in the private network or not according to the address identifier; when the second terminal is a terminal in the private network, sending request information to the second terminal; receiving a second call request sent by the second terminal in response to the request information; and establishing a communication connection between the second terminal and the first terminal based on the second call request.
In one embodiment, the processor, when executing the computer program, further performs the steps of: receiving a first registration message of a first terminal and a second registration message of a second terminal; extracting the address identification of the first terminal from the first registration message, and extracting the address identification of the second terminal from the second registration message; and respectively storing the address identifier of the first terminal and the address identifier of the second terminal in an address mapping table.
In one embodiment, the processor, when executing the computer program, further performs the steps of: the address identification of the first terminal comprises a first terminal number and a first IP address, and the address identification of the second terminal comprises a second terminal number and a second IP address; the step of respectively storing the address identifier of the first terminal and the address identifier of the second terminal in the address mapping table comprises: respectively judging whether the first terminal number and the second terminal number belong to the number in the current domain; when the first terminal number belongs to the number in the current network domain, storing the first terminal number and the first IP address in an address mapping table; and when the second terminal number belongs to the number in the current network domain, storing the second terminal number and the second IP address in the address mapping table.
In one embodiment, the processor, when executing the computer program, further performs the steps of: searching a second IP address corresponding to the second terminal number from the address mapping table; judging whether the second IP address is a private address; and when the second IP address is a private address, determining that the second terminal is a terminal in a private network.
In one embodiment, the processor, when executing the computer program, further performs the steps of: starting a timer to time; and when the second call request is not received within the specified timing duration, sending call failure information to the first terminal.
In one embodiment, the processor, when executing the computer program, further performs the steps of: sending a first permission instruction to the second terminal according to the second call request so that the second terminal sends a connection establishment message to the first terminal according to the first permission instruction; receiving an invitation message sent by the first terminal in response to the connection establishment message; and sending a second permission instruction to the first terminal so that the first terminal establishes communication connection with the second terminal after receiving the second permission instruction.
In one embodiment, the processor, when executing the computer program, further performs the steps of: receiving a bandwidth change request; responding to the bandwidth change request, and judging whether the first terminal and the second terminal have the use permission of the target bandwidth value; if so, the bandwidth of the communication channel between the first terminal and the second terminal is changed according to the bandwidth change request.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: receiving a first call request sent by a first terminal; the first terminal is a terminal in a public network, and the first call request is used for establishing communication connection with the second terminal; acquiring an address identifier of a second terminal according to the first call request; judging whether the second terminal is a terminal in the private network or not according to the address identifier; when the second terminal is a terminal in the private network, sending request information to the second terminal; receiving a second call request sent by the second terminal in response to the request information; and establishing a communication connection between the second terminal and the first terminal based on the second call request.
In one embodiment, the computer program when executed by the processor further performs the steps of: receiving a first registration message of a first terminal and a second registration message of a second terminal; extracting the address identification of the first terminal from the first registration message, and extracting the address identification of the second terminal from the second registration message; and respectively storing the address identifier of the first terminal and the address identifier of the second terminal in an address mapping table.
In one embodiment, the computer program when executed by the processor further performs the steps of: the address identification of the first terminal comprises a first terminal number and a first IP address, and the address identification of the second terminal comprises a second terminal number and a second IP address; the step of respectively storing the address identifier of the first terminal and the address identifier of the second terminal in the address mapping table comprises: respectively judging whether the first terminal number and the second terminal number belong to the number in the current domain; when the first terminal number belongs to the number in the current network domain, storing the first terminal number and the first IP address in an address mapping table; and when the second terminal number belongs to the number in the current network domain, storing the second terminal number and the second IP address in the address mapping table.
In one embodiment, the computer program when executed by the processor further performs the steps of: searching a second IP address corresponding to the second terminal number from the address mapping table; judging whether the second IP address is a private address; and when the second IP address is a private address, determining that the second terminal is a terminal in a private network.
In one embodiment, the computer program when executed by the processor further performs the steps of: starting a timer to time; and when the second call request is not received within the specified timing duration, sending call failure information to the first terminal.
In one embodiment, the computer program when executed by the processor further performs the steps of: sending a first permission instruction to the second terminal according to the second call request so that the second terminal sends a connection establishment message to the first terminal according to the first permission instruction; receiving an invitation message sent by the first terminal in response to the connection establishment message; and sending a second permission instruction to the first terminal so that the first terminal establishes communication connection with the second terminal after receiving the second permission instruction.
In one embodiment, the computer program when executed by the processor further performs the steps of: receiving a bandwidth change request; responding to the bandwidth change request, and judging whether the first terminal and the second terminal have the use permission of the target bandwidth value; if so, the bandwidth of the communication channel between the first terminal and the second terminal is changed according to the bandwidth change request.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.
Claims (10)
1. A method for establishing a communication connection, the method comprising:
receiving a first call request sent by a first terminal; the first terminal is a terminal in a public network, and the first call request is used for establishing communication connection with a second terminal;
acquiring an address identifier of the second terminal according to the first call request;
judging whether the second terminal is a terminal in a private network or not according to the address identifier;
when the second terminal is a terminal in a private network, sending request information to the second terminal;
receiving a second call request sent by the second terminal in response to the request information;
and establishing a communication connection between the second terminal and the first terminal based on the second call request.
2. The method of claim 1, wherein before receiving the first call request from the first terminal, the method further comprises:
receiving a first registration message of the first terminal and a second registration message of the second terminal;
extracting the address identification of the first terminal from the first registration message, and extracting the address identification of the second terminal from the second registration message;
and respectively storing the address identifier of the first terminal and the address identifier of the second terminal in an address mapping table.
3. The method of claim 2, wherein the address identifier of the first terminal comprises a first terminal number and a first IP address, and the address identifier of the second terminal comprises a second terminal number and a second IP address; the storing the address identifier of the first terminal and the address identifier of the second terminal in an address mapping table respectively comprises:
respectively judging whether the first terminal number and the second terminal number belong to the serial numbers in the current domain;
when the first terminal number belongs to the number in the current network domain, storing the first terminal number and the first IP address in the address mapping table;
and when the second terminal number belongs to the number in the current network domain, storing the second terminal number and the second IP address in the address mapping table.
4. The method of claim 1, wherein the address identification comprises a second terminal number; the judging whether the second terminal is a terminal in a private network according to the address identifier comprises:
searching a second IP address corresponding to the second terminal number from an address mapping table;
judging whether the second IP address is a private address;
and when the second IP address is a private address, determining that the second terminal is a terminal in a private network.
5. The method of claim 1, wherein after sending the request message to the second terminal, the method further comprises:
starting a timer to time;
and when the second call request is not received within the specified timing duration, sending call failure information to the first terminal.
6. The method of claim 1, wherein the establishing the communication connection between the second terminal and the first terminal based on the second call request comprises:
sending a first permission instruction to the second terminal according to the second call request so that the second terminal sends a connection establishment message to the first terminal according to the first permission instruction;
receiving an solicitation message sent by the first terminal in response to the connection establishment message;
and sending a second permission instruction to the first terminal so that the first terminal establishes communication connection with the second terminal after receiving the second permission instruction.
7. The method of claim 1, wherein after the establishing the communication connection between the second terminal and the first terminal based on the second call request, the method further comprises:
receiving a bandwidth change request;
responding to the bandwidth change request, and judging whether the first terminal and the second terminal have the use permission of a target bandwidth value;
and if so, changing the bandwidth of the communication channel between the first terminal and the second terminal according to the bandwidth change request.
8. An apparatus for establishing a communication connection, the apparatus comprising:
the receiving module is used for receiving a first call request sent by a first terminal; the first terminal is a terminal in a public network, and the first call request is used for establishing communication connection with a second terminal;
an obtaining module, configured to obtain an address identifier of the second terminal according to the call request;
the judging module is used for judging whether the second terminal is a terminal in a private network or not according to the address identifier;
a sending module, configured to send request information to the second terminal when the second terminal is a terminal in a private network;
the receiving module is further configured to receive a second call request sent by the second terminal in response to the request information;
and the establishing module is used for establishing the communication connection between the second terminal and the first terminal based on the second call request.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010820582.3A CN112153109B (en) | 2020-08-14 | 2020-08-14 | Method, device, computer equipment and storage medium for establishing communication connection |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010820582.3A CN112153109B (en) | 2020-08-14 | 2020-08-14 | Method, device, computer equipment and storage medium for establishing communication connection |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112153109A true CN112153109A (en) | 2020-12-29 |
CN112153109B CN112153109B (en) | 2023-09-29 |
Family
ID=73888817
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010820582.3A Active CN112153109B (en) | 2020-08-14 | 2020-08-14 | Method, device, computer equipment and storage medium for establishing communication connection |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112153109B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1553667A (en) * | 2003-06-05 | 2004-12-08 | 中兴通讯股份有限公司 | Method for building call between multimedia apparatus |
CN1893426A (en) * | 2005-07-08 | 2007-01-10 | 中国电信股份有限公司 | Method and system for realizing pass-through of fier-wall at personal network video signals |
CN109698869A (en) * | 2017-10-23 | 2019-04-30 | 中国移动通信有限公司研究院 | Private network traversing method, communication node and storage medium |
-
2020
- 2020-08-14 CN CN202010820582.3A patent/CN112153109B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1553667A (en) * | 2003-06-05 | 2004-12-08 | 中兴通讯股份有限公司 | Method for building call between multimedia apparatus |
CN1893426A (en) * | 2005-07-08 | 2007-01-10 | 中国电信股份有限公司 | Method and system for realizing pass-through of fier-wall at personal network video signals |
CN109698869A (en) * | 2017-10-23 | 2019-04-30 | 中国移动通信有限公司研究院 | Private network traversing method, communication node and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN112153109B (en) | 2023-09-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR100442594B1 (en) | Packet data service method for wireless telecommunication system and apparatus therefor | |
US20150036641A1 (en) | MOBILE PHONE DOCKING STATION VPNs | |
US20140242980A1 (en) | Selection of roaming gateway | |
US8914867B2 (en) | Method and apparatus for redirecting data traffic | |
US20200053136A1 (en) | Originating caller verification via insertion of an attestation parameter | |
JP2012515466A (en) | Policy service system architecture for sessions created using STUN | |
CN101171820A (en) | Service provisioning in a communications system | |
US9094901B2 (en) | Utilization of multiple access points to support multiple applications and services | |
WO2022227710A1 (en) | Privacy protection call method and corresponding apparatus | |
US10791464B2 (en) | Method for establishing a secure connection | |
US11792609B2 (en) | Method and apparatus for ad-hoc communication in mission critical systems (MCX) | |
CN109936515B (en) | Access configuration method, information providing method and device | |
US11171927B2 (en) | Method for enabling establishment of a direct connection | |
US20040034705A1 (en) | Connecting devices in a data network | |
US8903985B2 (en) | Sharing status information across a plurality of communication networks | |
JP5487116B2 (en) | Method and apparatus for network roaming enterprise extension identity | |
US12261892B2 (en) | Public land mobile network support for a stand-alone non-public access network | |
US20210195465A1 (en) | Traffic in a distributed cloud system | |
CN112153109B (en) | Method, device, computer equipment and storage medium for establishing communication connection | |
US20200021626A1 (en) | Management of subscriber identity in service provision | |
WO2016131297A1 (en) | Method and device for limiting non-permissive user equipment on access to home gateway | |
CN107534847B (en) | A discovery method and device | |
CN115118786B (en) | Edge service scheduling method, device and system, storage medium | |
US8667564B1 (en) | Mobile internet protocol V6 SIP proxy bootstrapping | |
CN111315037B (en) | Communication link establishing method and device, computer equipment and storage medium |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |