[go: up one dir, main page]

CN112153109B - 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 PDF

Info

Publication number
CN112153109B
CN112153109B CN202010820582.3A CN202010820582A CN112153109B CN 112153109 B CN112153109 B CN 112153109B CN 202010820582 A CN202010820582 A CN 202010820582A CN 112153109 B CN112153109 B CN 112153109B
Authority
CN
China
Prior art keywords
terminal
address
communication connection
network
receiving
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.)
Active
Application number
CN202010820582.3A
Other languages
Chinese (zh)
Other versions
CN112153109A (en
Inventor
潘娇娇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ifreecomm Technology Co ltd
Original Assignee
Ifreecomm Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ifreecomm Technology Co ltd filed Critical Ifreecomm Technology Co ltd
Priority to CN202010820582.3A priority Critical patent/CN112153109B/en
Publication of CN112153109A publication Critical patent/CN112153109A/en
Application granted granted Critical
Publication of CN112153109B publication Critical patent/CN112153109B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup 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, a device, 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 the 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 according to the address identification; when the second terminal is a terminal in a private network, request information is sent to the second terminal; receiving a second call request sent by the second terminal in response to the request information; and establishing 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 NAT equipment and the firewall do not support the communication protocol.

Description

Method, device, computer equipment and storage medium for establishing communication connection
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a computer device, and a storage medium for establishing a communication connection.
Background
With the development of computer technology, the number and scale of private networks is continually expanding. NAT (Network Address Translation ) devices or firewalls are commonly used in private networks due to the number of IPv4 addresses being tense and network security issues. When a terminal in the public network adopts a certain type of communication protocol (such as an H.323 protocol) to communicate, if the NAT device and the firewall do not support the certain type of communication protocol, the terminal in the public network cannot penetrate through the NAT device and the firewall to establish communication connection with the terminal in the private network.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a method, an apparatus, a computer device, and a storage medium for establishing a communication connection, so that a communication connection can be smoothly established with a terminal in a private network even if a NAT device and a 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 the 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 according to the address identification;
when the second terminal is a terminal in a private network, request information is sent to the second terminal;
receiving a second call request sent by the second terminal in response to the request information;
and establishing communication connection between the second terminal and the first terminal based on the second call request.
In one embodiment, before the 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 identifier of the first terminal from the first registration message, and extracting the address identifier of the second terminal from the second registration message;
and respectively storing the address identification of the first terminal and the address identification of the second terminal in an address mapping table.
In one embodiment, the address identifier of the first terminal includes a first terminal number and a first IP address, and the address identifier of the second terminal includes 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 the address mapping table includes:
Judging whether the first terminal number and the second terminal number belong to the number in the current network domain or not respectively;
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 includes a second terminal number; the judging whether the second terminal is a terminal in a private network according to the address identification 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 or not;
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 the sending the request information to the second terminal, the method further includes:
starting a timer to count time;
and when the second call request is not received within the designated timing duration, sending call failure information to the first terminal.
In one embodiment, the establishing a 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 a request 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 communication connection between the second terminal and the first terminal is established based on the second call request, the method further includes:
receiving a bandwidth change request;
responding to the bandwidth change request, judging whether the first terminal and the second terminal have the use authority of a target bandwidth value;
if so, changing the bandwidth of the communication channel between the first terminal and the second terminal according to the bandwidth changing request.
An apparatus for establishing a communication connection, the apparatus comprising:
the receiving module is used for receiving a first call request sent by the 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 acquisition module is used for acquiring the address identification 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 according to the address identification;
the sending module is used for sending request information to the second terminal when the second terminal is a terminal in a private network;
the receiving module is further used for receiving a second call request sent by the second terminal in response to the request information;
and the establishing module is used for establishing 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;
the extraction module is used for extracting the address identifier of the first terminal from the first registration message and extracting the address identifier of the second terminal from the second registration message;
and the storage module is used for respectively storing the address identification of the first terminal and the address identification of the second terminal in an address mapping table.
In one embodiment, the address identifier of the first terminal includes a first terminal number and a first IP address, and the address identifier of the second terminal includes a second terminal number and a second IP address; the storage module is further configured to:
Judging whether the first terminal number and the second terminal number belong to the number in the current network domain or not respectively;
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 includes 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 or not;
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 a timer to count 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 appointed 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 a request 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:
the receiving module is used for receiving the bandwidth change request;
the judging module is used for responding to the bandwidth changing request and judging whether the first terminal and the second terminal have the use authority of the target bandwidth value or not;
and 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 if the bandwidth is changed.
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 establishing a communication connection.
A computer readable storage medium having stored thereon a computer program, characterized in that the computer program when executed by a processor realizes 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 if the second terminal called by the first terminal is a terminal in the private network, so as to instruct the second terminal to call the first terminal through the request information. The network equipment converts the terminal in the public network calling the terminal in the private network into the terminal in the private network calling the terminal in the public network, and under the condition that the NAT equipment and the firewall do not support the communication protocol used by the communication network, the terminal in the public network and the terminal in the private network can smoothly establish communication connection, so that the condition that the terminal in the public network cannot establish communication connection with the terminal in the private network is prevented.
Drawings
FIG. 1 is an application environment diagram of a method of establishing a communication connection in one embodiment;
FIG. 2 is a flow diagram of a method of 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 of an apparatus for establishing a communication connection in another embodiment;
fig. 6 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The method for establishing communication connection provided by the application can be applied to an application environment shown in figure 1. Wherein the network device 102 communicates with the first terminal 104 and the second terminal 106 over a network. After receiving the first call request sent by the first terminal 104 in the public network, the network device determines whether the second terminal 106 called by the first terminal 104 is a terminal in the 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, so as to instruct the second terminal 106 to call the first terminal 104 through the request information, thereby establishing a communication connection between the first terminal 104 and the second terminal 106. Wherein 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, notebook computers, smart phones, tablet computers, and portable wearable devices.
In one embodiment, as shown in fig. 2, a method for establishing a communication connection is provided, and the method is applied to the network device in fig. 1 for illustration, and includes the following steps:
s202, network equipment receives a first call request sent by a first terminal; the first terminal is a terminal in the public network, and the first call request is used for establishing communication connection with the second terminal.
Wherein the network device is an entity in a communication network for providing management services, such as providing services for address translation, network access control, etc., for gateways, multipoint control units, terminals, etc., in the communication network.
The first terminal and the second terminal are nodes in a communication network. The first terminal is a terminal in the public network.
The first terminal and the second terminal may be various user devices, for example, may be computer devices of users in the video conference system (for example, a personal computer desktop terminal or a conference room terminal), may be a multipoint control unit in the video conference system, may be a router in a communication network, may be a telephone set, or 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 the address identification of the first terminal of the calling party and the address identification of the second terminal of the called party.
The first call request may be signaling of a network layer protocol, for example, signaling of the 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 access the terminal in the public network at will.
S204, the network equipment acquires the address identification 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 (for example, gwy1@domain.com), an e.164 number (standard phone number), or an IP (Internet Protocol ) address.
After the network device obtains the first call request, the network protocol ID or e.164 number of the second terminal may be directly extracted from the first call request. The IP address of the second terminal may also be obtained according to the network protocol ID or the e.164 number after the network protocol ID or the e.164 number of the second terminal is obtained.
S206, the network equipment judges whether the second terminal is a terminal in the private network according to the address identification.
Wherein the private network is a network inside a special institution, and a terminal in the private network uses a private IP address. Terminals in the private network cannot directly access the internet through private IP addresses, but first map the private IP addresses to public IP addresses by means of NAT. 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.0-192.168.255.255) addresses.
The network equipment acquires the address identification of the second terminal according to the first call request, acquires the IP address of the second terminal according to the address identification of the second terminal, and judges whether the second terminal is a terminal in the private network by comparing the IP address of the second terminal with the private IP address.
And S208, when the second terminal is a terminal in the private network, the network equipment 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, so that communication connection is established 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, since the IP address of the second terminal is a private address and is not routable in the internet, the second terminal cannot receive a 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, in the case that the NAT device and the firewall in the private network do not support the communication protocol used by the communication 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 that communication connection is established between the first terminal and the second terminal.
S210, the network device receives a second call request sent by the second terminal in response to the request information.
The second call request is used for prompting the network equipment that the second terminal wants to establish communication connection with the first terminal. The second call request may be signaling of a network layer protocol, for example, q.931 protocol signaling.
Before the second terminal sends the second call request, judging whether to agree to establish communication connection with the first terminal according to the request information, and if the second terminal agrees to establish communication connection with the first terminal, sending the second call request to the network equipment; if the second terminal does not agree to establish a communication connection with the first terminal, a rejection message is sent to the network device and a rejection reason may be recorded in the rejection message. And the network equipment forwards the rejection message to the first terminal after receiving the rejection message.
The second terminal may decide whether to agree to establish a communication connection with the first terminal according to the address identification of the first terminal acquired from the request information. Or it may also decide whether to agree to establish a 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 a communication connection with the first terminal. Or it may also decide whether to agree to establish a communication connection with the first terminal according to the situation of the communication service in progress itself, for example, if the second terminal is in video communication with the other terminal, the establishment of the communication connection with the first terminal may be denied.
S212, the network equipment establishes communication connection between the second terminal and the first terminal based on the second call request.
After the network device obtains the second call request, a communication connection is established 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 the first terminal to exchange data with the second terminal by directly establishing a communication connection. Or the first terminal and the second terminal can exchange data through the network equipment, and the two terminals do not directly exchange data, so that the data safety 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 if the second terminal called by the first terminal is a terminal in the private network, so as to instruct the second terminal to call the first terminal through the request information. The network equipment converts the terminal in the public network calling the terminal in the private network into the terminal in the private network calling the terminal in the public network, and under the condition that the NAT equipment and the firewall do not support the communication protocol used by the communication network, the terminal in the public network and the terminal in the private network can smoothly establish communication connection, so that the condition 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 find a network device within the network domain in which they are located before starting to communicate. The first terminal and the second terminal send a request for searching the network equipment to the target port. After receiving the request of searching the network device sent by the first terminal and the second terminal, if the first terminal and the second terminal are allowed to join the network domain governed by the first terminal and the second terminal, the network device sends a confirmation message to the first terminal and the second terminal, and sends the network device address to the first terminal and the second terminal, so that the first terminal and the second terminal communicate with the network device through the network device 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, a rejection message is sent to the first terminal and the second terminal. When the terminals need the service provided by the network device, the terminals dynamically join the network device instead of statically configuring the network device for all the terminals, so that the overhead of the network device for managing the terminals can be reduced. And if the network device to which the terminal is connected is offline, the terminal may attempt to rediscover the new network device without the communication activity being affected by the network device being offline.
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 identifier of the first terminal from the first registration message, and extracting the address identifier of the second terminal from the second registration message; and respectively storing the address identification of the first terminal and the address identification of the second terminal in an address mapping table.
Wherein the first registration message is a message that the first terminal sends to the network device to register. The first registration message includes an address identifier of the first terminal. The address identification of the first terminal includes a first terminal number and a first IP address.
Wherein the second registration message is a message that the second terminal sends to the network device to register. The second registration message includes an address identification of the second terminal. The address identification 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 that indicate a data encryption manner 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 by adopting a corresponding decryption manner 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 and corresponding IP addresses of the terminals.
In one embodiment, the address identification of the first terminal includes a first terminal number and a first IP address, and the address identification of the second terminal includes a second terminal number and a second IP address; the network device storing the address identifier of the first terminal and the address identifier of the second terminal in the address mapping table respectively includes: judging whether the first terminal number and the second terminal number belong to the number in the current network domain or not respectively; 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 an address mapping table.
In addition, the network device determines whether the first terminal and the second terminal have been registered with other network devices by communicating with the other network devices, and if the first terminal or the second terminal has been registered with other network devices, the repeated registration of the terminal is refused to prevent the terminal from repeatedly registering a plurality of network devices.
In one embodiment, the address identification of the second terminal includes 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 comprises: 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 or not; and when the second IP address is the private address, determining that the second terminal is a terminal in the private network.
After the network device obtains the second terminal number of the second terminal, the network device searches the address mapping table for the second IP address corresponding to the second terminal number, and then compares the second IP address with the A, B, C private IP address to determine whether the second IP address is a private address.
In one embodiment, after the network device sends the request information to the second terminal, the method further includes: starting a timer to count time; and when the second call request is not received within the designated timing duration, sending call failure information to the first terminal.
The network equipment can specify the timing duration according to the network congestion condition, and if the network communication is smooth, the second call request sent by the second terminal can reach the network equipment in a shorter time, and a shorter timing duration is specified; if the network congestion is severe, the second call request sent by the second terminal may take a longer time to reach the network device, and a longer time duration is specified.
If the network device does not receive the second call request within the specified time duration, the network device indicates that the connection cannot be established with the second terminal, or the second terminal refuses to establish the communication connection with the first terminal. The network device sends the call failure information to the first terminal to prevent the first terminal from continuously waiting for the communication connection to be established with the second terminal, thereby wasting network resources.
In one embodiment, the network device establishing a communication connection of the second terminal with 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 a request message sent by a first terminal in response to a 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.
Wherein the first grant instruction is for informing the second terminal that the network device allows it to establish a communication connection with the first terminal. The first permission instruction may include a communication time interval or a communication duration in which the second terminal communicates with the first terminal, or may include a network bandwidth that may be utilized when the second terminal communicates 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 communication connection.
The request message is a message sent to the network device for requesting the network device whether the communication connection with the second terminal can be established after the first terminal receives the connection establishment message sent by the second terminal.
Wherein the second grant instruction is used for informing the first terminal that the network device allows the network device to establish a communication connection with the second terminal. The second grant instruction may include a communication time interval or a communication duration of the second terminal communicating with the first terminal, or may include a network bandwidth that may be utilized when the second terminal communicates 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, the network device sends a first permission instruction to the second terminal, and if the network device does not allow the second terminal to establish communication connection with the first terminal, the network device informs the rejection reason of the second terminal by sending a message to 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. After receiving the connection establishment message sent by the second terminal, the first terminal requests the network equipment whether the communication connection can be established with 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 of the second terminal with the first terminal based on the second call request, the method further comprises: receiving a bandwidth change request; responding to the bandwidth changing request, judging whether the first terminal and the second terminal have the use authority of the target bandwidth value; if so, changing the bandwidth of the communication channel between the first terminal and the second terminal according to the bandwidth changing 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 the bandwidth requested by the first terminal or the second terminal.
In one embodiment, the first terminal, the second terminal and the network device interact such that a timing diagram of the communication connection between the first terminal and the second terminal is 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. After the second terminal sends the second registration message to the network device, the network device 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 identification of the first terminal and the address identification of the second terminal in an address mapping table.
The network equipment receives a first call request of the first terminal and acquires an address identification of the 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 a request message to the network equipment. And the network equipment sends a second permission instruction to the first terminal after receiving the request message sent by the first terminal. The first terminal establishes communication connection with the second terminal after receiving the second grant instruction.
It should be understood that, although the steps in the flowcharts of fig. 2-3 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in fig. 2-3 may include multiple steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor does the order in which the steps or stages are performed necessarily performed in sequence, but may be performed alternately or alternately with at least a portion of the steps or stages in other steps or other steps.
In one embodiment, as shown in fig. 4, there is provided an apparatus for establishing a communication connection, comprising: a receiving module 402, an acquiring module 404, a judging module 406, a transmitting 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 the 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;
the receiving module 402 is further configured to receive a second call request sent by a second terminal in response to the request information;
the establishing module 410 is 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 if the second terminal called by the first terminal is a terminal in the private network, so as to instruct the second terminal to call the first terminal through the request information. The network equipment converts the terminal in the public network calling the terminal in the private network into the terminal in the private network calling the terminal in the public network, and under the condition that the NAT equipment and the firewall do not support the communication protocol used by the communication network, the terminal in the public network and the terminal in the private network can smoothly establish communication connection, so that the condition 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:
the receiving module 402 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 412, 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;
the storage module 414 is 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 identification of the first terminal includes a first terminal number and a first IP address, and the address identification of the second terminal includes a second terminal number and a second IP address; the storage module 414 is further configured to:
judging whether the first terminal number and the second terminal number belong to the number in the current network domain or not respectively;
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 an address mapping table.
In one embodiment, the address identification includes a second terminal number; the judging 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 or not;
and when the second IP address is the private address, determining that the second terminal is a terminal in the private network.
In one embodiment, the apparatus further comprises:
a starting module 416, configured to start a timer to count time;
and a sending module 408, configured to send call failure information to the first terminal when the second call request is not received within the specified time 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 a request message sent by a first terminal in response to a 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 is further configured to judge whether the first terminal and the second terminal have the usage rights of the target bandwidth value in response to the bandwidth change request;
And a changing module 418, if yes, configured to change the bandwidth of the communication channel between the first terminal and the second terminal according to the bandwidth change request.
For specific limitations on the means for establishing a communication connection, reference may be made to the limitations of the method for establishing a communication connection described above, and will not be repeated here. The respective modules in the above-described means for establishing a communication connection may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above 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 includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. 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.
It will be appreciated by those skilled in the art that the structure shown in FIG. 6 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the 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 stored therein a computer program, the processor when executing the computer program performing the steps of: receiving a first call request sent by a first terminal; the first terminal is a terminal in the 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 according to the address identification; when the second terminal is a terminal in the private network, request information is sent to the second terminal; receiving a second call request sent by a second terminal in response to the request information; a communication connection between the second terminal and the first terminal is established 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 identifier of the first terminal from the first registration message, and extracting the address identifier of the second terminal from the second registration message; and respectively storing the address identification of the first terminal and the address identification 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; storing the address identification of the first terminal and the address identification of the second terminal in the address mapping table respectively includes: judging whether the first terminal number and the second terminal number belong to the number in the current network domain or not respectively; 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 an 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 or not; and when the second IP address is the private address, determining that the second terminal is a terminal in the private network.
In one embodiment, the processor when executing the computer program further performs the steps of: starting a timer to count time; and when the second call request is not received within the designated 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 a request message sent by a first terminal in response to a 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 changing request, judging whether the first terminal and the second terminal have the use authority of the target bandwidth value; if so, changing the bandwidth of the communication channel between the first terminal and the second terminal according to the bandwidth changing 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 the 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 according to the address identification; when the second terminal is a terminal in the private network, request information is sent to the second terminal; receiving a second call request sent by a second terminal in response to the request information; a communication connection between the second terminal and the first terminal is established 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 identifier of the first terminal from the first registration message, and extracting the address identifier of the second terminal from the second registration message; and respectively storing the address identification of the first terminal and the address identification 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; storing the address identification of the first terminal and the address identification of the second terminal in the address mapping table respectively includes: judging whether the first terminal number and the second terminal number belong to the number in the current network domain or not respectively; 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 an 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 or not; and when the second IP address is the private address, determining that the second terminal is a terminal in the private network.
In one embodiment, the computer program when executed by the processor further performs the steps of: starting a timer to count time; and when the second call request is not received within the designated 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 a request message sent by a first terminal in response to a 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 changing request, judging whether the first terminal and the second terminal have the use authority of the target bandwidth value; if so, changing the bandwidth of the communication channel between the first terminal and the second terminal according to the bandwidth changing request.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, or the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.

Claims (10)

1. 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 the 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 according to the address identification;
When the second terminal is a terminal in a private network, request information is sent to the second terminal;
when the second terminal does not agree to establish communication connection with the first terminal, receiving a rejection message sent by the second terminal in response to the request information, wherein a rejection reason is recorded in the rejection message, and the rejection message is obtained by the second terminal according to the situation of the communication service in progress;
receiving a second call request sent by the second terminal in response to the request information when the second terminal agrees to establish communication connection with the first terminal;
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 a request message sent by the first terminal in response to the connection establishment message;
sending a second permission instruction to the first terminal so that the first terminal can directly establish communication connection with the second terminal after receiving the second permission instruction;
starting a timer to count time; and when the second call request is not received within the appointed time duration, sending call failure information to the first terminal, wherein the time duration is determined according to the network congestion condition.
2. The method of claim 1, wherein prior to receiving the first call request sent by 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 identifier of the first terminal from the first registration message, and extracting the address identifier of the second terminal from the second registration message;
and respectively storing the address identification of the first terminal and the address identification of the second terminal in an address mapping table.
3. The method of claim 2, wherein the address identification of the first terminal comprises a first terminal number and a first IP address, and wherein the address identification 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 the address mapping table includes:
judging whether the first terminal number and the second terminal number belong to the number in the current network domain or not respectively;
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 identification 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 or not;
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 the second grant instruction includes a communication time interval or a communication duration for the second terminal to communicate with the first terminal.
6. The method according to claim 1, wherein the method further comprises:
and sending a second permission instruction to the first terminal so that the first terminal establishes communication connection with the second terminal through network equipment after receiving the second permission instruction.
7. The method of claim 1, wherein the sending a second grant instruction to the first terminal causes the first terminal to establish a communication connection directly with the second terminal after receiving the second grant instruction, the method further comprising:
Receiving a bandwidth change request;
responding to the bandwidth change request, judging whether the first terminal and the second terminal have the use authority of a target bandwidth value;
if so, changing the bandwidth of the communication channel between the first terminal and the second terminal according to the bandwidth changing 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 the 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 acquisition module is used for acquiring the address identification 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 according to the address identification;
the sending module is used for sending 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 rejection message sent by the second terminal in response to the request information when the second terminal does not agree to establish communication connection with the first terminal, where a rejection reason is recorded in the rejection message, and the rejection message is obtained by the second terminal according to an ongoing communication service situation of the second terminal; receiving a second call request sent by the second terminal in response to the request information when the second terminal agrees to establish communication connection with the first terminal;
The establishing module is used for sending a first permission instruction to the second terminal according to the second call request so that the second terminal sends a connection establishing message to the first terminal according to the first permission instruction; receiving a request message sent by the first terminal in response to the connection establishment message; sending a second permission instruction to the first terminal so that the first terminal can directly establish communication connection with the second terminal after receiving the second permission instruction; starting a timer to count time; and when the second call request is not received within the appointed time duration, sending call failure information to the first terminal, wherein the time duration is determined according to the network congestion condition.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 7 when the computer program is executed.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
CN202010820582.3A 2020-08-14 2020-08-14 Method, device, computer equipment and storage medium for establishing communication connection Active CN112153109B (en)

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 CN112153109A (en) 2020-12-29
CN112153109B true 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)

* Cited by examiner, † Cited by third party
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

Patent Citations (3)

* Cited by examiner, † Cited by third party
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
CN112153109A (en) 2020-12-29

Similar Documents

Publication Publication Date Title
US10356619B2 (en) Access through non-3GPP access networks
US11063990B2 (en) Originating caller verification via insertion of an attestation parameter
KR20210116508A (en) Improved handling of unique identifiers for stations
WO2022033346A1 (en) Network slicing management system, application server and terminal device
EP3130124B1 (en) Selectively exchanging data between p2p-capable client devices via a server
EP3905740B1 (en) Sim card registration method and apparatus, computer device, and storage medium
US20230008647A1 (en) Connection establishment method, communication apparatus, and system
CN109936515B (en) Access configuration method, information providing method and device
CN111132305B (en) Method for 5G user terminal to access 5G network, user terminal equipment and medium
EP2218214B1 (en) Network location service
KR20230107742A (en) Network function registration methods, discovery methods, devices, equipment and media
TWI640214B (en) Network access method, related equipment and system
RU2608673C2 (en) Handling session initiation protocol messages in wireless telecommunications device
CN111093196B (en) Method for 5G user terminal to access 5G network, user terminal equipment and medium
JP2016143076A (en) COMMUNICATION CONTROL DEVICE, COMMUNICATION CONTROL METHOD, AND COMMUNICATION CONTROL PROGRAM
CN112153109B (en) Method, device, computer equipment and storage medium for establishing communication connection
US8892139B2 (en) Systems and methods enabling a short message service gateway via cloud computing services
EP3595262B1 (en) Management of subscriber identity in service provision
WO2020147854A1 (en) Authentication method, apparatus and system, and storage medium
US10645085B2 (en) Device management across multiple operator networks
CN107534847B (en) A discovery method and device
CN110324826B (en) Intranet access method and related device
JP2010146246A (en) Framework computer program for multi-agent system, network system and inter-agent communication method
US11653334B2 (en) Systems and methods for reducing transcoding resource allocation during call setup to multiple terminations
US20230319684A1 (en) Resource filter for integrated networks

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