Disclosure of Invention
In view of the above, the main objective of the present invention is to provide a method and a communication terminal for implementing a multi-party communication, which solve the problem of state confusion in a single-channel-based multi-party communication process.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
the invention discloses a call terminal for realizing multi-party call, which comprises: protocol stack, call management service layer; wherein,
the protocol stack is used for generating an expanded AT command according to the acquired final result of the call with the called call terminal or the call terminal which is passively hung up and the call channel number (CID) corresponding to the call, and sending the expanded AT command to the call management service layer of the call terminal where the protocol stack is located;
and the call management service layer is used for analyzing the expanded AT command, managing the CID and the final result obtained after analysis, and performing call control according to the CID and the final result.
In the above-described call terminal, the call terminal,
the call management service layer is also used for receiving the request message, generating an AT command according to the request message and sending the AT command to a protocol stack of the communication terminal where the call management service layer is located;
the protocol stack is also used for analyzing the AT command sent by the call management service layer, interacting with the network side according to the content of the request message obtained by analysis, and acquiring the final result of the call with the called call terminal or the passive hang-up call terminal and the CID corresponding to the call.
In the above call terminal, the protocol stack further includes: the system comprises an analysis module, an interaction module and an extension coding module; wherein,
the analysis module is used for analyzing the AT command and sending the content of the request message obtained by analysis to the interaction module;
the interactive module is used for interacting with the network side according to the content of the request message obtained by analysis, and acquiring a final result of the call with the called call terminal or the passive hang-up call terminal and a CID corresponding to the call;
and the extension coding module is used for generating an extension AT command according to the obtained final result of the call with the called call terminal or the call with the passive hang-up call terminal and the CID corresponding to the call, and sending the extension AT command to the call management service layer of the call terminal where the extension AT command is located.
In the above communication terminal, the call management service layer further includes: the system comprises a call control module, a coding module, an analysis module and a management module; wherein,
a call control module for receiving the request message; and performing call control according to the CID and the final result obtained after the analysis;
the coding module is used for generating an AT command according to the request message and sending the AT command to a protocol stack of the communication terminal where the coding module is located;
the analysis module is used for analyzing the extended AT command sent by the extended coding module of the protocol stack and sending a final result and a CID obtained after analysis to the management module and the call control module;
and the management module is used for managing the CID and the final result obtained after analysis.
The invention also discloses a method for realizing the multi-party call, which comprises the following steps:
the protocol stack of the call terminal initiating the call or actively hanging up generates an expanded AT command according to the obtained final result of the call with the called call terminal or the passively hanging up call terminal and the CID corresponding to the call, and sends the expanded AT command to the call management service layer of the call terminal where the protocol stack is located;
and the call management service layer analyzes the expanded AT command, manages the CID and the final result obtained after analysis, and performs call control according to the CID and the final result.
In the above method, the call management service layer that generates the extended AT command and sends the extended AT command to the call terminal where the call management service layer is located specifically includes:
an extended coding module of a protocol stack of the call terminal initiating a call or actively hanging up encodes the received final result and the CID, and fills the final result and the CID into a character string of the AT command to obtain an extended AT command; and the extension coding module of the protocol stack sends the generated extension AT command to an analysis module of a call control service layer of the call terminal which initiates a call or actively hangs up.
In the above method, the managing the CID and the final result obtained after the analyzing specifically includes:
and the management module of the call control service layer of the call terminal initiating the call or actively hanging up finds the current call state corresponding to the CID according to the CID, and updates the current call state according to the final result.
In the above method, the performing call control according to the CID and the final result specifically includes:
and the call control module obtains one path of call needing call control according to the CID, performs call control on the path of call according to the final result, and prompts the execution result of the call control through a pop-up prompt box.
In the above method, before the generating the extended AT command, the protocol stack of the call terminal initiating the call or hanging up actively according to the obtained final result of the call with the called call terminal or hanging up passively and the CID corresponding to the call of the current path, the method further includes:
the protocol stack analyzes the AT command, interacts with the network side according to the content of the request message obtained by analysis, and obtains the final result of the call with the called call terminal or the passive hang-up call terminal and the CID corresponding to the call.
In the method, the protocol stack analyzes the AT command, interacts with the network side according to the content of the request message obtained by analyzing, and obtains the final result of the call with the called call terminal or the passive hang-up call terminal and the CID corresponding to the call of the path specifically comprise:
the method comprises the steps that an analysis module of a protocol stack of a calling terminal which initiates a call or actively hangs up analyzes a received AT command, the content of a request message is extracted from a character string of the AT command and sent to an interaction module of the protocol stack, and the interaction module interacts with a network side according to the content of the request message to obtain a final result of the call of a called calling terminal or a passively hung up calling terminal and a CID corresponding to the call.
In the above method, the analyzing of the AT command by the protocol stack, interacting with the network side according to the content of the request message obtained by the analyzing, and obtaining the final result of the call with the called call terminal or the passive hang-up call terminal and the CID corresponding to the call of the path further include:
and the call management service layer of the call terminal which initiates the call or actively hangs up receives the request message, generates an AT command according to the request message and sends the AT command to a protocol stack of the call terminal where the AT command is located.
In the above method, the receiving of the request message by the call management service layer of the call terminal initiating the call or actively hanging up is specifically:
when the phone is picked up and the number of the called call terminal is input, and a call key is pressed down, or when one-way call is hung up and a hang-up key is pressed down, a call control module of a call management service layer of the call terminal which initiates the call or actively hangs up receives the request message.
In the above method, the generating the AT command according to the request message specifically includes:
and the coding module fills the number of the called call terminal or the CID of one call needing hanging up in the request message into a character string of the AT command and sends the generated AT command to a resolution module of a protocol stack of the call terminal where the AT command is located.
According to the method and the call terminal for realizing the multi-party call, the protocol stack expands the AT command, the CID is added in the AT command carrying the final result, the expanded AT command is finally generated and reported to the call management service layer, and the call management service layer can definitely know which call corresponds to the final result and carry out call control, so that the problem of state disorder in the multi-party call process based on a single channel is solved, the call process of the multi-party call is greatly perfected, and the call is kept stable; in addition, the call management service layer acquires the message from the expanded AT command, performs call control and notifies the user, and does not need to wait for subsequent final result reporting or self-query final state, so that the connection time of multi-party call can be shortened, the intercommunication standard is unified, and the universality is enhanced.
Detailed Description
The basic idea of the invention is: the protocol stack generates an expanded AT command according to the acquired final result of the call with the called call terminal or the passively hung-up call terminal and a call channel number (CID) corresponding to the call, and sends the expanded AT command to a call management service layer of the call terminal where the protocol stack is located; and the call management service layer analyzes the expanded AT command, manages the CID and the final result obtained after analysis, and performs call control according to the CID and the final result.
The invention is further described in detail below with reference to the drawings and the specific embodiments.
The present invention provides a communication terminal for realizing multi-party communication, fig. 1 is a schematic structural diagram of the communication terminal for realizing multi-party communication according to the present invention, as shown in fig. 1, the communication terminal includes: a protocol stack 11, a call management service layer 12; wherein,
the protocol stack 11 is configured to generate an extended AT command according to the obtained final result of the call with the called call terminal or the call with the passive hang-up call terminal and the CID corresponding to the call, and send the extended AT command to the call management service layer 12 of the call terminal where the protocol stack is located;
and a call management service layer 12, configured to parse the extended AT command, manage the CID and the final result obtained after parsing, and perform call control according to the CID and the final result.
The call management service layer 12 is further configured to receive a request message, generate an AT command according to the request message, and send the AT command to the protocol stack 11 of the call terminal where the call management service layer is located;
the protocol stack 11 is further configured to analyze an AT command sent by the call management service layer, interact with the network side according to the content of the request message obtained through analysis, and obtain a final result of a call with the called call terminal or the passive hang-up call terminal and a CID corresponding to the call.
The protocol stack 11 further comprises: the analysis module 111, the interaction module 112 and the extension coding module 113; wherein,
the analysis module 111 is used for analyzing the AT command and sending the content of the request message obtained by analysis to the interaction module 112;
an interaction module 112, configured to interact with a network side according to the content of the request message obtained through the analysis, and obtain a final result of a call with the called call terminal or the passive hang-up call terminal and a CID corresponding to the call;
and the extension coding module 113 is configured to generate an extension AT command according to the obtained final result of the call with the called call terminal or the call with the passive hang-up call terminal and the CID corresponding to the call, and send the extension AT command to the call management service layer 12 of the call terminal where the extension AT command is located.
The call management server 12 further includes: a call control module 121, an encoding module 122, an analysis module 123 and a management module 124; wherein,
a call control module 121, configured to receive the request message; and performing call control according to the CID and the final result obtained after the analysis;
the encoding module 122 is configured to generate an AT command according to the request message, and send the AT command to the protocol stack 11 of the call terminal where the encoding module is located;
the parsing module 123 is configured to parse the extended AT command sent by the extended coding module of the protocol stack, and send a final result and a CID obtained after parsing to the management module 123 and the call control module 121;
and a management module 124, configured to manage the CID and the final result obtained after the parsing.
The extended AT command generated by the extended encoding module 113 and sent to the call management service layer of the call terminal where the extended AT command is located specifically includes: the extension coding module 113 of the protocol stack 11 of the call terminal initiating a call or actively hanging up encodes the received final result and the CID, fills the final result into the character string of the AT command, and adds the CID into the character string of the AT command to obtain an extension AT command; the extension coding module 113 of the protocol stack 11 sends the generated extension AT command to the parsing module 123 of the call control service layer 12 of the call originating terminal or the call actively hanging up;
the management module 124 manages the CID and the final result obtained after the parsing specifically as follows: the management module 124 of the call control service layer 12 of the call terminal initiating the call or actively hanging up finds the current call state corresponding to the CID according to the CID, and updates the current call state according to the final result;
the call control module 121 performs call control according to the CID and the final result specifically: the call control module 121 obtains a call to be call controlled according to the CID, performs call control on the call according to the final result, and prompts the execution result of the call control by popping up a prompt box;
the analyzing module 111 specifically analyzes the AT command as follows:
the analysis module 111 of the protocol stack 11 of the call terminal initiating a call or actively hanging up analyzes the received AT command, extracts the content of the request message from the character string of the AT command and sends the extracted content of the request message to the interaction module 112 of the protocol stack;
the receiving of the request message by the call control module 121 specifically includes: when picking up the phone and inputting the number of the called communication terminal, pressing the call key, or when hanging up a call and pressing the hang-up key, the call control module 121 of the call management service layer 12 of the communication terminal which initiates the call or actively hangs up receives the request message;
the generation of the AT command by the encoding module 122 according to the request message specifically includes: the call control module 121 of the call management service layer 12 forwards the request message to the coding module 122 of the call management service layer, and the coding module 122 fills the number of the called call terminal or the CID of one call to be hung up in the request message into the character string of the AT command, and sends the generated AT command to the parsing module 111 of the protocol stack of the call terminal where the AT command is located.
The invention provides a method for realizing multi-party call, fig. 2 is a flow diagram of the method for realizing multi-party call, as shown in fig. 2, the method comprises the following steps:
step 201, a call management service layer of a call terminal initiating a call or actively hanging up receives a request message;
specifically, when a user of a calling call terminal picks up a phone and inputs the number of a called call terminal and presses a call key, or when the user on any side hangs up a call and presses a hang-up key, a call control module of a call management service layer of the call terminal which initiates a call or actively hangs up receives a request message; when a calling call terminal user picks up a phone and inputs the number of a called call terminal and presses a call key, a request message received by a call control module is a call request message; when a user on any side hangs up a call, the request message received by the call control module is a hang up request message;
after receiving the request message, a call control module of the call management service layer queries the current call state of the call in which the call terminal sending the request message is located through an interface provided by the management module, the call control module judges whether the queried current call state is correct, if so, step 202 is executed, and if not, the step is ended; for example, when the user hangs up the second-path call, the call control module determines whether the current call state of the second-path call with CID 2 is correct, if the current call state is activated, hung up, calling, call waiting, the current call state is correct, and if the current call state is no call, the current call state is wrong;
step 202, the call management service layer generates an AT command according to the request message and sends the AT command to a protocol stack of the communication terminal where the call management service layer is located;
specifically, a call control module of a call management service layer forwards a request message to a coding module of the call management service layer, and the coding module codes the received request message to generate an AT command; if the request message is a call request message, the message carries the number of the called call terminal; if the request message is a hang-up request message, the message carries the CID of one path of call needing to be hung up; the coding module codes according to the number of the called call terminal in the request message or the CID of one call needing hanging up; the coding method is that according to the character string format of the AT command, the content of the request message which needs to be coded is filled into the character string of the AT command; for example, the string of AT commands may be: ATD [ < n > ] [; < n > ] is the number and the decoration symbol of the called talking terminal, or CID and the decoration symbol; the coding module sends the generated AT command to an analysis module of a protocol stack of the self-located call terminal, namely, the analysis module of the protocol stack of the call terminal which initiates a call or actively hangs up. Here, since the interaction between the protocol stack of the call terminal and the call management service layer can only use the AT command, the request message needs to be encoded into the AT command before being sent to the protocol stack.
Step 203, the protocol stack analyzes the AT command, interacts with the network side according to the content of the request message obtained by analysis, and obtains the final result of the call with the called call terminal or the passive hang-up call terminal and the CID corresponding to the call;
specifically, an analysis module of a protocol stack of a call terminal initiating a call or actively hanging up analyzes a received AT command, and the analysis method is to extract the content of a request message from a character string of the AT command according to the character string format of the AT command; the analysis module sends the extracted content of the request message to an interaction module of a protocol stack, and the interaction module interacts with a network side according to the content of the request message to acquire a final result of the call of the called call terminal or the passive hang-up call terminal and a CID corresponding to the call;
for example, after the analysis module analyzes the AT command, if the number of the called call terminal is obtained, the number is sent to the interaction module, after the interaction module receives the number of the called call terminal, the interaction module knows that calling needs to be performed according to the number, the called call terminal is called through the network side, the interaction module obtains the final result of calling the called call terminal and the CID corresponding to the call through the network side, and the final result and the CID are sent to the extension coding module of the protocol stack; the final calling result comprises NO CARRIER, NOANSWER, BUSY and OK, wherein NO CARRIER indicates that the connection of the calling link fails, NO ANSWER indicates that the calling communication terminal successfully calls but the called communication terminal does not respond, BUSY indicates that the calling communication terminal successfully calls but the called communication terminal refuses, and OK indicates that the calling communication terminal successfully calls and the called communication terminal ANSWERs;
after the AT command is analyzed by the analysis module, if the obtained CID of the call needing to be hung up is sent to the interaction module, after the interaction module receives the CID of the call needing to be hung up, the interaction module knows that the call corresponding to the CID needs to be hung up according to the CID, the interaction module informs the passively hung up call terminal relative to the actively hung up call terminal to hang up the call through the network side, acquires the final result of hanging up and the CID corresponding to the call through the network side, and sends the final result and the CID to an extended coding module of a protocol stack of the actively hung up call terminal; the final result of hang-up includes OK or ERROR, OK represents that the passively hung-up call terminal is hung up successfully, and ERROR represents that hang-up fails due to network or unknown problems.
Step 204, a protocol stack of the call terminal initiating the call or actively hanging up generates an expanded AT command according to the obtained final result and the CID, and sends the expanded AT command to a call management service layer of the call terminal where the protocol stack is located;
specifically, an extended coding module of a protocol stack of a calling or active hanging-up call terminal codes a received final result and a CID obtained by an interactive module, and the coding method is that according to a character string format of an AT command, the content of the final result needing to be coded is filled in a character string of the AT command, and then the CID is added into the character string of the AT command to finally obtain an extended AT command; for example, the string format of the extended AT command may be + XCPI: 1/r/nNO CARRIER, wherein 1 is CID and represents the first call, and NO CARRIER represents the final result of the first call; and the extension coding module of the protocol stack sends the generated extension AT command to an analysis module of a call control service layer of the call terminal which initiates a call or actively hangs up.
Step 205, the call management service layer analyzes the extended AT command, manages the CID and the final result obtained after the analysis, and performs call control according to the CID and the final result;
specifically, an analysis module of a call control service layer of a call terminal initiating a call or actively hanging up analyzes a received extended AT command to obtain a CID and a final result, and simultaneously sends the CID and the final result to a management module and a call control module of the call control service layer; the management module is used for storing CIDs of all calls and current call states corresponding to the CIDs, finding the current call states corresponding to the CIDs according to the CIDs and updating the current call states according to final results;
the call control module can obtain a path of call needing call control according to the CID, and performs call control on the path of call according to a final result, wherein the call control comprises opening a call channel, cutting off the call channel and the like; meanwhile, the call control module needs to prompt the user of the execution result of the call control; for example, by popping up a box, the box may display "being connected", "ending call", and the like, and may also display the call duration and the like at the same time.
By using the method of this embodiment, the call terminal 1 is called and connects one path of call, then dials the second path of call, the called refuses, AT this time, the final result BUSY reported by the network side is slow, the call terminal 1 does not receive the final result temporarily, AT this time, the user of the call terminal 1 hangs up the first path of call, the call control service layer of the call terminal 1 can receive the extended AT command, wherein the extended AT command carries the message that the final results NO CARRIER and CID are 1, and therefore the call terminal cannot be mistakenly regarded as the final result of the second path of call.
The above description is only exemplary of the present invention and should not be taken as limiting the scope of the present invention, and any modifications, equivalents, improvements, etc. that are within the spirit and principle of the present invention should be included in the present invention.