Patent Description:
With the development of electronic device technology, users use electronic devices for voice over long-term evolution (voice over long-term evolution, VoLTE) video or voice calls based on session initiation protocol (session initiation protocol, SIP) more and more frequently.

In related technology, during establishment of a VoLTE call between two electronic devices, a mobile terminated (mobile terminated, MT) device will not respond to a new VoLTE call. Furthermore, for a received request for establishing a new VoLTE call, the MT device will send a <NUM> (user busy) error code.

However, when the MT device receives two different INVITE requests from the same mobile original (mobile original, MO) device, due to asynchronous communication between a network and the terminal, both the INVITE requests fail, making it impossible to establish a video or voice call, reducing a success rate of establishing a VoLTE call, and the like.

Document <CIT> discloses that a first Session Initiation Protocol INVITE message for a first Session Initiation Protocol dialog may be received. A second Session Initiation Protocol INVITE message for a second Session Initiation Protocol dialog other than the first Session Initiation Protocol dialog may be received.

Document <CIT> discloses that a method and apparatus for multi-media communication includes transmitting a first session invite request having a plurality of first call transaction identifiers, in which each of the first call transaction identifiers has a first call transaction value.

Document <CIT> discloses that that the originating UE sends a SIP CANCEL request to terminate the establishment of the first communication session and waits for a response. While waiting for the SIP CANCEL response, the originating UE sends a second session request to the terminating UE through the CS network.

Embodiments of this application aim to provide a call establishment method and apparatus, and a readable storage medium, which can solve the problem of a low success rate of establishing a VoLTE call in some scenarios.

According to a first aspect, the embodiments of this application provide a call establishment method, which is defined in claim <NUM>.

According to a second aspect, the embodiments of this application further provide a call establishment apparatus, which is defined in claim <NUM>.

According to a third aspect, the embodiments of this application provide a readable storage medium, which is defined in claim <NUM>.

According to a fourth aspect, the embodiments of this application provide a computer program product, which is defined in claim <NUM>.

The technical solutions in embodiments of this application are clearly and completely described below with reference to the accompanying drawings in the embodiments of this application. Apparently, the described embodiments are merely some rather than all of the embodiments of this application. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of this application without making creative efforts shall fall within the protection scope of this application.

Terms "first", "second" and the like in this specification and claims of this application are used for distinguishing similar objects, but are unnecessarily used for describing a specific sequence or order. It should be understood that data used like this is interchangeable where appropriate, so that the embodiments of this application can be implemented in an order other than those illustrated or described here. Furthermore, objects distinguished by "first", "second", and the like are usually of the same class and do not limit the number of objects. For example, the first object can be one or more. In addition, "and/or" used in this specification and the claims represents at least one of the connected objects. Symbol "/" usually represents an "or" relationship between front and back associated objects.

A call establishment method provided by the embodiments of this application can be applied to a scenario for establishing a SIP-based call.

<FIG> shows a schematic flowchart of establishing a SIP-based call connection between two electronic devices (an MO device and an MT device). As shown in <FIG>, in a case that a call connection is established between the MO device and the MT device on the basis of a SIP, the method specifically includes the following steps:.

Step <NUM>: The MO device initiates a call request, and sends an INVITE request to a network (network, NW) device. The above INVITE request includes a session type and call parameters (for example, a network address of the MT device) of a session established by the MO device and the MT device. Exemplarily, the above session type can be a voice session, or can be a multimedia video used in a net meeting, or can be a game session.

Step <NUM>: After receiving the INVITE request sent by the MO device, the NW device interpolates a network address of the NW device into the INVITE request, and sends the INVITE request to the MT device indicated by the INVITE request. After receiving the INVITE request sent by the NW device, the MT device sends response information to the NW device: 100Trying. At this time, the MT device rings to prompt a user that there is an incoming call, and then sends ringing information to the NW device: 180Ringing. After receiving the ringing information sent by the MT device, the NW device sends the ringing information to the MO device: 180Ringing.

In addition, after receiving the INVITE request sent by the MO device, the NW device may send the response information to the MO device while sending the INVITE request to the MT device: 100Trying.

Step <NUM>: After the user of the MT device picks up the phone, the MT device sends connection success response information to the NW device: 200OK. After receiving the connection success response information sent by the MT device, the NW device sends the connection success response information to the MO device: 200OK.

Step <NUM>: After receiving the connection success response information sent by the NW device, the MO device sends acknowledge character (acknowledge character, ACK) information to the NW device for acknowledgment. After receiving the ACK information sent by the MO device, the NW device sends the ACK information to the MT device for acknowledgment. After the acknowledgment, the MO device and the MT device establish a communication connection and start a call.

For the above scenario of establishing the SIP-based call, there are some special scenarios in the related technology. In these scenarios, it is possible that establishment of SIP calls between electronic devices fails. Exemplarily, in scenario <NUM> as shown in <FIG>, after the MO device fails in origination of a VoLTE call <NUM>, the MO device falls back to a CS field and initiates a VoLTE call <NUM> again. In scenario <NUM> as shown in <FIG>, the MO device initiates a VoLTE call <NUM>, but due to some reasons, the NW device considers that an INVITE request of the call <NUM> is abnormal, so that the NW device may send a new INVITE request again after sending the INVITE request to the MT device.

In the above two scenarios, the MT device may receive two different INVITE requests, that is, the two INVITE requests have the same number of From header fields, the same number of To header fields, and different Call-id values. The MT device may reply a <NUM> (user busy) error code for the INVITE request of the call <NUM> according to an RFC3261 protocol, and the NW device may clear away INVITE affairs of the call <NUM>, so that the INVITE requests of the two calls fail, and the MO device and the MT device cannot be connected via a voice or video call.

For the above problems, the embodiments of this application provide a call establishment method to solve the above problems. The call establishment method provided by the embodiments of this application is described in detail below through specific embodiments and application scenarios thereof in combination with the accompanying drawings.

<FIG> shows the call establishment method provided by the embodiments of this application. The method may include the following step <NUM> and step <NUM>:.

Step <NUM>: In a case that a call establishment apparatus receives a first INVITE request sent by a second electronic device and does not receive an INVITE ACK message sent by the second electronic device, the call establishment apparatus receives a second INVITE request.

Exemplarily, in the above scenarios as shown in <FIG> and <FIG>, the MO device initiates the INVITE request for establishing a SIP call, and the SIP call is not established successfully, that is, the MT device does not receive an INVITE ACK message sent by the MO device. In a case that the SIP call is not established successfully, the MT device receives another INVITE request for establishing a SIP call.

Usually, the MT device may reply a <NUM> error code, and reject the second INVITE request for establishing a SIP call. However, in the scenarios as shown in <FIG> and <FIG>, since the MT device rejects the second INVITE request, and the NW device clears away affairs of the first INVITE request, the establishments of the two SIP calls fail.

Step <NUM>: In a case that it is determined that both the second INVITE request and the first INVITE request are sent by the second electronic device, the call establishment apparatus sends a target message to the second electronic device, and establishes a communication connection based on the second INVITE request,
where the above target message is used for interrupting a communication connection established on the basis of the first INVITE request.

Exemplarily, in the scenarios as shown in <FIG> and <FIG>, the above second INVITE request can be sent by the MO device or the NW device, so that the above second electronic device can be an MO device or an NW device. Correspondingly, the above first electronic device can be an NW device or an MT device.

Exemplarily, after receiving the above second INVITE request, the first electronic device sends, to the second electronic device, the target message used for interrupting the communication connection established on the basis of the first INVITE request, and establishes the communication connection based on the second INVITE request. The first electronic device and the second electronic device can be devices of different combinations in different scenarios, so that the above target message is also different in different scenarios.

It can be understood that according to the call establishment method provided by the embodiments of this application, after receiving two different INVITE requests sent by the same electronic device, the first electronic device interrupts, in the manner of sending the target message to the electronic device, the communication connection established on the basis of the first INVITE request, and establishes the communication connection based on the second INVITE request.

It should be noted that in a case that the above second INVITE request and the above first INVITE request are sent by different electronic devices, the first electronic device can directly reject the second INVITE request without affecting the establishment of the SIP call based on the first INVITE request with the second electronic device.

In this way, in a case that the first INVITE request sent by the second electronic device is received and that the INVITE ACK message sent by the second electronic device is not received, and in a case that the second INVITE request sent by the second electronic device is received, the communication connection established on the basis of the first INVITE request is interrupted in a manner of sending the target message to the second electronic device, and the communication connection based on the second INVITE request is established, which increases the success rate of establishing a SIP-based call by the electronic devices in the above scenarios.

Optionally, in the embodiments of this application, different scenarios correspond to different first electronic devices and different second electronic devices.

Exemplarily, the device that sends the second INVITE request is an MO device, so that the first electronic device is a network NW device in a case that the second electronic device is the MO device.

Exemplarily, the device that sends the second INVITE request is an NW device, so that the first electronic device is an MT device in a case that the second electronic device is the NW device.

Further optionally, in the embodiments of this application, for the scenario as shown in <FIG>, in a case that the second electronic device is the MO device and the first electronic device is the NW device, the above target message can be a CANCEL message.

In a case that the second electronic device is the MO device, the above step <NUM> can include the following step 202a:.

Step 202a: The call establishment apparatus sends a CANCEL message to the second electronic device, and sends the second INVITE request to the MT device.

Exemplarily, in a case that the first electronic device is the NW device and the second electronic device is the MO device, after receiving the second INVITE request sent by the second electronic device, the first electronic device can send the CANCEL message to the second electronic device to interrupt the communication connection established on the basis of the first INVITE request. At this time, the MT device can also interrupt the communication connection, established on the basis of the first INVITE request, with the MO device.

Exemplarily, after the communication connection established on the basis of the first INVITE request is interrupted, the first electronic device further needs to send the second INVITE request to the MT device to enable the MO device and the MT device to establish the communication connection based on the second INVITE request.

In this way, in a case that the second electronic device is the MO device and the first electronic device is the NW device, the first electronic device can send the CANCEL message to the second electronic device, and send the second INVITE request to the MT device, to ensure that the MO device and the MT device can successfully establish the SIP call.

Further optionally, in the embodiments of this application, for the scenario as shown in <FIG>, in a case that the second electronic device is the NW device and the first electronic device is the MT device, the above target message can be a BYE message.

Exemplarily, in a case that the second electronic device is the NW device, the above step <NUM> can include the following step 202b:
Step 202b: The call establishment apparatus sends a BYE message to the second electronic device, and establishes a target communication connection with the second electronic device;
where the above target communication connection is established on the basis of the second INVITE request.

Exemplarily, in a case that the above first electronic device is the MT device and the second electronic device is the NW device, after receiving the second INVITE request sent by the second electronic device, the first electronic device can send the BYE message to the second electronic device to interrupt the communication connection established on the basis of the first INVITE request. The BYE message is forwarded by the second electronic device to the MO device. At this time, the first electronic device can interrupt the communication connection, established on the basis of the first INVITE request, with the MO device.

Exemplarily, after sending the BYE message to the MO device, the first electronic device can send, to the MO device, a connection success response information, namely a 200OK message, shown in step <NUM> in <FIG>. The 200OK message is sent in response to the second INVITE request, and is used for establishing the communication connection based on the second INVITE request with the MO device.

It should be noted that in the scenario as shown in <FIG>, in a case that the NW device does not send the CANCEL message to the MO device after receiving the second INVITE request sent by the MO device, and sends the second INVITE request to the MT device, the MT device can process the first INVITE request and the second INVITE request according to the processing method of the first electronic device in the scenario as shown in <FIG>.

In this way, in a case that the second electronic device is the NW device and the first electronic device is the MT device, the first electronic device can send the BYE message to the second electronic device, and send the 200OK message to the MO device, to ensure that the MO device and the MT device can successfully establish the SIP call.

Optionally, in the embodiments of this application, the first electronic device can determine, according to information carried in the INVITE request, whether the first INVITE request and the second INVITE request are sent by the same electronic device.

Exemplarily, the above step <NUM> may include the following step 202c:
Step 202c: in a case that the call establishment apparatus determines, according to target information, that both the second INVITE request and the first INVITE request are sent by the second electronic device, the call establishment apparatus sends the target message to the second electronic device,
where the above target information includes at least one of the following items: a From header field, a To header field, and a Call-id value.

Exemplarily, different first electronic devices can determine, according to different information, whether the received first INVITE request and the received second INVITE request are sent by the same electronic device.

For example, when the first electronic device is the MT device, since the To header field of the INVITE request points to the first electronic device, the first electronic device can receive the INVITE request. Therefore, the first electronic device can determine, only according to the From header field of the INVITE request, whether the first INVITE request and the second INVITE request are sent by the same electronic device.

In this way, for different scenarios, the first electronic device can determine, according to different information, whether the first INVITE request and the second INVITE request are sent by the same electronic device.

According to the call establishment method provided by the embodiments of this application, in a case that a first INVITE request sent by the second electronic device is received and that the INVITE ACK message sent by the second electronic device is not received, and in a case that the second INVITE request sent by the second electronic device is received, for different application scenarios, the communication connection established on the basis of the first INVITE request can be interrupted by sending different target messages to the second electronic device, and the communication connection based on the second INVITE request is established, which increases the success rate of establishing a SIP-based call by the electronic devices in the above scenarios.

It should be noted that an executive body of the call establishment method provided by the embodiments of this application can be the call establishment apparatus, or a control module configured to implement the call establishment method in the call establishment apparatus. In the embodiments of this application, by way of example, the call establishment apparatus implements the call establishment method to describe the call establishment apparatus provided by the embodiments of this application.

It should be noted that in the embodiments of this application, all the call establishment methods shown in all the method drawings are exemplarily described in combination with one drawing in the embodiments of this application. During specific implementation, the call establishment methods shown in the above method drawings may be further implemented with reference to any other combinable accompanying drawings schematically described in the above embodiments, details of which are omitted here.

<FIG> is a possible schematic structural diagram of a call establishment apparatus according to an embodiment of this application. As shown in <FIG>, the call establishment apparatus <NUM> includes: a receiving module <NUM> and an execution module <NUM>. The receiving module <NUM> is configured to: in a case that a first INVITE request sent by a second electronic device is received and that an INVITE ACK message sent by the second electronic device is not received, receive a second INVITE request; and the execution module <NUM> is configured to: in a case that both the second INVITE request and the first INVITE request received by the receiving module <NUM> are sent by the second electronic device, send a target message to the second electronic device, and establish a communication connection based on the second INVITE request, where the target message is used for interrupting a communication connection established on the basis of the first INVITE request.

Optionally, in a case that the second electronic device is an MO device, the first electronic device is a network NW device; and in a case that the second electronic device is an NW device, the first electronic device is an MT device.

The execution module <NUM> is further configured to: send a CANCEL message to the second electronic device, and send the second INVITE request to the MT device.

Optionally, the execution module <NUM> is further configured to: send a BYE message to the second electronic device, and establish a target communication connection with the second electronic device, where the target communication connection is established on the basis of the second INVITE request.

Optionally, the execution module <NUM> is further configured to: in a case that it is determined according to target information that both the second INVITE request and the first INVITE request are sent by the second electronic device, send the target message to the second electronic device, where the target information includes at least one of the following items: a From header field, a To header field, and a Call-id value.

The call establishment apparatus in the embodiments of this application can be an apparatus, or can be a component in a terminal, an integrated circuit, or a chip. The apparatus can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm computer, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook, or a personal digital assistant (personal digital assistant, PDA); and the non-mobile electronic device may be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine, or a self-service machine, which are not specifically limited in the embodiments of this application.

The call establishment apparatus in the embodiments of this application may be an apparatus with an operating system. The operating system may be an Android (Android) operating system, an iOS operating system, or other possible operating systems, which is not specifically limited in the embodiments of this application.

The call establishment apparatus provided by the embodiments of this application can implement all processes implemented by the call establishment apparatus in the method embodiments shown in <FIG>, details of which are omitted here for brevity.

Beneficial effects of the various implementations in this embodiment can specifically refer to the beneficial effects of the corresponding implementations in the above method embodiments, details of which are omitted here for brevity.

According to the call establishment apparatus provided by the embodiments of this application, in a case that a first INVITE request sent by the second electronic device is received and that the INVITE ACK message sent by the second electronic device is not received, and in a case that the second INVITE request sent by the second electronic device is received, for different application scenarios, the communication connection established on the basis of the first INVITE request can be interrupted by sending different target messages to the second electronic device, and the communication connection based on the second INVITE request is established, which increases the success rate of establishing a SIP-based call by the electronic devices in the above scenarios.

Optionally, the embodiments of this application further provide an electronic device, including a processor <NUM>, a memory <NUM>, and a program or an instruction stored in the memory <NUM> and executable on the processor <NUM>. The program or instruction, when executed by the processor <NUM>, implements all the processes of the above call establishment method embodiments and can achieve the same technical effects, details of which are omitted here for brevity.

It should be noted that the electronic devices in the embodiments of this application include the above mobile electronic device and the above non-mobile electronic device.

<FIG> is a schematic structural diagram of hardware of an electronic device for implementing all the embodiments of this application.

The electronic device <NUM> includes, but is not limited to: a radio frequency unit <NUM>, a network module <NUM>, an audio output unit <NUM>, an input unit <NUM>, a sensor <NUM>, a display unit <NUM>, a user input unit <NUM>, an interface unit <NUM>, a memory <NUM>, a processor <NUM>, and other components.

A person skilled in the art can understand that the electronic device <NUM> can further include a power supply (such as a battery) for supplying power to the various components. The power supply may be logically connected to the processor <NUM> by using a power management system, thereby implementing functions such as charging, discharging, and power consumption management by using the power management system. The structure of the electronic device shown in <FIG> constitutes no limitation on the electronic device, and the electronic device may include more or fewer components than those shown in the figure, or some components may be combined, or a different component deployment may be used, details of which are omitted here.

The radio frequency unit <NUM> is configured to: in a case that a first INVITE request sent by a second electronic device is received and that an INVITE ACK message sent by the second electronic device is not received, receive a second INVITE request; and the radio frequency unit <NUM> is configured to: in a case that both the second INVITE request and the first INVITE request received by the radio frequency unit <NUM> are sent by the second electronic device, send a target message to the second electronic device, and the processor <NUM> is configured to establish a communication connection based on the second INVITE request, where the target message is used for interrupting a communication connection established on the basis of the first INVITE request.

Optionally, the radio frequency unit <NUM> is further configured to: send a CANCEL message to the second electronic device, and send the second INVITE request to the MT device.

Optionally, the radio frequency unit <NUM> is further configured to send a BYE message to the second electronic device, and the processor <NUM> is configured to establish a target communication connection with the second electronic device, where the target communication connection is established on the basis of the second INVITE request.

Optionally, the processor <NUM> is configured to: in a case that it is determined according to target information that both the second INVITE request and the first INVITE request are sent by the second electronic device, and the radio frequency unit <NUM> is configured to send the target message to the second electronic device, where the target information includes at least one of the following items: a From header field, a To header field, and a Call-id value.

According to the electronic device provided by the embodiments of this application, in a case that a first INVITE request sent by the second electronic device is received and that the INVITE ACK message sent by the second electronic device is not received, and in a case that the second INVITE request sent by the second electronic device is received, for different application scenarios, the communication connection established on the basis of the first INVITE request can be interrupted by sending different target messages to the second electronic device, and the communication connection based on the second INVITE request is established, which increases the success rate of establishing a SIP-based call by the electronic devices in the above scenarios.

It should be understood that in the embodiments of this application, the input unit <NUM> may include a graphics processing unit (graphics processing unit, GPU) <NUM> and a microphone <NUM>, and the GPU <NUM> processes image data of static pictures or videos obtained by an image capturing apparatus (such as a camera) in a video capturing mode or an image capturing mode. The display unit <NUM> may include a display panel <NUM>, and the display panel <NUM> may be configured by using a liquid crystal display, an organic light-emitting diode, and the like. The user input unit <NUM> includes a touch-control panel <NUM> and another input device <NUM>. The touch-control panel <NUM> is also referred to as a touch screen. The touch-control panel <NUM> may include two parts: a touch detection apparatus and a touch controller. The another input device <NUM> may include, but not limited to, a physical keyboard, a function key (such as a volume control key or a switch key), a track ball, a mouse, and a joystick, details of which are omitted here. The memory <NUM> may be configured to store a software program and various data, including but not limited to application programs and operating systems. The processor <NUM> may integrate an application processor and a modem processor. The application processor mainly processes an operating system, a user interface, an application program, and the like, and the modem processor mainly processes wireless communication. It can be understood that the above modem processor may either not be integrated into the processor <NUM>.

The embodiments of this application further provide a readable storage medium. The readable storage medium stores a program or an instruction. The program or instruction, when executed by a processor, implements all the processes of the above call establishment method embodiments and can achieve the same technical effects, details of which are omitted here for brevity.

The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer-readable storage medium, for example, a computer read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk, or an optical disk.

The embodiments of this application further provide a chip. The chip includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is configured to run a program or an instruction to implement all the processes of the above call establishment method embodiments and achieve the same technical effects, details of which are omitted here for brevity.

It should be understood that the chip mentioned in the embodiments of this application can also be referred to as a system-level chip, a system chip, a chip system, or a system-on-chip.

It should be noted that the terms "include", "comprise", or any other variations thereof here is intended to cover a non-exclusive inclusion, so that a processor, method, object, or apparatus including a series of elements not only includes those elements, but also includes other elements not specifically listed, or includes inherent elements of this process, method, object, or apparatus. Without more limitations, elements defined by the sentence "including one" do not exclude that there are still other same elements in the process, method, object, or apparatus including these elements. In addition, it should be noted that the scope of the methods and devices in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions in a substantially simultaneous manner or in an opposite order according to the functions involved. For example, the methods described may be executed in an order different than that described, and various steps may also be added, omitted, or combined. In addition, features described with reference to some examples may also be combined in other examples.

According to the descriptions in the above implementations, a person skilled in the art may clearly learn that the method according to the above embodiment may be implemented by relying on software and an essential commodity hardware platform or by using hardware, but the former is a better implementation in most cases. Based on such an understanding, the technical solutions of this application essentially, or the part contributing to the prior art, may be presented in a form of a software product. The computer software product is stored in a storage medium (for example, a ROM/RAM, a magnetic disk, and an optical disk) including several instructions to enable an electronic device (which may be a mobile phone, a computer, a server, an air conditioner, a network device, and the like) to perform the methods described in all the embodiments of this application.

The embodiments of this application have been described above with reference to the accompanying drawings. The present application is not limited to the above specific implementations, and the above specific implementations are merely exemplary and not limitative. A person of ordinary skill in the art may make various forms under the teaching of this application without departing from this application and the claims, and these forms shall fall within the protection of this application.

Claim 1:
A call establishment method, applied to a first electronic device, the method comprises:
in a case that a first INVITE request sent by a second electronic device is received and that an ACK message sent by the second electronic device is not received, receiving (<NUM>) a second INVITE request; and
in a case that it is determined that both the second INVITE request and the first INVITE request are sent by the second electronic device, sending (<NUM>) a target message to the second electronic device, and establishing (<NUM>) a communication connection based on the second INVITE request; wherein
the target message is used for interrupting a communication connection established on the basis of the first INVITE request;
characterized in that,
in a case that the second electronic device is a mobile originated, MO, device, the sending (<NUM>) a target message to the second electronic device, and establishing (<NUM>) a communication connection based on the second INVITE request comprises:
sending a CANCEL message to the second electronic device, and sending the second INVITE request to a mobile terminated, MT, device.