IP地址分配的控制方法及装置 IP address allocation control method and device
 本申请要求于 2010年 12月 01 日提交中国专利局、 申请号为 201010589609.9、 发明名称为 "IP地址分配的控制方法及装置"的中国专利申请的优先权,其全部内容通 过引用结合在本申请中。 技术领域 The present application claims priority to Chinese Patent Application No. 201010589609.9, entitled "Control Method and Apparatus for IP Address Allocation", filed on December 1, 2010, the entire contents of which is incorporated herein by reference. in. Technical field
 本发明实施例涉及通信技术, 尤其涉及 IP地址分配的控制方法及装置。 背景技术 Embodiments of the present invention relate to communication technologies, and in particular, to a method and an apparatus for controlling IP address allocation. Background technique
 核心网电路交换 (Circuit Switching, 简称 CS) 域的呼叫建立过程中, 媒体网关 控制器(Media Gateway Controller, 简称 MGC)能够控制媒体网关(Media Gateway, 简称 MGW) 为本次呼叫分配互联网协议 (Internet Protocol, 简称 IP) 地址。 主叫方 MGW和被叫方 MGW分配完 IP地址之后, 可以通过信令面的交互完成 IP地址的相 互通知。 During the call setup process of the Circuit Switching (CS) domain, the Media Gateway Controller (MGC) can control the Media Gateway (MGW) to assign an Internet protocol to the call. Protocol, referred to as IP) address. After the calling party MGW and the called party MGW allocate the IP address, the mutual notification of the IP address can be completed through the interaction of the signaling plane.
 现有技术中, IP承载网中所使用的 IP地址可以包括两种版本, 一种为互联网协 议版本 4 (Internet Protocol version 4,简称 IPv4),另一种为互联网协议版本 6 (Internet Protocol version 6, 简称 IPv6)。 由于主叫方 MGW和被叫方 MGW分配 IP地址是各 自独立的, 所以可能存在主叫方 MGW和被叫方 MGW所分配的 IP地址是两个不同 的版本, 从而导致了呼叫业务无法正常进行。 发明内容 In the prior art, the IP address used in the IP bearer network may include two versions, one is Internet Protocol version 4 (IPv4), and the other is Internet Protocol version 6 (Internet Protocol version 6). , referred to as IPv6). Since the IP addresses of the calling party MGW and the called party MGW are independent, there may be two different versions of the IP addresses assigned by the calling party MGW and the called party MGW, which may result in the call service not being able to perform normally. . Summary of the invention
 本发明实施例提供 IP地址分配的控制方法及装置, 用以解决由于主叫方 MGW 和被叫方 MGW所分配的 IP地址是两个不同的版本所导致的呼叫失败的问题, 保证 呼叫的正常进行。 The embodiment of the present invention provides a method and a device for controlling IP address allocation, which are used to solve the problem that a call fails due to two different versions of the IP address assigned by the calling party MGW and the called party MGW, and the call is guaranteed to be normal. get on.
 本发明实施例提供了一种 IP地址分配的控制方法, 包括: The embodiment of the invention provides a method for controlling IP address allocation, including:
 本端 MGC获取来自本端 MGW 的指示信息, 所述指示信息用于指示所述本端 MGW无法匹配出与获取的对端 MGW分配的对端第一 IP地址的版本类型对应的本 端第一 IP地址; The local MGC obtains the indication information from the local MGW, where the indication information is used to indicate that the local MGW cannot match the local first corresponding to the version type of the first IP address of the peer end allocated by the obtained peer MGW. IP address;
 所述本端 MGC通过对端 MGC指示所述对端 MGW为本次呼叫分配对端第二 IP 地址, 以使所述本端 MGW匹配出与所述对端第二 IP地址的版本类型对应的本端第 二 IP地址。The local MGC indicates to the peer MGC that the peer MGW allocates the second IP address of the peer to the call, so that the local MGW matches the version type of the second IP address of the peer. Local end  Two IP addresses.
 本发明实施例提供了另一种 IP地址分配的控制方法, 包括: An embodiment of the present invention provides another method for controlling IP address allocation, including:
 本端 MGC获取来自本端 MGW 的指示信息, 所述指示信息用于指示所述本端 The local MGC obtains the indication information from the local MGW, where the indication information is used to indicate the local end.
MGW无法匹配出与获取的对端 MGW分配的对端第一 IP地址的版本类型对应的本 端第一 IP地址;The MGW cannot match the first IP address of the local end corresponding to the version type of the first IP address of the peer end allocated by the peer MGW;
 所述本端 MGC指示地址分配设备为本次呼叫分配对端第二 IP地址和本端第一 IP地址, 以使所述本端 MGW匹配出与所述对端第二 IP地址的版本类型对应的本端 第二 IP地址和所述对端 MGW匹配出与所述本端第一 IP地址的版本类型对应的对端 第一 IP地址。 The local MGC instructs the address allocation device to allocate the second IP address of the opposite end and the first IP address of the local end for the current call, so that the local MGW matches the version type of the second IP address of the opposite end. The local second IP address and the peer MGW match the peer first IP address corresponding to the version type of the local first IP address.
 本发明实施例还提供了一种 IP地址分配的控制装置, 包括: The embodiment of the invention further provides a control device for IP address allocation, including:
 接收模块,用于获取来自本端 MGW的指示信息,所述指示信息用于指示所述本 端 MGW无法匹配出与获取的对端 MGW分配的对端第一 IP地址的版本类型对应的 本端第一 IP地址; The receiving module is configured to obtain the indication information from the local MGW, where the indication information is used to indicate that the local MGW cannot match the local end corresponding to the version type of the first IP address of the peer end allocated by the obtained peer MGW. First IP address;
 指示模块,用于通过对端 MGC指示所述对端 MGW为本次呼叫分配对端第二 IP 地址, 以使所述本端 MGW匹配出与所述对端第二 IP地址的版本类型对应的本端第 二 IP地址。 The indication module is configured to: by the peer MGC, instruct the peer MGW to allocate a second IP address of the peer to the call, so that the local MGW matches the version type of the second IP address of the peer The second IP address of the local end.
 本发明实施例还提供了另一种 IP地址分配的控制装置, 包括: The embodiment of the invention further provides another control device for IP address allocation, including:
 接收模块,用于获取来自本端 MGW的指示信息,所述指示信息用于指示所述本 端 MGW无法匹配出与获取的对端 MGW分配的对端第一 IP地址的版本类型对应的 本端第一 IP地址; The receiving module is configured to obtain the indication information from the local MGW, where the indication information is used to indicate that the local MGW cannot match the local end corresponding to the version type of the first IP address of the peer end allocated by the obtained peer MGW. First IP address;
 指示模块, 用于指示地址分配设备为本次呼叫分配对端第二 IP地址和本端第一 IP地址, 以使所述本端 MGW匹配出与所述对端第二 IP地址的版本类型对应的本端 第二 IP地址和所述对端 MGW匹配出与所述本端第一 IP地址的版本类型对应的对端 第一 IP地址。 The indication module is configured to indicate that the address allocation device allocates the second IP address of the opposite end and the first IP address of the local end for the current call, so that the local MGW matches the version type of the second IP address of the opposite end. The local second IP address and the peer MGW match the peer first IP address corresponding to the version type of the local first IP address.
 由上述技术方案可知, 本发明实施例通过本端 MGC根据获取的来自本端 MGW 的指示信息, 能够通过对端 MGC指示对端 MGW为本次呼叫分配对端第二 IP地址, 从而使得本端 MGW 能够匹配出与对端第二 IP 地址的版本类型对应的所述本端 MGW分配的本端第二 IP地址, 解决了现有技术中由于本端 MGW和对端 MGW所 分配的 IP地址是两个不同的版本所导致的呼叫失败的问题, 从而保证了呼叫的正常 进行; 或者通过本端 MGC根据获取的来自本端 MGW的指示信息, 能够指示地址分 配设备为本次呼叫分配对端第二 IP地址和本端第一 IP地址,从而使得本端 MGW能 够匹配出与对端第二 IP地址的版本类型对应的所述本端 MGW分配的本端第二 IP地 址和对端 MGW匹配出与本端第一 IP地址的版本类型对应的所述对端 MGW分配的 对端第一 IP地址,解决了现有技术中由于本端 MGW和对端 MGW所分配的 IP地址 是两个不同的版本所导致的呼叫失败的问题, 从而保证了呼叫的正常进行。 附图说明According to the foregoing technical solution, in the embodiment of the present invention, the local MGC can instruct the peer MGW to allocate the second IP address of the peer to the call by the peer MGC according to the obtained indication information from the local MGW, thereby making the local end The MGW can match the local second IP address allocated by the local MGW corresponding to the version type of the second IP address of the peer end, and solves the problem that the IP address allocated by the local MGW and the opposite MGW in the prior art is The problem of the call failure caused by the two different versions, so as to ensure the normal operation of the call; or the local MGC can instruct the address distribution device to allocate the opposite end to the call according to the obtained indication information from the local MGW. The IP address and the first IP address of the local end, so that the local MGW can  The local second IP address allocated by the local MGW corresponding to the version type of the second IP address of the peer end and the peer MGW match the peer end corresponding to the version type of the first IP address of the local end. The first IP address of the peer end allocated by the MGW solves the problem that the call failure caused by the IP address assigned by the local MGW and the peer MGW is two different versions in the prior art, thereby ensuring the normal call. . DRAWINGS
 为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现 有技术描述中所需要使用的附图作一简单地介绍, 显而易见地, 下面描述中的附图是 本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下, 还可以根据这些附图获得其他的附图。 In order to more clearly illustrate the embodiments of the present invention or the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description It is a certain embodiment of the present invention, and other drawings can be obtained from those skilled in the art without any creative work.
 图 1为本发明实施例一提供的一种 IP地址分配的控制方法的流程示意图; 图 2为本发明实施例二提供的一种 IP地址分配的控制方法的流程示意图; 图 3为本发明实施例三提供的另一种 IP地址分配的控制方法的流程示意图; 图 4为本发明实施例四提供的另一种 IP地址分配的控制方法的流程示意图; 图 5为本发明实施例五提供的一种 IP地址分配的控制装置的结构示意图; 图 6为本发明实施例六提供的另一种 IP地址分配的控制装置的结构示意图。 具体实施方式 为使本发明实施例的目的、技术方案和优点更加清楚, 下面将结合本发明实施例 中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描述, 显然, 所描述的实 施例是本发明一部分实施例, 而不是全部的实施例。基于本发明中的实施例, 本领域 普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明 保护的范围。 1 is a schematic flowchart of a method for controlling IP address allocation according to Embodiment 1 of the present invention; FIG. 2 is a schematic flowchart of a method for controlling IP address allocation according to Embodiment 2 of the present invention; FIG. 4 is a schematic flowchart of another method for controlling IP address allocation according to Embodiment 4 of the present invention; FIG. 4 is a schematic flowchart of another method for controlling IP address allocation according to Embodiment 4 of the present invention; A schematic diagram of a structure of a control device for IP address allocation; FIG. 6 is a schematic structural diagram of another device for controlling IP address allocation according to Embodiment 6 of the present invention. The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. The embodiments are a part of the embodiments of the invention, and not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
 图 1为本发明实施例一提供的一种 IP地址分配的控制方法的流程示意图, 如图 1所示, 本实施例的 IP地址分配的控制方法可以包括以下步骤: FIG. 1 is a schematic flowchart of a method for controlling IP address allocation according to Embodiment 1 of the present invention. As shown in FIG. 1, the method for controlling IP address allocation in this embodiment may include the following steps:
 步骤 101、 本端 MGC获取来自本端 MGW的指示信息, 该指示信息用于指示所 述本端 MGW无法匹配出与获取的对端 MGW分配的对端第一 IP地址的版本类型对 应的本端第一 IP地址; Step 101: The local MGC obtains the indication information from the local MGW, where the indication information is used to indicate that the local MGW cannot match the local end corresponding to the version type of the first IP address of the peer end allocated by the obtained peer MGW. First IP address;
 步骤 102、 所述本端 MGC通过对端 MGC指示所述对端 MGW为本次呼叫分配 对端第二 IP地址, 以使所述本端 MGW匹配出与所述对端第二 IP地址的版本类型对 应的所述本端 MGW分配的本端第二 IP地址。  具体地, 所述第一 IP地址可以为 IPv6地址, 相应地, 所述第二 IP地址可以为 IPv4地址; 或者所述第一 IP地址还可以为 IPv4地址, 相应地, 所述第二 IP地址还 可以为 IPv6地址。Step 102: The local MGC instructs the peer MGW to allocate the second IP address of the peer to the call, so that the local MGW matches the version of the second IP address of the opposite end. The local second IP address allocated by the local MGW corresponding to the type.  Specifically, the first IP address may be an IPv6 address, and the second IP address may be an IPv4 address, or the first IP address may be an IPv4 address, and correspondingly, the second IP address. It can also be an IPv6 address.
 其中, 所述本端 MGC和对端 MGC可以是两个独立的 MGC, 还可以是同一个 MGC, 本发明实施例对此不进行限制。 The local MGC and the peer MGC may be two independent MGCs, and may be the same MGC, which is not limited by the embodiment of the present invention.
 本实施例中, 本端 MGC根据获取的来自本端 MGW的指示信息, 该指示信息用 于指示本端 MGW无法匹配出与获取的对端 MGW分配的对端第一 IP地址的版本类 型对应的本端第一 IP地址, 能够通过对端 MGC指示对端 MGW为本次呼叫分配对 端第二 IP地址,从而使得本端 MGW能够匹配出与对端第二 IP地址的版本类型对应 的所述本端 MGW分配的本端第二 IP地址, 解决了现有技术中由于本端 MGW和对 端 MGW所分配的 IP地址是两个不同的版本所导致的呼叫失败的问题, 从而保证了 呼叫的正常进行。 In this embodiment, the local MGC, according to the obtained indication information from the local MGW, is used to indicate that the local MGW cannot match the version type of the first IP address of the peer end allocated by the obtained peer MGW. The first IP address of the local end, the peer MGC can be instructed by the peer MGC to allocate the second IP address of the peer to the call, so that the local MGW can match the version corresponding to the version type of the second IP address of the peer end. The local second IP address allocated by the local MGW solves the problem that the call failure occurs in the prior art because the IP addresses allocated by the local MGW and the opposite MGW are two different versions, thereby ensuring the call. Work properly.
 可以理解的是: 本实施例中的本端可以为主叫方, 或者还可以为被叫方。若本端 为主叫方, 对端则为被叫方; 相应地, 若本端为被叫方, 对端则为主叫方, 本实施例 对此不进行限制。 It can be understood that the local end in this embodiment may be the calling party, or may also be the called party. If the local end is the calling party, the opposite end is the called party. Correspondingly, if the local end is the called party and the opposite end is the calling party, this embodiment does not limit this.
 图 2为本发明实施例二提供的一种 IP地址分配的控制方法的流程示意图, 本实 施例为上一实施例的具体实施例。 如图 2所示, 本实施例的 IP地址分配的控制方法 可以包括以下步骤: FIG. 2 is a schematic flowchart of a method for controlling IP address allocation according to Embodiment 2 of the present invention. This embodiment is a specific embodiment of the previous embodiment. As shown in FIG. 2, the method for controlling IP address allocation in this embodiment may include the following steps:
 步骤 201、主叫方 MGC向主叫方 MGW发送分配 IP地址的指示, 用以指示主叫 方 MGW为当前呼叫分配主叫方任一版本的 IP地址; Step 201: The calling party MGC sends an indication of assigning an IP address to the calling party MGW, to indicate that the calling party MGW allocates an IP address of any version of the calling party to the current call.
 步骤 202、主叫方 MGW为当前呼叫分配主叫方 IPv6地址, 并向主叫方 MGC返 回该主叫方 IPv6地址; Step 202: The calling party MGW allocates the calling party IPv6 address to the current call, and returns the calling party IPv6 address to the calling party MGC.
 步骤 203、 主叫方 MGC通过信令向被叫方 MGC发送所述主叫方 IPv6地址; 步骤 204、 被叫方 MGC向被叫方 MGW发送所述主叫方 IPv6地址; 步骤 205、 若被叫方 MGW无法匹配出与获取的所述主叫方 IPv6地址的版本类 型对应的被叫方地址, 向被叫方 MGC返回指示信息, 用以指示被叫方 MGW无法匹 配出与所述主叫方 IPv6地址的版本类型对应的被叫方地址; Step 203: The calling party MGC sends the calling party IPv6 address to the called party MGC by using signaling. Step 204: The called party MGC sends the calling party IPv6 address to the called party MGW. Step 205: The called party MGW cannot match the obtained called party address corresponding to the obtained version type of the calling party IPv6 address, and returns an indication information to the called party MGC to indicate that the called party MGW cannot match the calling party. The called party address corresponding to the version type of the party IPv6 address;
 步骤 206、 被叫方 MGC通过信令向主叫方 MGC返回指示信息, 用以指示被叫 方 MGW无法匹配出与所述主叫方 IPv6地址的版本类型对应的被叫方地址; Step 206: The called party MGC returns indication information to the calling party MGC by using signaling, to indicate that the called party MGW cannot match the called party address corresponding to the version type of the calling party's IPv6 address;
 步骤 207、主叫方 MGC向主叫方 MGW发送分配 IP地址的指示, 用以指示主叫 方 MGW为当前呼叫分配主叫方 IPv4地址;  可替换地, 本步骤中, 主叫方 MGC向主叫方 MGW发送分配 IP地址的指示, 用以指示主叫方 MGW为当前呼叫分配另一个版本的主叫方地址;Step 207: The calling party MGC sends an indication of assigning an IP address to the calling party MGW, to indicate that the calling party MGW assigns the calling party IPv4 address to the current call.  Alternatively, in this step, the calling party MGC sends an indication of assigning an IP address to the calling party MGW, to indicate that the calling party MGW assigns another version of the calling party address to the current call;
 步骤 208、主叫方 MGW为当前呼叫分配主叫方 IPv4地址, 并向主叫方 MGC返 回该主叫方 IPv4地址; Step 208: The calling party MGW allocates a calling party IPv4 address for the current call, and returns the calling party IPv4 address to the calling party MGC.
 步骤 209、 主叫方 MGC通过信令向被叫方 MGC发送所述主叫方 IPv4地址; 步骤 210、 被叫方 MGC向被叫方 MGW发送所述主叫方 IPv4地址; Step 209: The calling party MGC sends the calling party IPv4 address to the called party MGC by signaling. Step 210: The called party MGC sends the calling party IPv4 address to the called party MGW.
 步骤 211、 被叫方 MGW匹配出与所述主叫方 IPv4地址的版本类型对应的被叫 方 IPV4地址, 并向被叫方 MGC返回该被叫方 IPv4地址; Step 211: The called party MGW matches the called party IPV4 address corresponding to the version type of the calling party's IPv4 address, and returns the called party's IPv4 address to the called party MGC.
 步骤 212、 被叫方 MGC向主叫方 MGC发送所述被叫方 IPv4地址; Step 212: The called party MGC sends the called party IPv4 address to the calling party MGC.
 步骤 213、 主叫方 MGC向主叫方 MGW返回所述被叫方 IPv4地址。 Step 213: The calling party MGC returns the called party IPv4 address to the calling party MGW.
 至此, 主叫方 MGW获知了当前呼叫的被叫方 IPv4地址, 被叫方 MGW获知了 当前呼叫的主叫方 IPv4地址, 从而使得呼叫得以建立。 At this point, the calling party MGW knows the called party's IPv4 address of the current call, and the called party MGW knows the calling party's IPv4 address of the current call, thereby enabling the call to be established.
 需要说明的是:本实施例中主叫方 MGC与被叫方 MGC可以是两个独立的设备, 也可以是同一个设备, 本实施例对此不进行限制。 It should be noted that, in this embodiment, the calling party MGC and the called party MGC may be two independent devices, or may be the same device, which is not limited in this embodiment.
 本实施例中, 被叫方 MGC根据获取的来自被叫方 MGW的指示信息, 该指示信 息用以指示被叫方 MGW无法匹配出与主叫方 MGW分配的主叫方地址的版本类型对 应的被叫方地址, 能够通过主叫方 MGC指示主叫方 MGW重新分配另一个版本的主 叫方地址,从而使得被叫方 MGW能够匹配出与主叫方 MGW重新分配的另一个版本 的主叫方地址的版本类型对应的被叫方地址,解决了现有技术中由于主叫方 MGW和 被叫方 MGW所分配的 IP地址是两个不同的版本所导致的呼叫失败的问题, 从而保 证了呼叫的正常进行。 In this embodiment, the called party MGC is configured to indicate that the called party MGW cannot match the version type of the calling party address allocated by the calling party MGW according to the obtained indication information from the called party MGW. The called party address, capable of instructing the calling party MGW to reallocate another version of the calling party address by the calling party MGC, so that the called party MGW can match the calling version of another version reassigned with the calling party MGW The called party address corresponding to the version type of the party address solves the problem that the call failure caused by the IP address assigned by the calling party MGW and the called party MGW is two different versions in the prior art, thereby ensuring the problem of the call failure. The call is proceeding normally.
 图 3为本发明实施例三提供的另一种 IP地址分配的控制方法的流程示意图。 如 图 3所示, 本实施例的 IP地址分配的控制方法可以包括以下步骤: FIG. 3 is a schematic flowchart diagram of another method for controlling IP address allocation according to Embodiment 3 of the present invention. As shown in FIG. 3, the method for controlling IP address allocation in this embodiment may include the following steps:
 步骤 301、 本端 MGC获取来自本端 MGW的指示信息, 该指示信息用于指示所 述本端 MGW无法匹配出与获取的对端 MGW分配的对端第一 IP地址的版本类型对 应的本端第一 IP地址; Step 301: The local MGC obtains the indication information from the local MGW, where the indication information is used to indicate that the local MGW cannot match the local end corresponding to the version type of the first IP address of the peer end allocated by the obtained peer MGW. First IP address;
 步骤 302、 所述本端 MGC指示地址分配设备为本次呼叫分配对端第二 IP地址, 以使所述本端 MGW 匹配出与所述对端第二 IP 地址的版本类型对应的所述本端 MGW分配的本端第二 IP地址, 以及指示地址分配设备为本次呼叫分配本端第一 IP 地址, 以使所述对端 MGW匹配出与所述本端第一 IP地址的版本类型对应的所述对 端 MGW分配的对端第一 IP地址。  具体地, 所述第一 IP地址可以为 IPv6地址, 相应地, 所述第二 IP地址可以为 IPv4地址; 或者所述第一 IP地址还可以为 IPv4地址, 相应地, 所述第二 IP地址还 可以为 IPv6地址。Step 302: The local MGC instructs the address allocation device to allocate a second IP address of the peer to the current call, so that the local MGW matches the version corresponding to the version type of the second IP address of the opposite end. The local second IP address allocated by the MGW, and the instructing the address allocation device to allocate the local first IP address to the call, so that the peer MGW matches the version type of the first IP address of the local end. The opposite end first IP address assigned by the peer MGW.  Specifically, the first IP address may be an IPv6 address, and the second IP address may be an IPv4 address, or the first IP address may be an IPv4 address, and correspondingly, the second IP address. It can also be an IPv6 address.
 其中, 所述本端 MGC和对端 MGC可以是两个独立的 MGC, 还可以是同一个 MGC, 本发明实施例对此不进行限制。 The local MGC and the peer MGC may be two independent MGCs, and may be the same MGC, which is not limited by the embodiment of the present invention.
 本实施例中, 本端 MGC根据获取的来自本端 MGW的指示信息, 该指示信息用 于指示本端 MGW无法匹配出与获取的对端 MGW分配的对端第一 IP地址的版本类 型对应的本端第一 IP地址, 能够指示地址分配设备为本次呼叫分配对端第二 IP地址 和本端第一 IP地址,从而使得本端 MGW能够匹配出与对端第二 IP地址的版本类型 对应的所述本端 MGW分配的本端第二 IP地址和对端 MGW匹配出与本端第一 IP地 址的版本类型对应的所述对端 MGW分配的对端第一 IP地址, 解决了现有技术中由 于本端 MGW和对端 MGW所分配的 IP地址是两个不同的版本所导致的呼叫失败的 问题, 从而保证了呼叫的正常进行。 In this embodiment, the local MGC, according to the obtained indication information from the local MGW, is used to indicate that the local MGW cannot match the version type of the first IP address of the peer end allocated by the obtained peer MGW. The first IP address of the local end can be used to indicate that the address allocation device allocates the second IP address of the peer end and the first IP address of the local end for the current call, so that the local MGW can match the version type of the second IP address of the opposite end. The second IP address of the local end allocated by the local MGW and the peer MGW match the first IP address of the peer end allocated by the peer MGW corresponding to the version type of the first IP address of the local end, and the existing IP address is solved. In the technology, the IP address assigned by the local MGW and the peer MGW is a problem of call failure caused by two different versions, thereby ensuring normal call progress.
 可以理解的是: 本实施例中的本端可以为主叫方, 或者还可以为被叫方。若本端 为主叫方, 对端则为被叫方; 相应地, 若本端为被叫方, 对端则为主叫方, 本实施例 对此不进行限制。 It can be understood that the local end in this embodiment may be the calling party, or may also be the called party. If the local end is the calling party, the peer end is the called party. Correspondingly, if the local end is the called party and the opposite end is the calling party, this embodiment does not limit this.
 图 4为本发明实施例四提供的另一种 IP地址分配的控制方法的流程示意图, 本 实施例为上一实施例的具体实施例。 如图 4所示, 本实施例的 IP地址分配的控制方 法可以包括以下步骤: FIG. 4 is a schematic flowchart of another method for controlling IP address allocation according to Embodiment 4 of the present invention. This embodiment is a specific embodiment of the previous embodiment. As shown in FIG. 4, the control method of the IP address allocation in this embodiment may include the following steps:
 步骤 401、主叫方 MGC向主叫方 MGW发送分配 IP地址的指示, 用以指示主叫 方 MGW为当前呼叫分配主叫方任一版本的 IP地址; Step 401: The calling party MGC sends an indication of assigning an IP address to the calling party MGW, to indicate that the calling party MGW allocates an IP address of any version of the calling party to the current call.
 步骤 402、主叫方 MGW为当前呼叫分配主叫方 IPv6地址, 并向主叫方 MGC返 回该主叫方 IPv6地址; Step 402: The calling party MGW allocates the calling party IPv6 address to the current call, and returns the calling party IPv6 address to the calling party MGC.
 步骤 403、 主叫方 MGC通过信令向被叫方 MGC发送所述主叫方 IPv6地址; 步骤 404、 被叫方 MGC向被叫方 MGW发送所述主叫方 IPv6地址; 步骤 405、 若被叫方 MGW无法匹配出与获取的所述主叫方 IPv6地址的版本类 型对应的被叫方地址, 向被叫方 MGC返回指示信息, 用以指示被叫方 MGW无法匹 配出与所述主叫方 IPv6地址的版本类型对应的被叫方地址; Step 403: The calling party MGC sends the calling party IPv6 address to the called party MGC by signaling. Step 404: The called party MGC sends the calling party IPv6 address to the called party MGW. Step 405: The called party MGW cannot match the obtained called party address corresponding to the obtained version type of the calling party IPv6 address, and returns an indication information to the called party MGC to indicate that the called party MGW cannot match the calling party. The called party address corresponding to the version type of the party IPv6 address;
 步骤 406、被叫方 MGC向地址分配设备发送分配 IP地址的命令, 用以指示地址 分配设备为当前呼叫分配被叫方 IPv6地址; Step 406: The called party MGC sends a command for assigning an IP address to the address allocation device, to indicate that the address allocation device allocates the called party IPv6 address for the current call.
 步骤 407、地址分配设备为当前呼叫分配被叫方 IPv6地址, 并向被叫方 MGC返 回该被叫方 IPv6地址;Step 407: The address allocation device allocates the called party IPv6 address to the current call, and returns to the called party MGC.  Return the called party IPv6 address;
 步骤 408、 被叫方 MGC向主叫方 MGC发送所述被叫方 IPv6地址; Step 408: The called party MGC sends the called party IPv6 address to the calling party MGC.
 步骤 409、 主叫方 MGC向主叫方 MGW返回所述被叫方 IPv6地址; 步骤 410、被叫方 MGC向地址分配设备发送分配 IP地址的命令, 用以指示地址 分配设备为当前呼叫分配主叫方 IPv4地址; Step 409: The calling party MGC returns the called party IPv6 address to the calling party MGW. Step 410: The called party MGC sends a command for assigning an IP address to the address assigning device, to indicate that the address assigning device allocates the current call to the current call. Called party IPv4 address;
 步骤 411、地址分配设备为当前呼叫分配主叫方 IPv4地址, 并向被叫方 MGC返 回该主叫方 IPv4地址; Step 411: The address allocation device allocates a calling party IPv4 address for the current call, and returns the calling party IPv4 address to the called party MGC.
 步骤 412、 被叫方 MGC向被叫方 MGW返回所述主叫方 IPv4地址; 步骤 407、 408、 409与步骤 410、 411、 412的执行没有先后顺序。 Step 412: The called party MGC returns the calling party IPv4 address to the called party MGW; the steps 407, 408, 409 and the steps 410, 411, and 412 are performed in no order.
 至此, 主叫方 MGW获知了当前呼叫的被叫方 IPv6地址, 被叫方 MGW获知了 当前呼叫的主叫方 IPv4地址, 同时通过地址分配设备进行附带协议转换的网络地址 转换 (Network Address Translation-Protocol Translation, 简称 NAT-PT), 从而使得呼 叫得以建立。 At this point, the calling party MGW knows the called party's IPv6 address of the current call, the called party MGW knows the calling party's IPv4 address of the current call, and performs network address translation with the protocol conversion by the address allocation device (Network Address Translation- Protocol Translation, abbreviated as NAT-PT), so that the call can be established.
 本实施例中, 被叫方 MGC根据获取的来自被叫方 MGW的指示信息, 该指示信 息用以指示被叫方 MGW无法匹配出与主叫方 MGW分配的主叫方地址的版本类型对 应的被叫方地址, 能够指示地址分配设备分配另一个版本的主叫方地址和被叫方地 址,从而使得被叫方 MGW能够匹配出与地址分配设备分配的另一个版本的主叫方地 址的版本类型对应的被叫方地址,以及使得主叫方 MGW能够匹配出与地址分配设备 分配的另一个版本的被叫方地址的版本类型对应的主叫方地址,解决了现有技术中由 于主叫方 MGW和被叫方 MGW所分配的 IP地址是两个不同的版本所导致的呼叫失 败的问题, 从而保证了呼叫的正常进行。 In this embodiment, the called party MGC is configured to indicate that the called party MGW cannot match the version type of the calling party address allocated by the calling party MGW according to the obtained indication information from the called party MGW. The called party address, which can instruct the address assigning device to allocate another version of the calling party address and the called party address, so that the called party MGW can match the version of the calling party address of another version allocated with the address assigning device. The called party address corresponding to the type, and the calling party address that enables the calling party MGW to match the version type of the called party address of another version allocated by the address assigning device, solving the prior art due to the calling party The IP address assigned by the party MGW and the called party MGW is a problem of call failure caused by two different versions, thereby ensuring the normal progress of the call.
 需要说明的是: 对于前述的各方法实施例, 为了简单描述, 故将其都表述为一系 列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限 制, 因为依据本发明, 某些步骤可以采用其他顺序或者同时进行。 其次, 本领域技术 人员也应该知悉, 说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块 并不一定是本发明所必须的。 It should be noted that, for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should understand that the present invention is not limited by the described action sequence. Because certain steps may be performed in other sequences or concurrently in accordance with the present invention. In the following, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
 在所述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部 分, 可以参见其他实施例的相关描述。 In the above-mentioned embodiments, the descriptions of the various embodiments are all focused, and the parts that are not detailed in a certain embodiment can be referred to the related descriptions of other embodiments.
 图 5为本发明实施例五提供的一种 IP地址分配的控制装置的结构示意图, 如图 5所示, 本实施例的 IP地址分配的控制装置可以包括接收模块 51和指示模块 52。其 中,接收模块 51获取来自本端 MGW的指示信息,所述指示信息用于指示本端 MGW 无法匹配出与获取的对端 MGW分配的对端第一 IP地址的版本类型对应的本端第一 IP地址,指示模块 52通过对端 MGC指示对端 MGW为本次呼叫分配对端第二 IP地 址, 以使本端 MGW匹配出与对端第二 IP地址的版本类型对应的所述本端 MGW分 配的本端第二 IP地址。FIG. 5 is a schematic structural diagram of a device for controlling IP address allocation according to Embodiment 5 of the present invention. As shown in FIG. 5, the control device for IP address allocation in this embodiment may include a receiving module 51 and an indication module 52. The receiving module 51 obtains the indication information from the local MGW, where the indication information is used to indicate the local MGW.  The first IP address of the local end corresponding to the version type of the first IP address of the peer end allocated by the peer MGW is not matched, and the instructing module 52 instructs the peer MGW to allocate the second IP address of the peer to the call. The address is such that the local MGW matches the local second IP address allocated by the local MGW corresponding to the version type of the second IP address of the peer.
 所述实施例一中本端 MGC、 实施例二中被叫方 MGC的功能均可以由本发明实 施例提供的 IP地址分配的控制装置实现。 The functions of the local MGC in the first embodiment and the called party MGC in the second embodiment can be implemented by the control device for IP address allocation provided by the embodiment of the present invention.
 本实施例中,指示模块根据接收模块获取的来自本端 MGW的指示信息,该指示 信息用于指示本端 MGW无法匹配出与获取的对端 MGW分配的对端第一 IP地址的 版本类型对应的本端第一 IP地址, 能够通过对端 MGC指示对端 MGW为本次呼叫 分配对端第二 IP地址,从而使得本端 MGW能够匹配出与对端第二 IP地址的版本类 型对应的所述本端 MGW分配的本端第二 IP地址,解决了现有技术中由于本端 MGW 和对端 MGW所分配的 IP地址是两个不同的版本所导致的呼叫失败的问题, 从而保 证了呼叫的正常进行。 In this embodiment, the indication module is configured to use the indication information from the local MGW that is obtained by the receiving module, and the indication information is used to indicate that the local MGW cannot match the version type of the first IP address of the peer end allocated by the obtained peer MGW. The local first IP address can be used by the peer MGC to instruct the peer MGW to allocate the second IP address of the peer to the call, so that the local MGW can match the version corresponding to the version type of the second IP address of the peer. The local second IP address allocated by the local MGW solves the problem that the call failure occurs in the prior art because the IP addresses allocated by the local MGW and the opposite MGW are two different versions, thereby ensuring the call. The normal progress.
 图 6为本发明实施例六提供的另一种 IP地址分配的控制装置的结构示意图, 如 图 6所示, 本实施例的 IP地址分配的控制装置可以包括接收模块 61和指示模块 62。 其中, 接收模块 61 获取来自本端 MGW 的指示信息, 所述指示信息用于指示本端 MGW无法匹配出与获取的对端 MGW分配的对端第一 IP地址的版本类型对应的本 端第一 IP地址, 指示模块 62指示地址分配设备为本次呼叫分配对端第二 IP地址和 本端第一 IP地址, 以使本端 MGW匹配出与对端第二 IP地址的版本类型对应的所述 本端 MGW分配的本端第二 IP地址和对端 MGW匹配出与本端第一 IP地址的版本类 型对应的所述对端 MGW分配的对端第一 IP地址。 FIG. 6 is a schematic structural diagram of another apparatus for controlling IP address allocation according to Embodiment 6 of the present invention. As shown in FIG. 6, the apparatus for controlling IP address allocation in this embodiment may include a receiving module 61 and an indicating module 62. The receiving module 61 obtains the indication information from the local MGW, where the indication information is used to indicate that the local MGW cannot match the local first corresponding to the version type of the first IP address of the peer end allocated by the obtained peer MGW. The IP address, the indication module 62 instructs the address distribution device to allocate the second IP address of the opposite end and the first IP address of the local end for the local call, so that the local MGW matches the version corresponding to the version type of the second IP address of the opposite end. The local second IP address and the peer MGW allocated by the local MGW match the peer first IP address allocated by the peer MGW corresponding to the version type of the first IP address of the local end.
 所述实施例三中本端 MGC、 四中被叫方 MGC的功能均可以由本发明实施例提 供的 IP地址分配的控制装置实现。 The functions of the local MGC and the called party MGC in the third embodiment can be implemented by the control device for IP address allocation provided by the embodiment of the present invention.
 本实施例中,指示模块根据接收模块获取的来自本端 MGW的指示信息,该指示 信息用于指示本端 MGW无法匹配出与获取的对端 MGW分配的对端第一 IP地址的 版本类型对应的本端第一 IP地址, 能够指示地址分配设备为本次呼叫分配对端第二 In this embodiment, the indication module is configured to use the indication information from the local MGW that is obtained by the receiving module, and the indication information is used to indicate that the local MGW cannot match the version type of the first IP address of the peer end allocated by the obtained peer MGW. The first IP address of the local end, which can indicate that the address allocation device allocates the opposite end to the call.
IP地址和本端第一 IP地址,从而使得本端 MGW能够匹配出与对端第二 IP地址的版 本类型对应的所述本端 MGW分配的本端第二 IP地址和对端 MGW匹配出与本端第 一 IP地址的版本类型对应的所述对端 MGW分配的对端第一 IP地址,解决了现有技 术中由于本端 MGW和对端 MGW所分配的 IP地址是两个不同的版本所导致的呼叫 失败的问题, 从而保证了呼叫的正常进行。  本领域普通技术人员可以理解:实现所述方法实施例的全部或部分步骤可以通过 程序指令相关的硬件来完成, 前述的程序可以存储于一计算机可读取存储介质中, 该 程序在执行时, 执行包括所述方法实施例的步骤; 而前述的存储介质包括: ROM、 RAM, 磁碟或者光盘等各种可以存储程序代码的介质。The IP address and the first IP address of the local end, so that the local MGW can match the local second IP address allocated by the local MGW corresponding to the version type of the second IP address of the peer end, and the peer MGW matches The IP address assigned by the peer MGW and the peer MGW in the prior art is two different versions in the prior art. The resulting call failure problem ensures that the call is proceeding normally.  A person skilled in the art can understand that all or part of the steps of implementing the method embodiment may be completed by using hardware related to program instructions, and the foregoing program may be stored in a computer readable storage medium, when executed, The foregoing steps include the steps of the method embodiment; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.
 最后应说明的是: 以上实施例仅用以说明本发明的技术方案, 而非对其限制; 尽 管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解: 其 依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行 等同替换; 而这些修改或者替换, 并不使相应技术方案的本质脱离本发明各实施例技 术方案的精神和范围。 Finally, it should be noted that the above embodiments are only for explaining the technical solutions of the present invention, and are not intended to be limiting; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that The technical solutions described in the foregoing embodiments are modified, or the equivalents of the technical features are replaced by the same. However, the modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.