Method, apparatus, and media gateway for codec rate adjustment

The present invention discloses a method for codec rate adjustment. A media gateway (MGW) determines whether an initial codec rate of a first interface is consistent with an initial codec rate of a second interface or an initial codec rate of a third interface, where the first interface is an A interface, the second interface is an Nb interface, and the third interface is an Iu interface; when determining that the initial codec rate of the first interface is inconsistent with the initial codec rate of the second interface or the initial codec rate of the third interface, the MGW adjusts the initial codec rate of the second interface or the initial codec rate of the third interface to the initial codec rate of the first interface. Therefore, quick and convenient codec rate adjustment can be implemented and voice service quality can be improved.

TECHNICAL FIELD

The present invention relates to the field of communications technologies, and in particular, to a method, an apparatus, and a media gateway for codec rate adjustment.

BACKGROUND

At present, the 3rd Generation Partnership Project (3GPP) protocol describes only a policy of selecting an initial codec rate of each interface for Adaptive Multi-Rate codec (AMR)/Adaptive Multi-Rate Wideband codec (AMR-WB).

For example, a policy of selecting an initial codec rate of an A interface for AMR/AMR-WB is as follows: a low codec rate is selected preferentially to obtain the current channel quality. If the channel quality is confirmed to be good, the codec rate is gradually increased to improve the voice service quality. A policy of selecting an initial codec rate of an Iu interface or an Nb interface for AMR/AMR-WB is as follows: a high codec rate is selected preferentially.

In the scenario of Transcoder Free Operation (TrFO) communication, because selection of the initial codec rate of each interface for AMR/ARM-WB exists collision, for example, if the channel quality is poor, using a high codec rate by the downstream increases the probability of packet loss and packet error, which greatly affects the voice service quality; in addition, the process of initiating a request for reducing a codec rate after poor voice service quality is detected is slow, resulting in non-timely codec rate adjustment.

SUMMARY

Embodiments of the present invention provide a method, an apparatus, and a media gateway for codec rate adjustment to implement quick and convenient codec rate adjustment.

In one aspect, an embodiment of the present invention provides a method for codec rate adjustment, including: determining, by a media gateway (MGW), whether an initial codec rate of a first interface is consistent with an initial codec rate of a second interface or an initial codec rate of a third interface, where the first interface is an A interface between a base station subsystem (BSS) and the MGW, the second interface is an Nb interface between the MGW and a peer MGW, and the third interface is an Iu interface between a radio network subsystem (RNS) and the MGW; when the initial codec rate of the first interface is inconsistent with the initial codec rate of the second interface or the initial codec rate of the third interface, adjusting, by the MGW, the initial codec rate of the second interface or the initial codec rate of the third interface to the initial codec rate of the first interface.

In another aspect, an embodiment of the present invention provides an apparatus for codec rate adjustment, including: a determining unit configured to determine whether an initial codec rate of a first interface is consistent with an initial codec rate of a second interface or an initial codec rate of a third interface, where the first interface is an A interface between a BSS and a MGW, the second interface is an Nb interface between the MGW and a peer MGW, and the third interface is an Iu interface between a RNS and the MGW; an adjusting unit configured to adjust the initial codec rate of the second interface or the initial codec rate of the third interface to the initial codec rate of the first interface when the determining unit determines that the initial codec rate of the first interface is inconsistent with the initial codec rate of the second interface or the initial codec rate of the third interface.

In still another aspect, an embodiment of the present invention provides a media gateway, which includes the foregoing apparatus for codec rate adjustment.

In the technical solutions provided by the present invention, when determining that the initial codec rate of the Iu interface or the Nb interface is inconsistent with the initial codec rate of the A interface, the MGW adjusts the initial codec rate of the Iu interface or the Nb interface to the initial codec rate of the A interface, therefore implementing quick and convenient codec rate adjustment, improving voice service quality, and avoiding non-timely codec rate adjustment resulting from a slow process of initiating a request for reducing a codec rate after poor voice service quality is detected.

DESCRIPTION OF EMBODIMENTS

An embodiment of the present invention provides a method for codec rate adjustment, which, as shown inFIG. 1, includes:

11. An MGW determines whether an initial codec rate of a first interface is consistent with an initial codec rate of a second interface or an initial codec rate of a third interface, where the first interface is an A interface between a BSS and the MGW, the second interface is an Nb interface between the MGW and a peer MGW, and the third interface is an Iu interface between an RNS and the MGW.

12. When the initial codec rate of the first interface is inconsistent with the initial codec rate of the second interface or the initial codec rate of the third interface, the MGW adjusts the initial codec rate of the second interface or the initial codec rate of the third interface to the initial codec rate of the first interface.

In the technical solution provided by the present embodiment of the invention, when determining that the initial codec rate of the Iu interface or the Nb interface is inconsistent with the initial codec rate of the A interface, the MGW adjusts the initial codec rate of the Iu interface or the Nb interface to the initial codec rate of the A interface, therefore implementing quick and convenient codec rate adjustment, improving voice service quality, and avoiding non-timely codec rate adjustment resulting from a slow process of initiating a request for reducing a codec rate after poor voice service quality is detected.

Optionally, the method for codec rate adjustment according to the embodiment of the present invention may further include:

After the first interface of the MGW receives a packet, the MGW determines whether the initial codec rate of the first interface is consistent with the initial codec rate of the second interface or the initial codec rate of the third interface.

In the method for codec rate adjustment according to the embodiment of the present invention, the codec rate includes a codec rate based on AMR/AMR-WB.

The following usesFIG. 2toFIG. 6as an example to illustrate the method for codec rate adjustment according to the embodiment of the present invention. For the purpose of convenient description, the following conventions are made:

An A interface between a BSS and an MGW is a first interface.

An Nb interface between two MGWs is a second interface.

An Iu Interface between an RNS and an MGW is a third interface.

As shown inFIG. 2, in the application scenario in which communication between the 2nd generation mobile communication technology (2G) network and the 3rd generation mobile communication technology (3G) network is supported, the codec selected for the core network is AMR. A Radio Network Controller (RNC) selects the highest rate in the AMR as an initial codec rate. TrFO is implemented on an MGW1 and an MGW2.

A method for codec rate adjustment provided by an embodiment of the present invention includes:

The MGW1 determines that an initial rate of an A interface is inconsistent with an initial codec rate of an Nb interface.

The MGW1 sends a request for adjusting a rate to the Nb interface to adjust the initial codec rate of the Nb interface to the initial codec rate of the A interface.

In addition, on the MGW2, if the initial codec rate of the Nb interface is consistent with the initial codec rate of the Iu interface, the MGW2 does not initiate a rate adjustment operation.

As shown inFIG. 3, in the application scenario in which communication between the 2G network and the Public Switched Telephone Network (PSTN) is supported, the codec selected for the core network is AMR. An MGW2 selects the highest rate in the AMR as an initial codec rate. TrFO is implemented on an MGW1.

A method for codec rate adjustment provided by an embodiment of the present embodiment includes:

The MGW1 determines that an initial rate of an A interface is inconsistent with an initial codec rate of an Nb interface.

The MGW1 sends a request for adjusting a rate to the Nb interface to adjust the initial codec rate of the Nb interface to the initial codec rate of the A interface.

In addition, the MGW2 does not initiate a rate adjustment operation because only the Nb interface exists on the MGW2.

As shown inFIG. 4which is a schematic flowchart of an application, an MGW is used as an example to illustrate a method for codec rate adjustment provided in an embodiment of the present invention, including:

41. After a user initiates a call, the codec determined by negotiation between the call-incoming side of an Mobile Switching Center (MSC) Server and the call-outgoing side of a Bearer Independent Call Control (BICC) protocol is AMR; an MGW initiates an Nb UP initialization operation based on a rate set of an A interface to negotiate a rate set of an Nb interface and an initial codec rate of the Nb interface. When the rate set of the A interface is compatible with the rate set of the Nb interface, TrFO is implemented on the MGW.

42. After the MGW completes the communication and receives the first Real-Time Transport Protocol (RTP) packet from the base station controller (BSC), the MGW first determines whether the initial codec rates of the A interface and Nb interface are consistent. If they are inconsistent, the MGW needs to initiate a rate control negotiation on the Nb interface to adjust the initial codec rate of the Nb interface to the initial codec rate of the A interface. After the peer MGW returns a correct response, the initial codec rates of the A interface and Nb interface become consistent.

As shown inFIG. 5, in the scenario where communication between the 2G network and the 3G network is supported, the codec selected for the core network is AMR. An RNC selects the highest rate in the AMR as an initial codec rate. TrFO is implemented on an MGW.

A method for codec rate adjustment provided by an embodiment of the present embodiment includes:

The MGW determines that an initial codec rate of an A interface is inconsistent with an initial codec rate of an Iu interface.

The MGW sends a request for adjusting a rate to the Iu interface to adjust the initial codec rate of the Iu interface to the initial codec rate of the A interface.

As shown inFIG. 6which is a schematic flowchart of an application, an MGW is used as an example to illustrate a method for codec rate adjustment provided in an embodiment of the present invention, including:

61. After a user initiates a call, the codec determined by negotiation between the call-incoming side of an MSC Server and the call-outgoing side of a BICC is AMR; the MGW initiates an Iu UP initialization operation based on a rate set of an A interface to negotiate a rate set of an Iu interface and an initial codec rate of the Iu interface. When the rate set of the A interface is compatible with the rate set of the Iu interface, TrFO is implemented on the MGW.

62. After the MGW receives the first RTP packet from a BSC, the MGW first determines whether the initial codec rates of the A interface and the initial codec rates of the Iu interface are consistent. If they are inconsistent, the MGW needs to initiate a rate control negotiation on the Iu interface to adjust the initial codec rate of the Iu interface to the initial codec rate of the A interface.

In the technical solution provided by the embodiment of the present invention, when determining that the initial codec rate of the Iu interface or the Nb interface is inconsistent with the initial codec rate of the A interface, the MGW adjusts the initial codec rate of the Iu interface or the Nb interface to the initial codec rate of the A interface, therefore implementing quick and convenient codec rate adjustment, improving voice service quality, and avoiding non-timely codec rate adjustment resulting from a slow process of initiating a request for reducing a codec rate after poor voice service quality is detected.

As shown inFIG. 7, corresponding to the methods for codec rate adjustment according to the foregoing embodiments, an embodiment of the present invention provides an apparatus for codec rate adjustment, including: a determining unit71configured to determine whether an initial codec rate of a first interface is consistent with an initial codec rate of a second interface or an initial codec rate of a third interface, where the first interface is an A interface between a BSS and an MGW, the second interface is an Nb interface between the MGW and a peer MGW, and the third interface is an Iu interface between an RNS and the MGW; an adjusting unit72configured to adjust the initial codec rate of the second interface or the initial codec rate of the third interface to the initial codec rate of the first interface when the determining unit71determines that the initial codec rate of the first interface is inconsistent with the initial codec rate of the second interface or the initial codec rate of the third interface.

The apparatus for codec rate adjustment according to the embodiment of the present invention can be set separately or be integrated into the media gateway.

In the technical solution provided by the embodiment of the present invention, when determining that the initial codec rate of the Iu interface or the Nb interface is inconsistent with the initial codec rate of the A interface, the MGW adjusts the initial codec rate of the Iu interface or the Nb interface to the initial codec rate of the A interface, therefore implementing quick and convenient codec rate adjustment, improving voice service quality, and avoiding non-timely codec rate adjustment resulting from a slow process of initiating a request for reducing a codec rate after poor voice service quality is detected.

As shown inFIG. 8, optionally, an apparatus for codec rate adjustment according to an embodiment of the present invention may further include: a receiving unit81configured to receive a packet through the first interface, where after the receiving unit81receives the packet, the determining unit71determines whether the initial codec rate of the first interface is consistent with the initial codec rate of the second interface or the initial codec rate of the third interface.

For the apparatus for codec rate adjustment according to the embodiments of the present invention, the codec rate includes a codec rate based on AMR/AMR-WB.

The apparatus for codec rate adjustment according to the embodiments of the present invention and the working principles of the apparatus can be understood by referring to the method for codec rate adjustment according to the foregoing embodiments, and the details are not described herein again.

An embodiment of the present invention provides a media gateway, including an apparatus for codec rate adjustment. The apparatus for codec rate adjustment is configured to determine whether an initial codec rate of a first interface is consistent with an initial codec rate of a second interface or an initial codec rate of a third interface, where the first interface is an A interface between a BSS and an MGW, the second interface is an Nb interface between the MGW and the peer MGW, and the third interface is an Iu interface between an RNS and the MGW. When determining that the initial codec rate of the first interface is inconsistent with the initial codec rate of the second interface or the initial codec rate of the third interface, the apparatus for codec rate adjustment adjusts the initial codec rate of the second interface or the initial codec rate of the third interface to the initial codec rate of the first interface.

In the technical solution provided by the foregoing embodiment of the present invention, when determining that the initial codec rate of the Iu interface or the Nb interface is inconsistent with the initial codec rate of the A interface, the MGW adjusts the initial codec rate of the Iu interface or the Nb interface to the initial codec rate of the A interface, therefore implementing quick and convenient codec rate adjustment, improving voice service quality, and avoiding non-timely codec rate adjustment resulting from a slow process of initiating a request for reducing a codec rate after poor voice service quality is detected.

The apparatus for codec rate adjustment in the media gateway according to the embodiment of the present invention can be understood by referring to the apparatus for codec rate adjustment according to the foregoing embodiments, and the details are not described herein again.

It should be understood that the system, the apparatus and the method provided by the embodiments of the present invention may be implemented in other manners. For example, the described apparatus embodiments are merely exemplary, where the unit division is merely logical function division and there may be other division in actual implementation. For example, a plurality of units or components may be combined or integrated into a system, or some features may be ignored or not performed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections may be implemented through some interfaces. The indirect couplings or communication connections between the apparatuses or units may be implemented in electronic, mechanical or other forms.