CN112887497B - Communication method, apparatus and computer storage medium - Google Patents

Communication method, apparatus and computer storage medium Download PDF

Info

Publication number
CN112887497B
CN112887497B CN202011548609.4A CN202011548609A CN112887497B CN 112887497 B CN112887497 B CN 112887497B CN 202011548609 A CN202011548609 A CN 202011548609A CN 112887497 B CN112887497 B CN 112887497B
Authority
CN
China
Prior art keywords
wireless gateway
terminal
slip
message
coding mode
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
CN202011548609.4A
Other languages
Chinese (zh)
Other versions
CN112887497A (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.)
722th Research Institute of CSIC
Original Assignee
722th Research Institute of CSIC
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 722th Research Institute of CSIC filed Critical 722th Research Institute of CSIC
Priority to CN202011548609.4A priority Critical patent/CN112887497B/en
Publication of CN112887497A publication Critical patent/CN112887497A/en
Application granted granted Critical
Publication of CN112887497B publication Critical patent/CN112887497B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M7/00Arrangements for interconnection between switching centres
    • H04M7/006Networks other than PSTN/ISDN providing telephone service, e.g. Voice over Internet Protocol (VoIP), including next generation networks with a packet-switched transport layer
    • H04M7/0072Speech codec negotiation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management
    • H04L65/1101Session protocols
    • H04L65/1104Session initiation protocol [SIP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/04Protocols for data compression, e.g. ROHC

Abstract

The disclosure provides a communication method, a communication device and a communication medium, and belongs to the field of communication. The method comprises the following steps: establishing a session between the calling terminal and the called terminal based on the compressed first SIP message; converting first voice data of a first coding mode from a first terminal into first voice data of a second coding mode, and sending the first voice data of the second coding mode to a second terminal by adopting the conversation; converting second voice data of a second coding mode received from a second terminal through the session into second voice data of a first coding mode, and sending the second voice data of the first coding mode to the first terminal; disconnecting the session based on the compressed second SIP message; and the code rate corresponding to the first coding mode is greater than the code rate corresponding to the second coding mode. The embodiment of the disclosure can reduce the requirement of voice communication on the bandwidth of a wireless network, and is beneficial to realizing narrow-band communication.

Description

Communication method, communication device and computer storage medium
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a communication method, apparatus, and computer readable storage medium.
Background
Voice communication based on VoIP (Voice over Internet Protocol, voice over IP) technology is becoming more and more popular, and can be applied to various scenes such as daily communication, ship communication, and the like.
Voice communication based on VoIP technology usually uses mainstream SIP (Session Initiation Protocol) as an application layer control Protocol to complete establishment, modification and release of VoIP conversation; the media stream transmission of the VoIP conversation is completed by using RTP (Real-time Transport Protocol) as a media transmission Protocol.
Because the SIP protocol is based on text information, a large amount of data needs to be retransmitted in the session process, and the SIP protocol is suitable for wired link transmission with rich bandwidth. When SIP is used in wireless networks, the enormous messages can cause the session setup delay to increase by tens of seconds. In addition, the RTP protocol usually carries encoded loads such as g.711, g.722, g.729 and the like to complete voice stream transmission, even if g.729 encoding with the lowest code rate of 8Kbps is adopted, the bandwidth occupied by the one-way VoIP full-duplex session is 68.8Kbps, and communication cannot be performed at all on a narrow-band wireless channel with limited transmission rate.
Disclosure of Invention
The embodiment of the disclosure provides a communication method, a communication device and a computer storage medium, which can reduce the requirement of VoIP communication on the bandwidth of a wireless communication network. The technical scheme is as follows:
in one aspect, an embodiment of the present disclosure provides a communication method, where the method includes:
establishing a session between the calling terminal and the called terminal based on the compressed first SIP message;
converting first voice data of a first coding mode from a first terminal into first voice data of a second coding mode, and sending the first voice data of the second coding mode to a second terminal by adopting the conversation;
converting second voice data of a second coding mode received from a second terminal through the session into second voice data of a first coding mode, and sending the second voice data of the first coding mode to the first terminal;
disconnecting the session based on the compressed second SIP message;
the first terminal is one of a calling terminal and a called terminal, and the second terminal is the other of the calling terminal and the called terminal.
Optionally, the compressed first SIP message corresponds to a first SIP message, the compressed second SIP message corresponds to a second SIP message, the first SIP message and the second SIP message both include a first session identifier, the compressed first SIP message and the compressed second SIP message both include a second session identifier uniquely associated with the first session identifier, the second session identifier is a memory address applied by the first wireless gateway, and the first wireless gateway is connected to the calling terminal through a portal.
Illustratively, the first SIP message comprises a SIP INVITE call request, a SIP180 response, a SIP200OK response, and a SIP ACK acknowledgment, and the compressed first SIP message comprises a SLIP call request message, a SLIP ringing response message, a SLIP off-hook response message, and a SLIP off-hook response acknowledgment message.
Optionally, the establishing a session between the calling terminal and the called terminal based on the compressed SIP message includes:
a first wireless gateway receives a SIP INVITE call request sent by the calling terminal;
the first wireless gateway converts the SIP INVITE call request into a SLIP call request message;
the first wireless gateway sends the SLIP call request message to a second wireless gateway;
the first wireless gateway receives a SLIP ringing response message sent by the second wireless gateway, wherein the SLIP ringing response message is generated based on the second wireless gateway receiving a SIP180 response sent by a called terminal;
the first wireless gateway sends SIP180 response to the calling terminal;
the first wireless gateway receives a SLIP off-hook response message sent by the second wireless gateway, wherein the SLIP off-hook response message is generated based on the second wireless gateway receiving a SIP200OK response sent by a called terminal;
the first wireless gateway sends SIP200OK response to the calling terminal;
the first wireless gateway sends a SLIP off-hook response confirmation message to the second wireless gateway;
the first wireless gateway receives SIP ACK confirmation sent by the calling terminal;
and the second wireless gateway is connected with the called terminal through a network port.
Optionally, the session is established between the calling terminal and the called terminal based on the compressed SIP message, including:
the second wireless gateway receives the SLIP call request message;
the second wireless gateway sends the SIP INVITE request corresponding to the SLIP call request message to a called terminal;
the second wireless gateway receives a SIP180 response sent by the called terminal;
the second wireless gateway sends a corresponding SLIP ringing response message of the SIP180 response to the first wireless gateway, wherein the SLIP ringing response message is used for triggering the first wireless gateway to send the SIP180 response to the calling terminal;
the second wireless gateway receives a SIP200OK response sent by the called terminal;
the second wireless gateway sends a SLIP off-hook response message corresponding to the SIP200OK response to the first wireless gateway, wherein the SLIP off-hook response message is used for triggering the first wireless gateway to send the SIP200OK response to the calling terminal;
the second wireless gateway sends SIP ACK confirmation to the called terminal;
the second wireless gateway receives a SLIP off-hook response confirmation message sent by the first wireless gateway;
and the second wireless gateway is connected with the called terminal through a network port.
Illustratively, the second SIP message comprises a SIP BYE on-hook request, and the compressed second SIP message comprises a SLIP on-hook request message.
Optionally, the disconnecting the session based on the compressed second SIP message includes:
the local wireless gateway receives an SIP BYE on-hook request sent by a first terminal;
the local wireless gateway sends a SLIP hang-up request message corresponding to the SIP BYE hang-up request to an opposite-end wireless gateway, wherein the SLIP hang-up request message is used for triggering the opposite-end wireless gateway to send the BYE hang-up request to the second terminal;
the local wireless gateway sends SIP200OK response to the first terminal;
the local wireless gateway is a wireless gateway connected with the first terminal through a network port, and the opposite-end wireless gateway is a wireless gateway connected with the second terminal through a network port.
Optionally, the disconnecting the session based on the compressed second SIP message includes:
the local wireless gateway receives a SLIP hang-up request message sent by an opposite-end wireless gateway;
the local wireless gateway sends an SIP BYE on-hook request corresponding to the SLIP on-hook request message to a second terminal;
the local wireless gateway receives a SIP200OK response sent by the second terminal;
the local wireless gateway is a wireless gateway connected with a second terminal, and the opposite-end wireless gateway is a wireless gateway connected with the first terminal.
Optionally, the converting the first speech data of the first coding scheme from the first terminal into the first speech data of the second coding scheme includes:
acquiring first voice data of a first coding mode in an RTP packet sent by a first terminal;
decoding the first voice data of the first coding mode to obtain a first Pulse Code Modulation (PCM) signal;
compressing the first PCM signal into a first voice fragment with a length of Y bytes by adopting a second coding mode;
packaging the K first voice fragments into a first SLIP voice stream to obtain first voice data of a second coding mode;
the second voice data of the second coding mode is a second SLIP voice stream, the second SLIP voice stream is obtained by packaging K second voice fragments corresponding to a second PCM signal, and the second PCM signal is obtained by decoding the second voice data of the second coding mode sent by the second terminal;
the converting the second voice data of the second coding mode received from the second terminal through the session into the second voice data of the first coding mode includes:
extracting a second voice fragment of Y bytes length from the second SLIP voice stream;
decoding the second voice chip to obtain a second PCM signal;
coding the second PCM signal by adopting the first coding mode to obtain second voice data of the first coding mode;
wherein Y corresponds to the second encoding mode and is a positive integer, and K is a positive integer.
In another aspect, an embodiment of the present disclosure provides a communication apparatus, including: the session establishing module is used for establishing a session between the calling terminal and the called terminal based on the compressed first session initiation protocol SIP message;
the data processing module is used for converting first voice data of a first coding mode from a first terminal into first voice data of a second coding mode and sending the first voice data of the second coding mode to a second terminal by adopting the conversation; converting second voice data of a second coding mode received from a second terminal through the conversation into second voice data of a first coding mode, and sending the second voice data of the first coding mode to the first terminal;
a session disconnection module for disconnecting the session based on the compressed second SIP message;
the first terminal is one of a calling terminal and a called terminal, the second terminal is the other of the calling terminal and the called terminal, the code rate of the first voice data of the first coding mode is greater than that of the first voice data of the second coding mode, and the code rate of the second voice data of the first coding mode is greater than that of the second voice data of the second coding mode.
In another aspect, an embodiment of the present disclosure provides a communication apparatus, including: the communication method comprises a memory and a processor, wherein the memory and the processor are mutually connected in a communication mode, the memory stores computer instructions, and the processor executes the computer instructions so as to execute the communication method in the embodiment.
In another aspect, the present disclosure provides a computer-readable storage medium storing computer instructions for causing a computer to execute the communication method in the above embodiments.
The technical scheme provided by the embodiment of the disclosure at least comprises the following beneficial effects: and establishing a session for the calling terminal and the called terminal based on the compressed first SIP message, and disconnecting the session based on the compressed second SIP message, thereby reducing the network overhead in the aspect of signaling control. Moreover, the code rates of the first voice data and the second voice data of the second coding mode transmitted through the session are lower than those of the first voice data and the second voice data of the first coding mode, namely, the voice data are subjected to low code rate processing and then transmitted through the session, so that the network overhead is reduced on the media transmission level. By reducing network overhead on two layers of signaling control and media transmission, transmission delay is reduced, and the requirement on network bandwidth is reduced, thereby being beneficial to realizing end-to-end VoIP communication of a narrow-band network and expanding the communication capacity of broadband VoIP.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is apparent that the drawings in the description below are only some embodiments of the present disclosure, and it is obvious for those skilled in the art that other drawings may be obtained according to the drawings without creative efforts.
FIG. 1 is a diagram of an application scenario of an embodiment of the present disclosure;
fig. 2 is a schematic flow chart of a communication method provided by an embodiment of the present disclosure;
fig. 3 is an interaction process diagram of a communication method provided by an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a communication device provided in an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a communication device according to an embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the present disclosure more apparent, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.
To facilitate understanding of the disclosed embodiments, terms related to the disclosed embodiments are first described below.
SIP: is an application-layer signaling control protocol for creating, modifying and releasing sessions for one or more participants, compliant with IETF standard RFC 3261.SIP messages typically include information such as SIP message type, calling terminal identification, called terminal identification, and session identification. The message types are denoted by the method names INVITE, 180, 200OK, ACK, BYE in SIP, respectively, that is, the SIP message includes INVITE request, 180, 200OK, ACK, BYE, and the like. A session is identified as a random string that is five bytes to tens of bytes in length.
SLIP (Serial Line Internet Protocol): the system supports a point-to-point link layer communication protocol on a serial communication line, and realizes the functions of framing user data streams and verifying frame data. SLIP is a simple character-oriented protocol. A special flag byte END (C0H) is added at the head and the tail of each user information frame and is packaged into a SLIP frame. If a certain byte in the user information frame is the same as (C0H), the certain byte is replaced with (DBH, DCH). The special character (DBH) is referred to herein as a SLIP escape character. If a byte in the user information frame is the same as (DBH), the byte is replaced with (DBH, DDH).
RTP: the media transmission protocol is used for providing end-to-end real-time transmission service for a plurality of multimedia data needing real-time transmission, such as voice, images, faxes and the like, on an IP network, and conforms to IETF standard RFC3550.
Fig. 1 shows an application scenario of an embodiment of the present disclosure. As shown in fig. 1, the communication system includes a plurality of terminals 11, two wireless gateways 12, and two wireless stations 13. Each wireless gateway 12 is connected to at least one terminal 11, and each wireless gateway 12 is connected to a radio station 13. Illustratively, the terminal 11 and the wireless gateway 12 may be connected via a network, such as an ethernet connection, and the wireless gateway 12 and the radio station 13 may be connected via a serial port.
Among other things, the terminal provides a VoIP voice call function for the user, also referred to as a voice terminal. The wireless gateway completes signaling, media format conversion and radio station flow control between the terminal and the radio station through SIP compression and low-bit-rate processing of the voice data. The radio station provides full duplex wireless communication.
In the embodiment of the present application, the wireless gateway and the radio station connected thereto may be integrated together, and the resulting integrated device may be referred to as a wireless access device.
In the embodiment of the present disclosure, the wireless gateway to which the calling terminal and the called terminal are connected is different. For example, the calling terminal 01100 is connected to a first wireless gateway and the called terminal 02100 is connected to a second wireless gateway.
Fig. 2 is a flowchart illustrating a communication method according to an embodiment of the disclosure, which may be performed by a wireless gateway, for example, the first wireless gateway or the second wireless gateway in fig. 1. As shown in fig. 2, the method comprises the steps of:
s201: a session is established between the calling terminal and the called terminal based on the compressed first SIP message.
S202: and converting the first voice data of the first coding mode from the first terminal into the first voice data of the second coding mode, and sending the first voice data of the second coding mode to the second terminal by adopting the conversation.
S203: and converting second voice data of a second coding mode received from the second terminal through the session into second voice data of a first coding mode, and sending the second voice data of the first coding mode to the first terminal.
S204: disconnecting the session based on the compressed second SIP message.
The first terminal is one of a calling terminal and a called terminal, the second terminal is the other of the calling terminal and the called terminal, the code rate of the first voice data of the first coding mode is greater than that of the first voice data of the second coding mode, and the code rate of the second voice data of the first coding mode is greater than that of the second voice data of the second coding mode.
And establishing a session for the calling terminal and the called terminal based on the compressed first SIP message, and disconnecting the session based on the compressed second SIP message, thereby reducing the network overhead on the aspect of signaling control. Moreover, the code rates of the first voice data and the second voice data of the second coding mode transmitted through the session are lower than those of the first voice data and the second voice data of the first coding mode, namely, the voice data are subjected to low code rate processing and then transmitted through the session, so that the network overhead is reduced on the media transmission level. By reducing network overhead on two levels of signaling control and media transmission, transmission delay is reduced, and the requirement on network bandwidth is reduced, thereby being beneficial to realizing end-to-end VoIP communication of a narrow-band network and expanding the communication capacity of broadband VoIP.
In an embodiment of the present disclosure, the compressed first SIP message corresponds to a first SIP message, and the compressed second SIP message corresponds to a second SIP message.
The compressed first SIP message is used to establish a session, and illustratively includes a SLIP call request message, a SLIP ringing response message, a SLIP off-hook response message, and a SLIP off-hook response acknowledgement message, and accordingly includes a SIP INVITE call request, a SIP180 response, a SIP200OK response, and a SIP ACK acknowledgement.
The compressed second SIP message is used for disconnecting the session, the compressed second SIP message includes a SLIP on-hook request message, and accordingly, the second SIP message includes a SIP BYE on-hook request.
Optionally, the compressed first SIP message includes an information length indication field, an information content field, and a check field, where the information length field is used to indicate a data amount of the information content carried by the information content field, and the check field is used to carry a check sum, and the check sum is determined according to the contents of the information length field and the information content field, for example, the check sum is equal to modulo-2 addition of bytes corresponding to the information length field and the information content field before SLIP escape.
In this embodiment of the present disclosure, the field type included in the compressed second SIP message is the same as the field type included in the compressed first SIP message, and details are not described herein again.
The information content field comprises at least an information element identification and a second session identification for each type of compressed SIP message. The information element identifier is used for indicating the type of the SLIP message and corresponds to the content of the SIP message. Illustratively, the first wireless gateway and the second wireless gateway may agree to represent the type of each SIP message with a length of 1 byte, without repetition. The length of the information element identity is reduced compared to the length of the message type in the SIP message.
The second session identifier is a unique identifier of a call session (also called a SLIP session), and the first wireless gateway uses the dynamically applied memory address as the second session identifier and uses the first session identifier in the corresponding first SIP message to implement mapping between the SIP session and the SLIP session. Illustratively, the first wireless gateway runs on a 32-bit Linux system, and the memory address length is fixed to 4 bytes. In the SIP message, the message types are represented by method names INVITE, 180, 200OK, ACK, BYE, and more bytes are required. Also, the first session identifier is a random string of five bytes to several tens of bytes in length, resulting in a large SIP message length.
By compressing the two key information of the message type and the session identifier, the corresponding compressed SIP message is obtained, and the length of the control signaling can be greatly reduced.
Fig. 3 is a schematic diagram of an interaction process of a communication method provided by another embodiment of the present disclosure, where the communication method may be executed by a terminal and a wireless gateway together, and as shown in fig. 3, the method includes the following processes:
3101: the calling terminal sends a SIP INVITE call request.
When a user initiates a call to a called voice terminal in a calling terminal, the calling terminal sends a SIP INVITE call request. Accordingly, the first wireless gateway receives the INVITE call request.
The SIP INVITE call request comprises an SIP message type, a calling terminal identification, a called terminal identification, a first session identification and first indication information used for indicating a first coding mode. SIP message type, INVITE. The calling terminal identifier and the called terminal identifier may be terminal numbers, for example, the calling terminal identifier is 01100, and the called terminal identifier is 02100. The first session identifier is a random string of five to several tens of bytes in length for uniquely identifying the SIP session between the calling terminal and the called terminal. The first coding mode is a coding mode of voice data sent by the calling terminal, and includes but is not limited to g.711a, g.711u, g.729, and the like.
3102: and the first wireless gateway sends a SLIP call request message corresponding to the INVITE call request.
The SLIP call request message includes an information length field, an information content field, and a check field. The information content comprises an information unit identifier, a second session identifier, a source platform address, a source platform channel number, a calling terminal identifier, a called terminal identifier and first indication information for indicating a first coding mode.
The information element identifier is used to indicate the type of the SLIP message, corresponding to the SIP INVITE request.
The second session identifier is the only identifier of the SLIP session, and the first wireless gateway uses the dynamically applied memory address as the second session identifier and associates the second session identifier with the first session identifier in the SIP INVITE request, so as to realize the mapping between the SIP session and the SLIP session.
The source platform address is the address of the radio station connected with the first wireless gateway, the source platform channel number is the channel number of the radio station connected with the first wireless gateway, the source platform address and the source platform channel number are used for helping the second wireless gateway to determine the signal source, and the second wireless gateway can reply SLIP ringing response messages to the signal source subsequently. The calling terminal identification and the called terminal identification respectively represent calling and called identities, and the calling and called terminal numbers in the SIP INVITE request are mapped through a number list. The length of the calling terminal identification and the called terminal identification is shorter than the length of the calling terminal number and the called terminal number. For example, the first wireless gateway maps the number 01100 to the identifier 0x01, and maps the number 02100 to the identifier 0x02. It can be seen that, in addition to compressing the length of the field for indicating the message type and the session identifier, the calling and called terminal numbers in the SIP message are also compressed, which further reduces the length of the SLIP call request message.
The first indication information is used for transmitting the first coding mode to the called terminal for session negotiation. Illustratively, the first wireless gateway and the second wireless gateway may agree on the encoding scheme of g.711a, g.711u, g.722, G729, etc. to be represented by 1-byte values, e.g., 0x01, 0x02, 0x03, 0x04, etc., respectively.
Illustratively, the first wireless gateway encapsulates the SIP INVITE request in the format of table 1 below, resulting in a SLIP call request message.
Table 1 SLIP call request message
Figure BDA0002857058320000101
As can be seen from table 1, redundant information such as Request-line, cseq, max-Forwards, via, low, contact, content-Type, and Content-Length header fields in the SIP message are also removed from the SLIP call Request message, so that the Length of the SLIP call Request message is greatly reduced compared with the SIP message. It should be noted that some redundant information in the corresponding SIP message is also removed by other SLIP messages.
Illustratively, the first wireless gateway sends the SLIP call request message to the first wireless station through the serial port, and sends the SLIP call request message to the second wireless gateway through the first wireless station. Accordingly, the second wireless gateway receives the SLIP call request message.
Optionally, the method further comprises: after 3102, the first wireless gateway sends a SIP 100 response to the calling terminal; accordingly, the calling terminal receives the SIP 100 response. The first wireless gateway informs the calling terminal that the SIP INVITE call request has been received through the SIP 100 response and prepares to process the INVITE request.
3103: and the second wireless gateway sends the SIP INVITE call request corresponding to the SLIP call request message.
And the second wireless gateway sends the SIP INVITE call request to the called terminal indicated by the SIP INVITE call request, and correspondingly, the called terminal receives the SIP INVITE call request.
Optionally, the method further comprises: after the called terminal receives the SIP INVITE call request, the called terminal sends an SIP 100 response to the second wireless gateway; accordingly, the second wireless gateway receives the SIP 100 response.
3104: the called terminal replies to the SIP180 response after ringing.
Accordingly, the second wireless gateway receives the SIP180 response.
3105: the second wireless gateway sends the SIP180 response corresponding SLIP ringing response message.
The SLIP ringing response message includes an information length field, an information content field, and a check field. The information content comprises an information unit identifier and a second session identifier. The information element identifier is used to indicate the type of the SLIP message, corresponding to the SIP180 response. The second session identification is identical to the second session identification in 102.
Illustratively, the second wireless gateway may encapsulate the SLIP ringing response message in the format of table 2 below.
The second wireless gateway sends SLIP ringing response message to the connected wireless radio station through the serial port, and the wireless radio station sends the SLIP ringing response message through the wireless channel. Accordingly, the first wireless gateway receives the SLIP ring response message.
TABLE 2SLIP ringing response message
Figure BDA0002857058320000111
3106: the first wireless gateway sends a SIP180 response to the calling terminal.
Accordingly, the calling terminal receives the SIP180 response. After receiving the SIP180 response, the calling terminal plays the ring back tone to prompt the calling user that the called party rings.
3107: and after the called terminal is off-hook, the called terminal sends a SIP200OK response to the second wireless gateway.
Accordingly, the second wireless gateway receives the SIP200OK response.
3108: and after receiving the 200OK response, the second wireless gateway sends SIP ACK confirmation to the called terminal.
3109: and the second wireless gateway sends a SLIP off-hook response message corresponding to the SIP200OK response.
Accordingly, the first wireless gateway receives the SLIP off-hook response message.
The SLIP off-hook response message includes an information length field, an information content field, and a check field. The information content comprises an information unit identifier, a second session identifier and a first coding mode. The information element identifier is used to indicate the type of the SLIP message, corresponding to the SIP200OK response. The second session identification is identical to the second session identification in 102. The first coding mode is a voice coding mode supported after session negotiation of the called terminal.
Illustratively, the second wireless gateway encapsulates the SLIP off-hook response message in the format of table 3 below.
TABLE 3 SLIP off-hook response message
Figure BDA0002857058320000121
After the called terminal sends the 200OK response, if the SIP ACK acknowledgement is not received within a set time length (shorter), the called terminal retransmits the 200OK response, and if the SIP ACK acknowledgement is not received even after 10 times of continuous retransmission of the 200OK response, the session is disconnected. In order to reduce the number of unnecessary messages and reduce the possibility of session disconnection, in this embodiment, after receiving the 200OK response, the second wireless gateway first sends a SIP ACK acknowledgement to the called terminal, and then sends a SLIP off-hook response message corresponding to the 200OK response to the first wireless gateway.
Alternatively, in other embodiments, after receiving the 200OK response, the second wireless gateway may also send a SLIP off-hook response message corresponding to the 200OK response to the first wireless gateway, and then send a SIP ACK acknowledgement to the called terminal.
3110: and the first wireless gateway sends a SLIP off-hook response confirmation message to the second wireless gateway.
The SLIP off-hook response acknowledgement message includes an information length field, an information content field, and a check field. Wherein the information content comprises an information unit identity and a second session identity. The information element identifier is used to indicate the type of the SLIP message, corresponding to the SIP ACK acknowledgement. The second session identification is identical to the second session identification in 3102.
Illustratively, the first wireless gateway encapsulates the SLIP off-hook response acknowledgement message in the format of table 4 below.
TABLE 4 SLIP offhook response acknowledgement message
Figure BDA0002857058320000131
3111: the first wireless gateway sends a SIP200OK response to the calling terminal.
Accordingly, the originating terminal receives the SIP200OK response.
3112: the calling terminal replies with a SIP ACK acknowledgement.
Accordingly, the first wireless gateway receives a SIP ACK acknowledgement.
The establishment of a session between the calling terminal and the called terminal based on the compressed SIP message is realized through 3101 to 3112.
After the session is established, transmission of voice data for the calling and called terminals is started. The transmission process is as follows:
3201: after the session is established, the first terminal encapsulates the first voice data in the first coding mode into an RTP packet and sends the RTP packet to the local wireless gateway.
Accordingly, the local wireless gateway receives the RTP packets.
In 3201, the first terminal periodically transmits RTP packets to the local wireless gateway at a first period T1ms corresponding to the first encoding scheme.
The first period T1 is determined according to the code rate corresponding to the first encoding mode. For example, assuming that the code rate corresponding to the first encoding method is Xkbps, the media load of each RTP packet is M bytes, and the RTP packet transmission period is T1ms, the formula (2) can be obtained according to the formula (1)
(1000/T1)*M*8=X*1000 (1)
T1=M*8/X (2)
Wherein M is agreed by the first wireless gateway and the second wireless gateway and is related to the first coding mode. Exemplarily, assuming that the first encoding scheme is g.711a and g.711u, and the corresponding code rate is 64kbps, the media payload of each RTP packet is 160 bytes, and the equation (2) is substituted with T1=64 × 8/160ms =20ms.
Accordingly, the local wireless gateway periodically receives RTP packets.
3202: the local wireless gateway converts the first voice data of the first coding mode in the RTP packet into the first voice data of the second coding mode, and sends the first voice data of the second coding mode through the conversation between the calling terminal and the called terminal.
Correspondingly, the opposite-end wireless gateway receives the first voice data of the second coding mode.
The code rate of the first voice data of the first coding mode is larger than that of the first voice data of the second coding mode.
Exemplarily, the second encoding scheme is Codec2 or the like. Codec2 is an open source audio Codec, which is released under the GNU LGPL framework, supports code rates of 0.7kbps to 3.2kbps, and is mainly applied to HF/VHF (high frequency/very high frequency) stations with low bandwidth. The second coding mode adopts Codec2 and the code rate is 2.4kbps, which can ensure the session quality. It should be noted that, in the embodiment of the present disclosure, another coding scheme with a code rate equivalent to the code rate of Codec2 may also be adopted as the second coding scheme.
The 3202 includes:
step one, a local wireless gateway takes out a media load from an RTP packet to obtain first voice data in a first coding mode, wherein the length of the media load obtained in each RTP packet is M bytes; as described above, M is 160 for the coding schemes such as g.711a and g.711u.
And a second step of decoding the first voice data of the first encoding scheme into a first PCM signal, wherein the first PCM signal is a PCM signal having an audio sample size of 16 bits, N bytes in total. Here, N is determined by the compression rate corresponding to the first encoding method. For example, g.711a, g.711u have a compression rate of 1. For another example, the compression ratio of g.729 to PCM speech is 1.
And thirdly, compressing the first PCM signal into first voice fragments by a second coding mode, wherein the length of each first voice fragment is Y bytes.
Wherein, the length of Y is related to the second coding mode, and Y is a positive integer. For example, for Codec2, Y equals 6. The following description will take Codec2 with a code rate of 2.4kbps as the second encoding scheme as an example.
In the embodiment of the present disclosure, the first voice data in the second coding mode is encapsulated into a SLIP voice stream and then transmitted. Illustratively, the SLIP voice stream may be packaged according to the format of table 5 below.
In order to reduce network overhead, the voice fragment can be written into the buffer, and when the length of the voice fragment in the buffer reaches 6 xK bytes, the voice fragment with 6 xK bytes is taken out from the buffer and then sent. Here, the local wireless gateway may fetch no more than L bytes of message transmission from the serial cache at the second cycle T2. Here, K is determined according to the wireless channel bandwidth, and illustratively, K is equal to 15.
In order to avoid the congestion of the wireless channel, the selection of the values K, N and L needs to satisfy the following conditions: the bandwidth occupied by the produced data A is less than or equal to the bandwidth occupied by the transmitted data B is less than or equal to the actual bandwidth C of the wireless channel.
Here, the bandwidth occupied by the produced data refers to the bandwidth occupied by the voice generated within 1 second of the terminal after being compressed by the second encoding method and encapsulated into SLIP, and if the RTP packet interval is T1ms, a = (1000/T1) = 6/(6 × K) (8 +6 × K) = 8/1000kbps = (64 + 48k)/(T1 × K) kbps; wherein 6 is the length of the media load after RTP media load is converted into PCM and then is compressed by Codec 2;
the transmitted data occupies bandwidth B =8L/T2 kbps;
then, the relationship of K, N and L is (64 + 48K)/(T1 + K) is less than or equal to 8L/T2 and less than or equal to C.
TABLE 5 SLIP voice streams
Figure BDA0002857058320000151
In the embodiment of the present disclosure, one session may correspond to one or more voice streams, and the number of voice streams is determined by the session duration.
3203: and the opposite-end wireless gateway converts the first voice data of the second coding mode into the first voice data of the first coding mode and sends the first voice data of the first coding mode to the second terminal.
Accordingly, the second terminal receives the first voice data of the first coding mode and can hear the voice of the first terminal.
Illustratively, the method for converting the first voice data of the second coding mode into the first voice data of the first coding mode by the peer wireless gateway includes:
firstly, an opposite terminal wireless gateway receives SLIP voice flow and takes out first voice data of a second coding mode from the SLIP voice flow to write into a cache;
and secondly, caching the voice fragment with the set length according to the first period T1.
And thirdly, decoding the voice slices into the PCM signal, wherein one voice slice can obtain the PCM signal with the audio sample size of 16 bits of N bytes.
And fourthly, coding the first PCM signal by adopting a first coding mode to obtain first voice data of the first coding mode.
And the opposite-end wireless gateway takes the first voice data of the first coding mode with the length of M bytes as a media load, encapsulates the first voice data into an RTP packet and then sends the RTP packet to the second terminal.
It should be noted that, in the process of 3201 to 3203, when the first terminal is a calling terminal, the local wireless gateway is a first wireless gateway, the opposite-end wireless gateway is a second wireless gateway, and the second terminal is a called terminal; when the first terminal is a called terminal, the local wireless gateway is a second wireless gateway, the opposite-end wireless gateway is a first wireless gateway, and the second terminal is a calling terminal.
In the session, either one of the calling terminal and the called terminal may end the session. The procedure for ending the session is as follows:
3301: the local terminal is hung up and sends out an SIP BYE hanging-up request;
accordingly, the local wireless gateway receives the SIP BYE on-hook request, stops voice processing and releases session resources. Optionally, the SIP200OK response is replied to the local terminal immediately after the local wireless gateway to SIP BYE on-hook request.
3302: and the local wireless gateway sends a SLIP hang-up request message corresponding to the SIP BYE hang-up request.
Correspondingly, the opposite-end wireless gateway receives the SLIP hang-up request message, stops voice processing and releases session resources.
The SLIP hang request message includes an information length field, an information content field, and a check field. The information content comprises an information unit identifier and a second session identifier. The information unit identifier is used for indicating the type of the SLIP message and corresponds to the SIP BYE on-hook request. The second session identification is identical to the second session identification in 3102.
Illustratively, the local wireless gateway will encapsulate the SLIP hangup request message in the format of table 6 below.
TABLE 6 SLIP on-hook request message
Figure BDA0002857058320000161
3303: and the opposite-end wireless gateway sends a BYE on-hook request to the opposite-end terminal.
Correspondingly, the opposite terminal receives the BYE hang-up request and disconnects the session.
Optionally, the method further comprises: and after the opposite terminal receives the BYE on-hook request, the opposite terminal sends SIP200OK response to the opposite wireless gateway.
It should be noted that, in the process 3301 to 3304, when the local terminal is the calling terminal, the local wireless gateway is the first wireless gateway, the opposite-end wireless gateway is the second wireless gateway, and the opposite-end terminal is the called terminal; when the local terminal is a called terminal, the local wireless gateway is a second wireless gateway, the opposite-end wireless gateway is a first wireless gateway, and the opposite-end terminal is a calling terminal.
According to the RFC3261 specification, the length of each SIP message is at least as follows: INVITE is 400 bytes, 180 response is 200 bytes, 200OK response is 400 bytes, ACK is 200 bytes, BYE is 200 bytes. In the embodiment of the present disclosure, the lengths of the SLIP call request message, the SLIP off-hook response message, the SLIP call acknowledgement message, and the SLIP on-hook request message are 13 bytes, 7 bytes, 8 bytes, 7 bytes, and 7 bytes, respectively, and it can be seen that the compression rate of the SIP message is 42/1400=3%, which is much lower than 10%, thereby greatly reducing the network overhead on the level of the control signaling.
The following exemplifies a communication method according to an embodiment of the present disclosure, which includes the following processes:
(1) The session is established by SIP compression, comprising the following substeps:
(1.1) a user initiates a Call to a target platform called voice terminal 02100 on a calling voice terminal 01100, and sends an SIP INVITE Call request carrying information such as a calling number 01100, a called number 02100, a Call-ID, a G.711A voice coding mode and the like;
(1.2) the source platform wireless gateway receives the INVITE Call request, maps or compresses a calling number, a called number, a Call-ID and a voice coding mode according to the requirement of the message format in the table 1, encapsulates the mapping or the compression into a SLIP Call request message, and sends the SLIP Call request message to a wireless radio station through a serial port;
(1.3) the destination platform wireless gateway receives the SLIP Call request message, records the source platform address and the channel number related to the session ID so as to reply the message subsequently, then inversely maps the calling user ID, the called user ID, the session ID and the voice coding mode into a calling number 01100, a called number 02100, a Call-ID and a G.711A voice coding mode, and then sends an INVITE Call request to a called voice terminal 02100;
(1.4) the called voice terminal 02100 receives the INVITE call request, and replies an SIP180 response after ringing;
(1.5) the destination platform wireless gateway receives the 180 response, encapsulates the SLIP ringing response message according to the requirement of the format of the table 2, and sends the SLIP ringing response message to the source platform through a wireless channel;
(1.6) the source platform wireless gateway receives the SLIP ringing response message, sends SIP180 response to calling voice terminal 01100, and calling voice terminal 01100 plays the ring back tone;
(1.7) after the user goes off hook on the called voice terminal 02100, the user sends SIP200OK response to the wireless gateway;
(1.8) the wireless gateway of the destination platform receives the 200OK response, immediately sends SIP ACK acknowledgement to the called voice terminal 02100, then encapsulates SLIP off-hook response message according to the requirement of the format of table 3, carries the voice coding mode representing G.711A, and sends the message to the source platform through a wireless channel;
(1.9) the source platform wireless gateway receives the SLIP off-hook response message, immediately replies a SLIP off-hook response confirmation message in a format of table 4, and then sends an SIP200OK response to the calling voice terminal 01100, wherein the response carries a G.711A voice coding mode;
(1.10) after the caller voice terminal 01100 replies SIP ACK confirmation, the caller and the called voice terminals establish conversation through a wireless channel;
(2) Performing a voice conversation by voice low rate processing optimization, comprising the steps of:
(2.1) after the session is established, a user speaks on one voice terminal (such as 01100), and the terminal periodically sends RTP packets coded by G.711A to a local wireless gateway every 20 ms;
(2.2) the local wireless gateway receives the RTP packet, takes out the media load with the length of 160 bytes from the RTP packet, decodes the G.711A into a PCM signal with the length of 320 bytes, then encodes and compresses the PCM signal into voice fragments with the length of 6 bytes through Codec2 with the code rate of 2.4kbps and writes the voice fragments into a cache, when the voice fragments in the cache reach 90 bytes, the voice fragments are encapsulated into SLIP voice stream according to the format requirement of a table 5 and written into a serial port cache, and in order to avoid wireless network congestion, the wireless gateway takes out the message with the length of no more than 100 bytes from the serial port cache at regular intervals with the period of 300ms and sends the message to a wireless channel;
(2.3) the opposite terminal wireless gateway receives the message from the wireless channel, takes out 90 bytes Codec2 coded voice from SLIP voice stream and writes into the buffer, then periodically accesses 6 bytes voice fragment from the buffer every 20ms, codec2 decodes into 320 bytes PCM signal, then G.711A encodes into 160 bytes long media load, encapsulates into RTP packet and sends to the local voice terminal (such as 02100) through the wired network;
(2.4) the local voice terminal (such as 02100) receives the RTP stream and can hear the voice of the opposite voice terminal (such as 01100);
(3) Disconnecting the session through SIP compression, comprising the steps of:
(3.1) after the conversation is finished, the user hangs up one voice terminal (such as 01100) and sends out an SIP BYE on-hook request;
(3.2) the local wireless gateway receives the BYE on-hook request, immediately replies an SIP200OK response, stops voice processing and releases session resources, and then requires a packaged SLIP on-hook request message in a table 6 format to be sent to a wireless channel;
(3.3) the wireless gateway of the opposite terminal receives SLIP hang-up request information from the wireless channel, stops voice processing and releases session resources, and then sends a BYE hang-up request to the voice terminal (such as 02100) of the other party;
and (3.4) the voice terminal (such as 02100) receives a BYE hang-up request and disconnects the conversation.
Firstly, when a user initiates a conversation, standard SIP call signaling on a wired network is sent to a wireless network for transmission after SIP compression and SLIP encapsulation, and then is restored to the standard SIP call signaling on a target platform, so that a voice terminal can quickly complete end-to-end conversation connection through a narrow-band network; then in the conversation process, decoding RTP packets on the wired network into PCM signals through payload, codec2 coding and SLIP packaging, regularly sending the PCM signals, codec2 coding and SLIP packaging to a wireless network for transmission on the principle of avoiding network congestion, and reducing the RTP packets into RTP packets through the inverse process of SLIP analysis, codec2 decoding and PCM signal coding on a target platform so that a voice terminal realizes voice communication through a narrow-band network; finally, when the conversation is over, the standard SIP hang-up signaling on the wired network is sent to the wireless network for transmission after SIP compression and SLIP encapsulation, and then is restored to the standard SIP hang-up signaling on the destination platform, so that the conversation connection between the voice terminals is disconnected. The SIP compression method provided by the invention can compress the size of a standard SIP message to be below 10%, and the provided voice low-bit-rate processing optimization method can reduce the channel bandwidth occupied by full-duplex conversation to be below 3.2Kbps, so that the voice terminal can realize end-to-end VoIP conversation on a short wave/ultra-short wave wireless channel with the bandwidth not exceeding 10Kbps, and the communication capacity of broadband wireless channels such as satellite communication, microwave and the like can be expanded.
The embodiment of the disclosure is suitable for communication scenes such as ship communication and the like which need to carry out narrow-band communication.
Fig. 4 is a schematic structural diagram of a communication device provided in an embodiment of the present disclosure, which may be implemented by software, hardware, or a combination of the two to become part of or all of a wireless gateway. As shown in fig. 4, the communication apparatus 400 includes: a session setup module 401, a data processing module 402 and a session disconnect module 403.
The session establishing module 401 is configured to establish a session between the calling terminal and the called terminal based on the compressed first session initiation protocol SIP message. A data processing module 402, configured to convert first voice data of a first coding scheme from a first terminal into first voice data of a second coding scheme, and send the first voice data of the second coding scheme to a second terminal by using the session; and converting second voice data of a second coding mode received from the second terminal through the session into second voice data of a first coding mode, and sending the second voice data of the first coding mode to the first terminal. The session disconnection module 403 is configured to disconnect the session based on the compressed second SIP message.
The first terminal is one of a calling terminal and a called terminal, the second terminal is the other of the calling terminal and the called terminal, the code rate of the first voice data of the first coding mode is greater than that of the first voice data of the second coding mode, and the code rate of the second voice data of the first coding mode is greater than that of the second voice data of the second coding mode.
Optionally, the compressed first SIP message corresponds to a first SIP message, the compressed second SIP message corresponds to a second SIP message, the first SIP message and the second SIP message both include a first session identifier, the compressed first SIP message and the compressed second SIP message both include a second session identifier uniquely associated with the first session identifier, the second session identifier is a memory address applied by the first wireless gateway, and the first wireless gateway is a wireless gateway connected to the calling terminal through a portal.
Optionally, the first SIP message includes a SIP INVITE call request, a SIP180 response, a SIP200OK response, and a SIP ACK acknowledgement, and the compressed first SIP message includes a SLIP call request message, a SLIP ringing response message, a SLIP off-hook response message, and a SLIP off-hook response acknowledgement message.
Optionally, the session establishing module 401 is configured to receive a SIP INVITE call request sent by the calling terminal; converting the SIP INVITE call request into a SLIP call request message; sending the SLIP call request message to a second wireless gateway; receiving a SLIP ringing response message sent by the second wireless gateway, wherein the SLIP ringing response message is generated based on the second wireless gateway receiving a SIP180 response sent by a called terminal; sending SIP180 response to the calling terminal; receiving a SLIP off-hook response message sent by the second wireless gateway, wherein the SLIP off-hook response message is generated based on the second wireless gateway receiving a SIP200OK response sent by a called terminal; sending a SIP200OK response to the calling terminal; sending a SLIP off-hook response confirmation message to the second wireless gateway; receiving SIP ACK confirmation sent by a calling terminal; and the second wireless gateway is connected with the called terminal through a network port.
Optionally, the session establishing module 401 is configured to receive a SLIP call request message; sending a SIP INVITE request corresponding to the SLIP call request message to a called terminal; receiving SIP180 response sent by the called terminal; sending a SLIP ringing response message corresponding to the SIP180 response to the first wireless gateway, wherein the SLIP ringing response message is used for triggering the first wireless gateway to send the SIP180 response to the calling terminal; receiving SIP200OK response sent by the called terminal; sending a SLIP off-hook response message corresponding to the SIP200OK response to the first wireless gateway, wherein the SLIP off-hook response message is used for triggering the first wireless gateway to send the SIP200OK response to the calling terminal; sending SIP ACK confirmation to the called terminal; receiving a SLIP off-hook response confirmation message sent by a first wireless gateway; and the second wireless gateway is connected with the called terminal through a network port.
Optionally, the data processing module 402 is configured to obtain first voice data of a first coding scheme in an RTP packet sent by the first terminal; decoding the first voice data of the first coding mode to obtain a first Pulse Code Modulation (PCM) signal; compressing the first PCM signal into a first voice fragment with a length of Y bytes by adopting a second coding mode; and packaging the K first voice fragments into a first SLIP voice stream to obtain first voice data of a second coding mode, wherein Y corresponds to the second coding mode and is a positive integer, and K is a positive integer.
Optionally, the second voice data of the second coding scheme is a second SLIP voice stream, the second SLIP voice stream is obtained by encapsulating K second voice fragments corresponding to a second PCM signal, the second PCM signal is obtained by decoding the second voice data of the second coding scheme sent by the second terminal, and the data processing module 402 is further configured to extract a second voice fragment with a length of Y bytes from the second SLIP voice stream; decoding the second voice chip to obtain a second PCM signal; and coding the second PCM signal by adopting the first coding mode to obtain second voice data of the first coding mode, wherein Y corresponds to the second coding mode and is a positive integer.
Optionally, the second SIP message includes a SIP BYE on-hook request, and the compressed second SIP message includes a SLIP on-hook request message.
Optionally, the session disconnection module 403 is configured to receive an SIP BYE on-hook request sent by the first terminal; sending a SLIP hang-up request message corresponding to the SIP BYE hang-up request to an opposite-end wireless gateway, wherein the SLIP hang-up request message is used for triggering the opposite-end wireless gateway to send the BYE hang-up request to the second terminal; sending a SIP200OK response to the first terminal; and the opposite-end wireless gateway is connected with the second terminal through a network port.
Optionally, the session disconnection module 403 is configured to receive a SLIP hang-up request message sent by an opposite-end wireless gateway; sending a SIP BYE on-hook request corresponding to the SLIP on-hook request message to a second terminal; receiving a SIP200OK response sent by the second terminal; and the opposite-end wireless gateway is connected with the first terminal.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 5 is a schematic structural diagram of a communication device according to an embodiment of the present disclosure. As shown in fig. 5, the communication device may be a computer apparatus 600, the computer apparatus 600 including a Central Processing Unit (CPU) 601, a system memory 604 including a Random Access Memory (RAM) 602 and a Read Only Memory (ROM) 603, and a system bus 605 connecting the system memory 604 and the central processing unit 601. The computer device 600 also includes a basic input/output system (I/O system) 606 for facilitating information transfer between various elements within the computer, and a mass storage device 607 for storing an operating system 613, application programs 614, and other program modules 615.
The basic input/output system 606 includes a display 608 for displaying information and an input device 609 such as a mouse, keyboard, etc. for a user to input information. Wherein the display 608 and the input device 609 are connected to the central processing unit 601 through an input output controller 610 connected to the system bus 605. The basic input/output system 606 may also include an input/output controller 610 for receiving and processing input from a number of other devices, such as a keyboard, mouse, or electronic stylus. Similarly, input/output controller 610 may also provide output to a display screen, a printer, or other type of output device.
The mass storage device 607 is connected to the central processing unit 601 through a mass storage controller (not shown) connected to the system bus 605. The mass storage device 607 and its associated computer-readable media provide non-volatile storage for the computer device 600. That is, the mass storage device 607 may include a computer-readable medium (not shown) such as a hard disk or CD-ROM drive.
Without loss of generality, the computer-readable media may comprise computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes RAM, ROM, EPROM, EEPROM, flash memory or other solid state memory technology, CD-ROM, DVD, or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that the computer storage media is not limited to the foregoing. The system memory 604 and mass storage 607 described above may be collectively referred to as memory.
The computer device 600 may also operate as a remote computer connected to a network via a network, such as the internet, in accordance with various embodiments of the present invention. That is, the computer device 600 may be connected to the network 612 through the network interface unit 611 connected to the system bus 605, or may be connected to other types of networks or remote computer systems (not shown) using the network interface unit 611.
The memory further includes one or more programs, the one or more programs are stored in the memory, and the central processing unit 601 implements the communication method shown in fig. 2 or 3 by executing the one or more programs.
In an exemplary embodiment, a non-transitory computer-readable storage medium, such as a memory, including instructions executable by a processor of a computer device to perform the communication methods illustrated by the various embodiments of the present invention is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The embodiment of the disclosure also provides a communication system, which comprises a first wireless gateway and a second wireless gateway. The first wireless gateway is connected to the calling terminal for performing the steps performed by the wireless gateway connected to the calling terminal in fig. 3, and the second wireless gateway is connected to the called terminal for performing the steps performed by the wireless gateway connected to the called terminal in fig. 3.
The above description is meant to be illustrative of the principles of the present disclosure and not to be taken in a limiting sense, and any modifications, equivalents, improvements and the like that are within the spirit and scope of the present disclosure are intended to be included therein.

Claims (9)

1. A method of communication, comprising:
establishing a session between the calling terminal and the called terminal based on the compressed first Session Initiation Protocol (SIP) message;
converting first voice data of a first coding mode from a first terminal into first voice data of a second coding mode, and sending the first voice data of the second coding mode to a second terminal by adopting the conversation;
converting second voice data of a second coding mode received from a second terminal through the session into second voice data of a first coding mode, and sending the second voice data of the first coding mode to the first terminal;
disconnecting the session based on the compressed second SIP message;
the first compressed SIP message corresponds to a first SIP message, the second compressed SIP message corresponds to a second SIP message, the first SIP message and the second SIP message both comprise first session identifiers, the first compressed SIP message and the second compressed SIP message both comprise second session identifiers uniquely associated with the first session identifiers, the second session identifiers are memory addresses applied by a first wireless gateway, and the first wireless gateway is a wireless gateway connected with the calling terminal through a gateway;
the first terminal is one of a calling terminal and a called terminal, the second terminal is the other of the calling terminal and the called terminal, the code rate of the first voice data of the first coding mode is greater than that of the first voice data of the second coding mode, and the code rate of the second voice data of the first coding mode is greater than that of the second voice data of the second coding mode.
2. The method of claim 1 wherein the first SIP message comprises a SIP INVITE call request, a SIP180 response, a SIP200OK response, and a SIP ACK acknowledgment, and wherein the compressed first SIP message comprises a SLIP call request message, a SLIP ringing response message, a SLIP off-hook response message, and a SLIP off-hook response acknowledgment message;
the session is established between the calling terminal and the called terminal based on the compressed SIP message, and the session comprises the following steps:
a first wireless gateway receives a SIP INVITE call request sent by the calling terminal;
the first wireless gateway converts the SIP INVITE call request into a SLIP call request message;
the first wireless gateway sends the SLIP call request message to a second wireless gateway;
the first wireless gateway receives a SLIP ringing response message sent by the second wireless gateway, wherein the SLIP ringing response message is generated based on the second wireless gateway receiving a SIP180 response sent by a called terminal;
the first wireless gateway sends SIP180 response to the calling terminal;
the first wireless gateway receives a SLIP off-hook response message sent by the second wireless gateway, wherein the SLIP off-hook response message is generated based on the second wireless gateway receiving a SIP200OK response sent by a called terminal;
the first wireless gateway sends SIP200OK response to the calling terminal;
the first wireless gateway sends a SLIP off-hook response confirmation message to the second wireless gateway;
a first wireless gateway receives SIP ACK confirmation sent by a calling terminal;
and the second wireless gateway is connected with the called terminal through a network port.
3. The method of claim 1 wherein the first SIP message comprises a SIP INVITE call request, a SIP180 response, a SIP200OK response, and a SIP ACK acknowledgment, and wherein the compressed first SIP message comprises a SLIP call request message, a SLIP ringing response message, a SLIP off-hook response message, and a SLIP off-hook response acknowledgment message;
the session is established between the calling terminal and the called terminal based on the compressed SIP message, and the session comprises the following steps:
the second wireless gateway receives the SLIP call request message;
the second wireless gateway sends the SIP INVITE request corresponding to the SLIP call request message to the called terminal;
the second wireless gateway receives a SIP180 response sent by the called terminal;
the second wireless gateway sends the SLIP ringing response message corresponding to the SIP180 response to the first wireless gateway, wherein the SLIP ringing response message is used for triggering the first wireless gateway to send the SIP180 response to the calling terminal;
the second wireless gateway receives a SIP200OK response sent by the called terminal;
the second wireless gateway sends a SLIP off-hook response message corresponding to the SIP200OK response to the first wireless gateway, wherein the SLIP off-hook response message is used for triggering the first wireless gateway to send the SIP200OK response to the calling terminal;
the second wireless gateway sends SIP ACK confirmation to the called terminal;
the second wireless gateway receives a SLIP off-hook response confirmation message sent by the first wireless gateway;
and the second wireless gateway is connected with the called terminal through a network port.
4. The method of claim 1 wherein the second SIP message comprises a SIP BYE on-hook request and the compressed second SIP message comprises a SLIP on-hook request message;
the compressed second SIP message based disconnection of the session, comprising:
the local wireless gateway receives an SIP BYE on-hook request sent by a first terminal;
the local wireless gateway sends a SLIP hang-up request message corresponding to the SIP BYE hang-up request to an opposite-end wireless gateway, wherein the SLIP hang-up request message is used for triggering the opposite-end wireless gateway to send the BYE hang-up request to the second terminal;
the local wireless gateway sends a SIP200OK response to the first terminal;
the local wireless gateway is a wireless gateway connected with the first terminal through a network port, and the opposite-end wireless gateway is a wireless gateway connected with the second terminal through a network port.
5. The method of claim 1 wherein the second SIP message comprises a SIP BYE on-hook request and the compressed second SIP message comprises a SLIP on-hook request message;
the compressed second SIP message based disconnection of the session, comprising:
a local wireless gateway receives a SLIP hang-up request message sent by an opposite-end wireless gateway;
the local wireless gateway sends an SIP BYE on-hook request corresponding to the SLIP on-hook request message to the second terminal;
the local wireless gateway receives a SIP200OK response sent by the second terminal;
the local wireless gateway is a wireless gateway connected with a second terminal, and the opposite-end wireless gateway is a wireless gateway connected with the first terminal.
6. The method of any of claims 1 to 5, wherein converting the first speech data from the first terminal in the first coding scheme to the first speech data in the second coding scheme comprises:
acquiring first voice data of a first coding mode in an RTP packet sent by a first terminal;
decoding the first voice data of the first coding mode to obtain a first Pulse Code Modulation (PCM) signal;
compressing the first PCM signal into a first voice fragment with a length of Y bytes by adopting a second coding mode;
packaging the K first voice fragments into a first SLIP voice stream to obtain first voice data of a second coding mode;
the second voice data of the second coding mode is a second SLIP voice stream, the second SLIP voice stream is obtained by encapsulating K second voice fragments corresponding to a second PCM signal, and the second PCM signal is obtained by decoding the second voice data of the second coding mode sent by the second terminal;
the converting the second voice data of the second coding mode received from the second terminal through the session into the second voice data of the first coding mode includes:
extracting a second voice fragment of Y bytes length from the second SLIP voice stream;
decoding the second voice chip to obtain a second PCM signal;
coding the second PCM signal by adopting the first coding mode to obtain second voice data of the first coding mode;
wherein Y corresponds to the second encoding mode and is a positive integer, and K is a positive integer.
7. A communications apparatus, comprising:
the session establishing module is used for establishing a session between the calling terminal and the called terminal based on the compressed first session initiation protocol SIP message;
the data processing module is used for converting first voice data of a first coding mode from a first terminal into first voice data of a second coding mode and sending the first voice data of the second coding mode to a second terminal by adopting the conversation; converting second voice data of a second coding mode received from a second terminal through the session into second voice data of a first coding mode, and sending the second voice data of the first coding mode to the first terminal;
a session disconnection module for disconnecting the session based on the compressed second SIP message;
the first compressed SIP message corresponds to a first SIP message, the second compressed SIP message corresponds to a second SIP message, the first SIP message and the second SIP message both comprise first session identifiers, the first compressed SIP message and the second compressed SIP message both comprise second session identifiers uniquely associated with the first session identifiers, the second session identifiers are memory addresses applied by a first wireless gateway, and the first wireless gateway is a wireless gateway connected with the calling terminal through a gateway;
the first terminal is one of a calling terminal and a called terminal, the second terminal is the other of the calling terminal and the called terminal, the code rate of the first voice data of the first coding mode is greater than that of the first voice data of the second coding mode, and the code rate of the second voice data of the first coding mode is greater than that of the second voice data of the second coding mode.
8. A communications apparatus, comprising: a memory and a processor, communicatively connected to each other, the memory storing computer instructions, the processor performing the communication method according to any one of claims 1 to 6 by executing the computer instructions.
9. A computer-readable storage medium storing computer instructions for causing a computer to perform the communication method according to any one of claims 1 to 6.
CN202011548609.4A 2020-12-24 2020-12-24 Communication method, apparatus and computer storage medium Active CN112887497B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011548609.4A CN112887497B (en) 2020-12-24 2020-12-24 Communication method, apparatus and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011548609.4A CN112887497B (en) 2020-12-24 2020-12-24 Communication method, apparatus and computer storage medium

Publications (2)

Publication Number Publication Date
CN112887497A CN112887497A (en) 2021-06-01
CN112887497B true CN112887497B (en) 2022-11-01

Family

ID=76043466

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011548609.4A Active CN112887497B (en) 2020-12-24 2020-12-24 Communication method, apparatus and computer storage medium

Country Status (1)

Country Link
CN (1) CN112887497B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1400828A (en) * 2001-07-27 2003-03-05 华为技术有限公司 Method for implementing base station speech compression in mobile communication system
US6567399B1 (en) * 1999-05-05 2003-05-20 3Com Corporation Hi-fidelity line card
CN1501724A (en) * 2002-11-13 2004-06-02 华为技术有限公司 A Method for voice transmission in mobile communication system
CN1705403A (en) * 2004-06-03 2005-12-07 华为技术有限公司 A method for selecting code conversion device in voice-over-packet network
CN101300764A (en) * 2005-09-02 2008-11-05 北方电讯网络有限公司 Sip header reduction
CN101513010A (en) * 2006-09-07 2009-08-19 京瓷无线公司 Protocol and method of VIA field compression in session initiation protocol signaling for 3G wireless networks
CN102394891A (en) * 2011-11-15 2012-03-28 上海市共进通信技术有限公司 VoIP (Voice over Internet Protocol) network-based method for realizing overlength SIP (session initiation protocol) protocol signaling package transmission
CN107517202A (en) * 2017-07-28 2017-12-26 北京容联易通信息技术有限公司 A kind of binarization method of sending and receiving of SIP signalings

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
ATE377897T1 (en) * 2003-02-14 2007-11-15 Research In Motion Ltd SYSTEM AND METHOD FOR COMPACT MESSAGING IN NETWORK COMMUNICATIONS
CN1933480A (en) * 2005-09-13 2007-03-21 李晓耕 Method for multimedia data switching gateway
ES2373357T3 (en) * 2008-02-29 2012-02-02 Telefonaktiebolaget L M Ericsson (Publ) TECHNIQUE FOR CONDUCTING THE SIGNALING CONVERSION BETWEEN THE HTTP AND SIP DOMAINS.

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6567399B1 (en) * 1999-05-05 2003-05-20 3Com Corporation Hi-fidelity line card
CN1400828A (en) * 2001-07-27 2003-03-05 华为技术有限公司 Method for implementing base station speech compression in mobile communication system
CN1501724A (en) * 2002-11-13 2004-06-02 华为技术有限公司 A Method for voice transmission in mobile communication system
CN1705403A (en) * 2004-06-03 2005-12-07 华为技术有限公司 A method for selecting code conversion device in voice-over-packet network
CN101300764A (en) * 2005-09-02 2008-11-05 北方电讯网络有限公司 Sip header reduction
CN101513010A (en) * 2006-09-07 2009-08-19 京瓷无线公司 Protocol and method of VIA field compression in session initiation protocol signaling for 3G wireless networks
CN102394891A (en) * 2011-11-15 2012-03-28 上海市共进通信技术有限公司 VoIP (Voice over Internet Protocol) network-based method for realizing overlength SIP (session initiation protocol) protocol signaling package transmission
CN107517202A (en) * 2017-07-28 2017-12-26 北京容联易通信息技术有限公司 A kind of binarization method of sending and receiving of SIP signalings

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"OMA-PoC-2004-0655-CP-SigComp".《3GPP tsg_sa\WG2_Arch》.2004, *

Also Published As

Publication number Publication date
CN112887497A (en) 2021-06-01

Similar Documents

Publication Publication Date Title
US7656861B2 (en) Method and apparatus for interleaving text and media in a real-time transport session
CN101317404B (en) Method and system for transmitting and negotiating band width economization ability by IP packet, and method and system for economizing network band width
JP4491521B2 (en) DTMF transfer method by RTP
CN101174995B (en) Method and system for monitoring multimedia service performance
JP2006166489A (en) Scan format conversion apparatus and method
WO2017092389A1 (en) Packet processing method and device
US9332049B1 (en) Media compression for tunneled real-time communications
CN106921843A (en) Data transmission method and device
WO2010083737A1 (en) Method and apparatus for processing voice signal, method and apparatus for transmitting voice signal
KR100716817B1 (en) A Call Set-up Method of a Mobile Communication Terminal
CN104270594A (en) Data packet sending and receiving method and device
US20060133372A1 (en) Apparatus and method for multiplexing packet in mobile communication network
KR100938447B1 (en) Improved hardware arrangement, terminal, and method for transferring audio signal in packet-switched communications network
CN101197825B (en) Method, system and device for compression message transmission
CN112887497B (en) Communication method, apparatus and computer storage medium
CN100547997C (en) The method that the IP data compression sends and receives in the mobile communication
CN107517202B (en) Binary sending and receiving method of SIP signaling
CN101179353A (en) Method and system of monitoring multimedia service performance
US20110128967A1 (en) System, method, program element and computer-accessible medium for forwarding media control messages
WO2019172449A1 (en) Rtp conversion device and rtp conversion method
EP4358591A1 (en) Data transmission method and related device
WO2010075794A1 (en) Method and apparatus for processing compressed multiplexed messages
JP2007282038A (en) Signal transmission apparatus
JP2000349824A (en) Transmission and reception system for voice data
CN109219079B (en) IR message transmission method and communication equipment

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