WO2015109575A1 - 一种ip语音本地交换的方法、装置及系统 - Google Patents

一种ip语音本地交换的方法、装置及系统 Download PDF

Info

Publication number
WO2015109575A1
WO2015109575A1 PCT/CN2014/071503 CN2014071503W WO2015109575A1 WO 2015109575 A1 WO2015109575 A1 WO 2015109575A1 CN 2014071503 W CN2014071503 W CN 2014071503W WO 2015109575 A1 WO2015109575 A1 WO 2015109575A1
Authority
WO
WIPO (PCT)
Prior art keywords
user equipment
voice packet
network device
relationship
voice
Prior art date
Application number
PCT/CN2014/071503
Other languages
English (en)
French (fr)
Inventor
刘海
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2014/071503 priority Critical patent/WO2015109575A1/zh
Priority to CN201480000452.8A priority patent/CN104995985B/zh
Publication of WO2015109575A1 publication Critical patent/WO2015109575A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/02Communication route or path selection, e.g. power-based or shortest path routing
    • H04W40/20Communication route or path selection, e.g. power-based or shortest path routing based on geographic position or location
    • 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/10Architectures or entities
    • H04L65/1016IP multimedia subsystem [IMS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/12Setup of transport tunnels

Definitions

  • the present application relates to the field of communications technologies, and in particular, to a method, device, and system for IP voice local exchange. Background technique
  • LTE Long Term Evolution
  • 3G Long Term Evolution
  • LTE Long Term Evolution
  • the process of the terminal accessing the system from the LTE is: the user equipment UE accesses the evolved base station eNB (the eNB may also be replaced by the radio network controller RNC or the wireless local area network WLAN AP), then accesses the serving gateway SGW, and then accesses the packet switching gateway PGW. , enter the Internet through PGW.
  • VOIP voice over IP
  • IP voice is a method of transmitting voice over an IP network.
  • Two user terminals negotiate VOIP user plane information (including IP address port, voice codec, etc.) through signaling (generally SIP signaling). After the negotiation, you can make a VOIP call.
  • SIP signaling generally SIP signaling.
  • FIG. 1 if two mobile users exchange data paths between the first user UE1 and the second user UE2, the UE1-eNB-SGW-PGW-PGW-SGW-eNB-UE2, where two PGWs There may be several routers or other switching devices in between.
  • the embodiment of the present application provides a method, a device, and a system for IP voice local exchange, which are used to solve the technical problem of wasting network resources in the existing IP voice exchange mode when two users are in the same network device.
  • the first aspect provides a method for local switching of IP voice, including: receiving, by a first network device, a first IP voice packet forwarded by a second network device, where the destination user equipment of the first IP voice packet is a first user Determining, according to the feature information of the first IP voice packet, that the feature information of the second IP voice packet sent by the second user equipment matches the feature information of the first IP voice packet, where the first user equipment And the second user equipment belongs to the first network device; establishing a local exchange relationship between the second user equipment and the first user equipment, where the local exchange relationship indicates that the second user equipment sends The IP voice packet is forwarded locally by the first network device to the first user equipment, or the IP voice packet sent by the first user equipment is locally forwarded by the first network device to the second user equipment.
  • the method before the first network device receives the first IP voice packet forwarded by the second network device, the method further includes: receiving, by the first network device And sending, by the second user equipment, the second IP voice packet, storing the feature information of the second IP voice packet, and sending the second IP voice packet to the second network device.
  • the method before the establishing a local exchange relationship between the second user equipment and the first user equipment, the method further includes: when the second IP And increasing a value of the counter when the feature information of the voice packet matches the feature information of the first IP voice packet; determining that the value of the counter reaches a set threshold, wherein when the value of the counter reaches the setting When the value is wide, the local exchange relationship is established for the second user equipment and the first user equipment.
  • the method further includes: the first network device After receiving the third IP voice packet sent by the second user equipment, and querying the local exchange relationship corresponding to the second user equipment, forwarding the third IP voice packet to the local The first user equipment indicated by the local exchange relationship; or the first network device receives the fourth IP voice packet sent by the first user equipment, and queries the local device corresponding to the first user equipment After the relationship is exchanged, the fourth IP voice packet is locally forwarded to the second user equipment indicated by the local switching relationship.
  • the third IP voice packet is The local forwarding to the first user equipment indicated by the local switching relationship includes: after querying the local switching relationship corresponding to the second user equipment, based on an address translation relationship between the second user equipment Address translation is performed on the address translation relationship of the first user equipment, where the address translation relationship of the second user equipment includes a first IP address and a first port, and a second IP address and a second port, the first user equipment
  • the address translation relationship includes a third IP address and a third port, and a fourth IP address and a fourth port correspondence; the third IP voice packet is locally forwarded to the first user equipment.
  • the fourth IP voice packet is The local forwarding to the second user equipment indicated by the local switching relationship includes: after querying the local switching relationship corresponding to the first user equipment, based on an address translation relationship of the first user equipment The address translation relationship of the second user equipment performs address translation, and the address translation relationship of the first user equipment includes a second IP address and a second port, and a correspondence between the first IP address and the first port, where the second user The address translation relationship of the device includes a fourth IP address and a fourth port, and a third IP address and a third port correspondence; and forwarding the fourth IP voice packet to the second user equipment.
  • the feature information includes: a real-time transmission protocol of an IP voice packet An RTP sequence number, and a hash value calculated according to a payload of the IP voice packet; or a real-time transport protocol RTP sequence number of the IP voice packet, and a label of the IP voice packet, the label being received by the first network device Added to the IP voice packet sent by the user equipment, where the label is At least one coding field in the RTP encapsulation header is combined to identify the first network device and the user equipment.
  • the determining, by the second user equipment, feature information of a second IP voice packet and a feature of the first IP voice packet Matching the information including: determining that an RTP sequence number of the second IP voice packet is the same as an RTP sequence number of the first IP voice packet, and determining a hash value of the second IP voice packet and the first The hash value of the IP voice packet is the same; or determining that the RTP sequence number of the second IP voice packet is the same as the RTP sequence number of the first IP voice packet, and determining the label of the second IP voice packet and the The labels of the first IP voice packet are the same.
  • the second aspect provides an apparatus for local switching of IP voice, which is applied to a first network device, where the apparatus includes: a first receiving unit, a determining unit, and an establishing unit, where: the first receiving unit is configured to receive a first IP voice packet forwarded by the second network device, where the destination user equipment of the first IP voice packet is a first user equipment, and the determining unit is configured to determine, according to the feature information of the first IP voice packet The feature information of the second IP voice packet sent by the second user equipment is matched with the feature information of the first IP voice packet, where the first user equipment and the second user equipment belong to the first network.
  • the establishing unit is configured to establish a local switching relationship between the second user equipment and the first user equipment, where the local switching relationship indicates that the IP voice packet sent by the second user equipment is The first network device is locally forwarded to the first user equipment, or the IP voice packet sent by the first user equipment is locally Forwarding to the second user equipment.
  • the device further includes: a second receiving unit, configured to receive the second IP voice packet sent by the second user equipment; And saving the feature information of the second IP voice packet, and sending the second IP voice packet to the second network device.
  • the establishing unit is further configured to: when the feature information of the second IP voice packet matches the feature information of the first IP voice packet, Increasing a value of the counter; determining that the value of the counter reaches a set threshold, wherein, when the counter When the value reaches the set threshold, the local exchange relationship is established for the second user equipment and the first user equipment.
  • the device further includes: a third receiving unit, configured to receive a third IP voice packet sent by the second user equipment; After the local exchange relationship corresponding to the second user equipment is queried, the third IP voice packet is locally forwarded to the first user equipment indicated by the local exchange relationship; and the fourth receiving unit is configured to: Receiving a fourth IP voice packet sent by the first user equipment, where the second forwarding unit is configured to forward the fourth IP voice packet locally after querying the local exchange relationship corresponding to the first user equipment The second user equipment indicated to the local exchange relationship.
  • the first forwarding unit is configured to: after querying the local exchange relationship corresponding to the second user equipment, Performing address translation based on an address translation relationship of the second user equipment and an address translation relationship of the first user equipment, where the address translation relationship of the second user equipment includes a first IP address, a first port, and a second IP address.
  • the address translation relationship of the first user equipment includes a third IP address and a third port, and a fourth IP address and a fourth port correspondence, and the third IP voice packet is locally forwarded to the The first user equipment is described.
  • the second forwarding unit is configured to: after querying the local exchange relationship corresponding to the first user equipment, Performing address translation based on an address translation relationship of the first user equipment and an address translation relationship of the second user equipment, where the address translation relationship of the first user equipment includes a second IP address, a second port, and a first IP address.
  • the address translation relationship of the second user equipment includes a fourth IP address and a fourth port, and a third IP address and a third port correspondence, and the fourth IP voice packet is forwarded locally to the The second user equipment is described.
  • the feature information includes: a real-time transmission protocol of an IP voice packet An RTP sequence number, and a hash value calculated from a payload of the IP voice packet; or a real-time transport protocol RTP sequence number of the IP voice packet, and a label of the IP voice packet, the label being After the device receives the IP voice packet sent by the user equipment, the label of the IP voice packet is combined by at least one coding field in the RTP encapsulation header, and is used to identify the first network device and the user. device.
  • the determining unit is configured to: determine an RTP sequence number of the second IP voice packet and the first IP voice The RTP sequence number of the packet is the same, and determining that the hash value of the second IP voice packet is the same as the hash value of the first IP voice packet; or determining the RTP sequence number of the second IP voice packet and the The RTP sequence number of the first IP voice packet is the same, and the label of the second IP voice packet is determined to be the same as the label of the first IP voice packet.
  • a third aspect provides a system for IP voice local switching, including: a first network device, and a second network device connected to the first network device; wherein the first network device includes the second aspect The device for local exchange of IP voice.
  • the fourth aspect provides a device for local switching of IP voice, which is applied to a first network device, where the device includes: a receiver, configured to receive a first IP voice packet forwarded by a second network device, where The destination user equipment of the IP voice packet is the first user equipment, and the processor is configured to determine, according to the feature information of the first IP voice packet, feature information of the second IP voice packet sent by the second user equipment, and the first The feature information of the IP voice packet is matched, wherein the first user equipment and the second user equipment belong to the first network device; and local to the second user equipment and the first user equipment An exchange relationship, where the local exchange relationship indicates that the IP voice packet sent by the second user equipment is locally forwarded by the first network device to the first user equipment, or the IP voice sent by the first user equipment The packet is locally forwarded by the first network device to the second user device; a memory for storing a local exchange relationship, and storing the first IP Sound and the second IP packet to the packet voice characteristic information.
  • the receiver is further configured to: receive the second IP voice packet sent by the second user equipment, and the device further includes: a transmitter And sending, by the memory, the second IP voice packet to the second network device after saving the feature information of the second IP voice packet.
  • the device further includes: a counter, configured to: when the feature information of the second IP voice packet matches the feature information of the first IP voice packet And increasing the value of the counter; the processor is further configured to: determine that the value of the counter reaches a set threshold, where, when the value of the counter reaches the set threshold, The second user equipment and the first user equipment establish the local exchange relationship.
  • the receiver is further configured to: after establishing a local switching relationship between the second user equipment and the first user equipment, receive the second a third IP voice packet sent by the user equipment; the processor is further configured to: after querying the local exchange relationship corresponding to the second user equipment, control, by the sender, the third IP voice packet The first user equipment that is locally forwarded to the local exchange relationship; the receiver is further configured to: after establishing a local exchange relationship between the second user equipment and the first user equipment, receive the a fourth IP voice packet sent by the first user equipment; the processor is further configured to: after querying the local exchange relationship corresponding to the first user equipment, control, by the sender, the fourth IP The voice packet is locally forwarded to the second user equipment indicated by the local exchange relationship.
  • the processor is further configured to: after querying the local exchange relationship corresponding to the second user equipment, based on An address translation relationship between the address translation relationship of the second user equipment and an address translation relationship of the first user equipment, where the address translation relationship of the second user equipment includes a first IP address, a first port, and a second IP address. a second port corresponding relationship, the address conversion relationship of the first user equipment includes a third IP address and a third port, and a fourth IP address and a fourth port correspondence relationship; controlling the transmitter to use the third IP voice packet Forwarded locally to the first user equipment.
  • the processor is further configured to: after querying the local exchange relationship corresponding to the first user equipment, based on An address translation relationship between the address translation relationship of the first user equipment and an address translation relationship of the second user equipment, where the address translation relationship of the first user equipment includes a second IP address and a second port, and a first IP address and The address mapping relationship of the second user equipment includes a fourth IP address and a fourth port, and a third IP address and a third port correspondence relationship; The transmitter forwards the fourth IP voice packet to the second user equipment locally.
  • the feature information includes: a real-time transmission protocol of an IP voice packet An RTP sequence number, and a hash value calculated according to a payload of the IP voice packet; or a real-time transport protocol RTP sequence number of the IP voice packet, and a label of the IP voice packet, the label being received by the first network device After being added to the IP voice packet sent by the user equipment, the label is formed by combining at least one coding field in the RTP encapsulation header, and is used to identify the first network device and the user equipment.
  • the processor is further configured to: determine an RTP sequence number of the second IP voice packet and the first IP
  • the RTP sequence number of the voice packet is the same, and determining that the hash value of the second IP voice packet is the same as the hash value of the first IP voice packet; or determining the RTP sequence number and location of the second IP voice packet.
  • the RTP sequence number of the first IP voice packet is the same, and the label of the second IP voice packet is determined to be the same as the label of the first IP voice packet.
  • the destination user is the IP voice packet of the first user.
  • the feature information of the IP voice packet sent by the user is matched according to the feature information of the IP voice packet, and if the feature information of the IP voice packet is determined to be compatible with the saved IP voice packet sent by the second user.
  • a local exchange relationship is established between the second user and the first user, where the second user and the first user are used as the destination users of the other party in the local exchange relationship, and the next time the second user and the first user
  • the first network device can directly forward the IP voice packet based on the local switching relationship, and the existing IP voice exchange mode exists when the two users are in the same network device.
  • FIG. 1 is a schematic diagram of a data packet exchange path between a first user UE1 and a second user UE2 according to an embodiment of the present disclosure
  • FIG. 2 is a flowchart of a method for IP voice local exchange according to an embodiment of the present disclosure
  • FIG. 3 is a schematic diagram of an IP voice packet exchange path implemented by the method for IP voice local exchange in the embodiment of the present application. Comparison with the existing IP voice packet exchange path;
  • FIG. 4 is a schematic structural diagram of an apparatus for IP voice local exchange according to an embodiment of the present application. detailed description
  • the embodiment of the present application solves the technical problem of wasting network resources existing in the existing IP voice switching mode when two users are in the same network device by providing a method, device, and system for IP voice local exchange.
  • IP voice over Internet Protocol is simply to digitize the analog signal (Voice) and transmit it in real time on the IP network in the form of a data packet, for example, by IP phone or online telephone.
  • the method for IP voice local exchange provided in the embodiment of the present application is mainly applied to an IP voice local switching system, where the IP voice local switching system includes various network devices, for example, an evolved base station eNB, a radio network controller RNC, and a wireless local area network WLAN.
  • AP Serving Gateway SGW, Packet Switching Gateway PGW, Transcoder, and Mixer.
  • the device for IP voice local exchange corresponding to the IP voice local exchange method is disposed in the network devices, for example, in the evolved base station eNB or the serving gateway SGW.
  • the first network device mentioned in the present application refers to a device provided with IP voice local exchange, from And a network device having an IP voice local switching function
  • the second network device refers to those network devices that are connected to the first network device and close to the Internet layer, and the second network device may also be referred to as an upstream network of the first network device. device.
  • the switching path of the IP voice packets is the same, that is, after the IP voice packets are sent from the user equipment, they have to go through various network devices to enter the Internet. After passing through the evolved base station eNB (or the radio network controller RNC or the wireless local area network WLAN AP), and then through the serving gateway SGW, and then enter the Internet through the packet switching gateway PGW.
  • the IP voice local exchange method provided by the present application is to solve the problem that when two user equipments are all in the same network device, the IP voice packet still needs to enter the Internet through the normal transmission path and then return to the network device, thereby wasting network resources. technical problem.
  • the first network device capable of locally switching IP voice packets provided in the embodiment of the present application, at least one pair of user devices to perform IP voice communication, that is, the first user device and the second user device are connected Belongs to the first network device.
  • the first user equipment and the second user equipment are connected to the same evolved base station eNB or to the same serving gateway SGW.
  • the first network device can be understood as the local network device of the two user devices.
  • the method for local switching of IP voice specifically includes the following steps:
  • the first network device receives the first IP voice packet forwarded by the second network device, where the destination user device of the first IP voice packet is the first user device;
  • the first network device is used as the underlying network device connected to the user equipment in the IP voice communication, and the user equipment is connected downstream of the first network device, and the first device is connected to the upstream of the first network device.
  • the second network device is configured to send the destination user equipment in the Internet as an IP voice packet of a user equipment in the first network device to the first network device. Therefore, when the first user equipment is connected to the first network device, when the destination user equipment of the first IP voice packet is the first user equipment, the first network device receives the first IP voice forwarded by the second network device. package. It should be noted here that the second network device is more than the first network device.
  • the second network device is a serving gateway SGW, and if the first network device is a serving gateway SGW, the second network device is a packet switching gateway PGW .
  • the first network device as the underlying network device connected to the user equipment in the IP voice communication, is not only responsible for receiving the IP voice packet forwarded by the upstream second network device, but also responsible for connecting the underlying network voice packet.
  • the IP voice packet sent by the user equipment is sent out. If the IP voice packet received by the first network device is the same packet as the outgoing IP voice packet, the destination user device and the sending user device of the IP voice packet are connected to the first network device.
  • the feature information of the first IP semantic packet is obtained, so that the first IP voice is based on the first IP voice in step S2.
  • the feature information of the packet is queried whether the IP voice packet sent by the other user equipment and matching the feature information of the first IP voice packet is stored locally. If it is determined that the second IP voice packet sent by the second user equipment can match the feature information of the first IP voice packet, the second user equipment is the sending device of the first IP voice packet, and the first user equipment is the first The destination device of an IP voice packet.
  • the feature information includes:
  • the real-time transport protocol of the IP voice packet RTP sequence number, and the hash value calculated according to the payload of the IP voice packet;
  • the real-time transport protocol RTP serial number of the IP voice packet, and the label of the IP voice packet, the label is added by the first network device after receiving the IP voice packet sent by the user equipment, where the label is encapsulated by RTP At least one coding field in the header is combined to identify the first network device and the user equipment.
  • the feature information specifically refers to the real-time transport protocol RTP sequence number of the IP voice packet and the hash value calculated according to the payload of the IP voice packet, or the real-time transport protocol RTP sequence number of the IP voice packet and the After a network device receives the IP voice packet sent by the user equipment, it adds s Mark.
  • the real-time transport protocol RTP specifies that the standard data of audio and video transmitted on the Internet is sent to a message, and the serial number is incremented by one.
  • the receiver detects the packet loss by using the serial number, reorders the message, and restores the data.
  • the RTP sequence number is a sequence number specified when the IP voice packet is packaged and sent on the user equipment side.
  • the hash value calculated according to the payload of the IP voice packet refers to the hash calculation performed by the first network device on the payload of the IP voice packet, and the obtained hash value, which is used in the embodiment of the present application.
  • the algorithm does not need to be specifically limited.
  • the hash algorithm used may be:
  • the payload of an IP voice packet is 16 bits from beginning to end, forming a series of integers. If the last number is less than 16 bits, add 0 to the back. Qi, the XOR of these integers is calculated by bit, and finally an integer is obtained, which is the hash value.
  • the label of the IP voice packet refers to the identifier added by the first network device to the IP voice packet after receiving the IP voice packet sent by the user equipment, and the label may be in the RTP sequence number header, specifically by at least the RTP encapsulation header.
  • a coding field is combined, and the coding may be CSRC of the Chinese standard audio and video product, that is, a CSRC field is added as a label of the packet for each IP voice packet, and a label of the IP voice packet is used to identify the first network device and the user equipment. .
  • the feature information for each IP voice packet includes two types, one is composed of an RTP sequence number and a payload hash value, and the other is composed of an RTP sequence number and a label.
  • the process of determining that the feature information of the second IP voice packet sent by the second user equipment matches the feature information of the first IP voice packet includes: determining an RTP sequence of the second IP voice packet The number is the same as the RTP sequence number of the first IP voice packet, and the second IP is determined.
  • the hash value of the voice packet is the same as the hash value of the first IP voice packet, indicating that the feature information of the second IP voice packet matches the feature information of the first IP voice packet; or determining the RTP sequence of the second IP voice packet.
  • the number is the same as the RTP sequence number of the first IP voice packet, and the label of the second IP voice packet is determined to be the same as the label of the first IP voice packet, indicating the feature information of the second IP voice packet and the characteristics of the first IP voice packet.
  • the information matches.
  • the first IP voice packet and the second IP voice packet are the same voice packet, and the second The user equipment is a sending device of the first IP voice packet, and the first user equipment is a destination device of the first IP voice packet. Therefore, a local exchange relationship can be established between the first user equipment and the second user equipment, that is, IP voice sent by both parties when IP voice communication is to be performed between the first user equipment and the second user equipment in the future.
  • the packets can be exchanged directly locally on the first network device without going through the Internet.
  • S3 establishing a local switching relationship between the second user equipment and the first user equipment, where the local switching relationship indicates that the IP voice packet sent by the second user equipment is locally forwarded by the first network device to The first user equipment, or the IP voice packet sent by the first user equipment, is locally forwarded by the first network device to the second user equipment.
  • step S3 is performed, where the first network device functions as the first user device and the second user device.
  • the local network device the first network device establishes a local exchange relationship between the second user device and the first user device.
  • the IP voice packet sent by the second user equipment can be directly forwarded to the first user equipment by the first network device, and The IP voice packet sent by the first user equipment may be directly forwarded locally by the first network device to the second user equipment.
  • the storage location of the local exchange relationship is not specifically limited, as long as it is a location that the first network device can extract, for example, it can be saved in the first network device.
  • the local exchange relationship between the users is also cancelled, and the IP voice packet exchange can only be performed according to the normal exchange path.
  • the second network device includes a transcoder or a mixer, in order to prevent the first network device from matching the label of the IP voice packet sent by the second network device, the first network device receives the first When the IP voice packet sent by the network device is removed, the label on the IP voice packet is deleted. Therefore, when the second network device includes a transcoder or a mixer, the RTP sequence number of the IP voice packet and the payload hash value can only be used to determine whether the two packets match.
  • step S1 the method further includes the following steps:
  • the first network device in step S1 can locally query whether there is feature information matching the feature based on the feature information of the first IP voice packet, that is, other users have been saved in the first network device.
  • the feature information of the IP voice packet sent by the device can locally query whether there is feature information matching the feature based on the feature information of the first IP voice packet, that is, other users have been saved in the first network device.
  • the first network device when the first network device receives the second IP voice packet sent by the second user equipment, it first queries whether there is a local exchange relationship corresponding to the second user equipment, if it is queried, Direct local exchange; if the query is not available, it means that the local exchange relationship between the second user equipment and other local user equipments is not established, and only the ordinary exchange path can be used to send the second IP voice packet to the upstream
  • the second network device sends the second IP voice packet to the destination user equipment by using the second network device, but before sending to the second network device, the first network device acquires the feature information of the second IP voice packet. That is, the RTP sequence number and the payload hash value of the second IP voice packet are obtained, or the RTP sequence number and label of the second IP voice packet are obtained, and the acquired feature information is saved.
  • the method further includes the steps of: Receiving, by the first network device, the third IP voice packet sent by the second user equipment, and after querying the local exchange relationship corresponding to the second user equipment, forwarding the third IP voice packet locally The first user equipment indicated to the local exchange relationship; or
  • the fourth IP voice packet After the first network device receives the fourth IP voice packet sent by the first user equipment, and after querying the local exchange relationship corresponding to the first user equipment, the fourth IP voice packet is localized. Forwarding to the second user equipment indicated by the local exchange relationship.
  • step S3 based on the local exchange relationship established by the first user equipment and the second user equipment in step S3, after the first network equipment receives the third IP voice packet sent by the second user equipment again, The second user equipment is queried to have a local exchange relationship. If the destination user equipment of the third IP voice packet is the first user equipment, the third user equipment is no longer in accordance with the normal switching path.
  • the IP voice packet is sent to the second network device in the upstream device, but is directly forwarded to the first user device indicated by the local switching relationship. Similarly, when the first network device receives the fourth IP address sent by the first user device again. After the voice packet, the first user equipment can be queried to have a local exchange relationship. If the destination user equipment of the fourth IP voice packet is the second user equipment, the fourth IP voice packet is directly forwarded to the local exchange relationship. The second user device is out. This reduces network traffic, improves network path redundancy, and reduces network investment.
  • the first network device is an evolved base station eNB, and the two mobile user devices are first.
  • the device and the second device are both connected to the evolved base station, and the processing procedure of the eNB for the outgoing IP voice packet and the received IP voice packet is:
  • the eNB When the first device is to send the first IP voice packet to the destination user equipment through the eNB, the eNB first determines whether the local exchange relationship between the first device and its destination user equipment is stored locally, and if so, The destination user equipment is connected to the eNB locally. If there is no local switching relationship, the eNB records and saves the feature information of the first IP voice packet before the first IP voice is sent. The packet is sent to the upstream network device to send the first IP voice packet to its destination user device over the upstream network device and the Internet.
  • the eNB When the eNB receives the destination set from the upstream network device, such as the serving gateway SGW When the second IP voice packet of the second device is prepared, the feature information of the second IP voice packet is obtained, and the IP voice packet sent by the user equipment that has been saved locally is queried according to the feature information. If the feature information of the IP voice packet matches the IP voice packet, if the feature information of the first IP voice packet in the first device is matched with the feature information of the second IP voice packet, the first IP voice packet and the first voice packet are described. The second IP voice packet is the same packet, and the feature information of the first IP voice packet is recorded and saved by the first device before being sent to the upstream network device by the eNB, indicating that both the first device and the second device are not only connected.
  • the eNB is local to each other and is the destination user equipment of the other party. The next time the two voice packets are sent to each other, they can be directly exchanged locally. Therefore, the eNB establishes the first device and the second device.
  • FIG. 3 is a comparison diagram of an exchange path between an IP voice packet and an existing IP voice packet implemented by the method of IP voice local exchange in the embodiment of the present application.
  • the path of the IP voice packet exchanged between the UE1 and the UE2 is the path 10
  • the IP voice local exchange method provided in the embodiment of the present application is
  • the path of the IP voice packet is the path 20, and only the eNB downstream of the SGW needs to bypass the upstream network device to implement local switching; when UE1 and UE2 are connected in the same
  • the path of the IP voice packet is path 30, that is, it is directly exchanged locally at the eNB.
  • the first network device when the first user and the second user belong to the first network device, when the first network device receives the destination voice forwarded by the second network device as the first user's IP voice packet, And capturing, according to the feature information of the IP voice packet, matching the feature information of the saved IP voice packet sent by the user, if it is determined that the feature information of the IP voice packet can be compared with the saved IP voice packet sent by the second user.
  • the feature information is matched, and a local exchange relationship is established between the second user and the first user, where the second user and the first user are used as the destination users of the other party in the local exchange relationship, and the next time the second user and the first user
  • the first network device can directly forward the IP voice packet based on the local switching relationship, and solve the existing IP voice switching mode when the two users are in the same network device.
  • the existing technical problem of wasting network resources realizes establishing a local exchange relationship for two users connected to the same network device. In order to exchange IP voice packets between the two users, local exchange can be directly performed, which saves network resources.
  • the method further includes the following steps:
  • a preferred implementation manner is provided for establishing a local exchange relationship in step S3, that is, multiple IP voice packets are selected for matching, that is, if the first network device receives the destination user equipment.
  • the feature information of the N IP voice packets of the first user equipment can be matched with the feature information of the N IP voice packets in the second user equipment, and N is an integer greater than 2, and the first user equipment can be further confirmed. It is a destination device of the second user equipment, and the first network device establishes a local exchange relationship with the first user equipment for the second user equipment.
  • the counter is incremented. And determining whether the value of the counter reaches the set threshold N, and establishing a local exchange relationship between the second user equipment and the first user equipment after reaching N.
  • the matching between the IP voice packet sent to the first user equipment and the multiple IP voice packets sent by the second user equipment saved locally is only matched.
  • the technical means for establishing a local exchange relationship between the second user equipment and the first user equipment implements the beneficial effect that the first user equipment is the destination user equipment of the second user equipment to establish a local exchange relationship between the two.
  • the address conversion step is also required: After the first network device receives the third IP voice packet sent by the second user equipment, and queries the local exchange relationship corresponding to the second user equipment, if the destination user equipment of the third IP voice packet is the first user equipment, Performing address translation based on the address translation relationship of the second user equipment and the address translation relationship of the first user equipment, where the address translation relationship of the second user equipment includes the first IP address and the first port, and the second IP address and the second port corresponding to the address conversion relationship.
  • the address conversion relationship of the first user equipment includes a third IP address and a third port, and a fourth IP address and a fourth port correspondence, and the third IP voice packet is locally forwarded to the first user equipment.
  • the address conversion step is also required:
  • the first network device After the first network device receives the fourth IP voice packet sent by the first user equipment, and after querying the local switching relationship corresponding to the first user equipment, if the destination user equipment of the fourth IP voice packet is the second user equipment, Performing address translation based on the address translation relationship of the first user equipment and the address translation relationship of the second user equipment, where the address translation relationship of the first user equipment includes the second IP address and the second port, and the first IP address and the first port corresponding to the first port
  • the address conversion relationship of the second user equipment includes a fourth IP address and a fourth port, and a third IP address and a third port correspondence, and the fourth IP voice packet is locally forwarded to the second user equipment.
  • the address translation is also performed first, so The first network device records an address translation relationship between the first user equipment and the second user equipment, so that when the first network device receives the third IP voice packet sent by the second user equipment and queries the local exchange relationship, And performing address translation on the address translation relationship of the second user equipment and the address translation relationship of the first user equipment, and converting the address of the third IP voice packet to the address of the first user equipment, and then forwarding the information to the first user equipment locally,
  • the address translation relationship of the second user equipment includes a first IP address and a first port, and a second IP address and a second port.
  • the address translation relationship of the first user equipment includes a third IP address and a third port. The correspondence between the four IP addresses and the fourth port. Or when the first network device receives the first user equipment After the fourth IP voice packet is sent and the local exchange relationship is queried, the address translation relationship of the first user equipment is used to perform address translation based on the address translation relationship of the second user equipment, and the address of the fourth IP voice packet is converted into the second address. The address of the user equipment is forwarded to the second user equipment, where the address translation relationship of the first user equipment includes a second IP address and a second port, and a correspondence between the first IP address and the first port, where the second user equipment
  • the address translation relationship includes a fourth IP address and a fourth port, and a third IP address and a third port correspondence.
  • the address translation relationship is established before the local exchange relationship is established, that is, in the process of matching multiple IP voice packets, when the upstream second network device successfully forwards the first IP voice packet from the Internet to the first
  • the second network device has converted the address of the first IP voice packet from the sender to the address of the first user equipment. Therefore, when the feature information of the first IP voice packet can be
  • the first network device records the number according to the address of the received first IP voice packet and the address of the second IP voice packet stored locally.
  • the conversion mode of the two network devices is stored locally as an address translation relationship.
  • the address of the IP voice packet can be translated into the address of the destination user equipment based on the address translation relationship. Give the destination user device. For example, the first user equipment sends out the first
  • the source address/port of the IP voice packet is the original address/port of the first user equipment, such as 10.0.0.1/5000, and the address of the second user equipment end as the destination user equipment should be the source address translated address, such as 200.1. 1.1/9000. Therefore, when the first network device directly exchanges the first IP voice packet sent by the first user equipment to the second user equipment, the 10.0.0.1/5000 is converted to the 200.1.1.1/9000 and then exchanged. Similarly, when the IP voice packet sent by the second user equipment is directly locally exchanged to the first user equipment, 200.1.1.1/9000 is converted to 10.0.0.1/5000.
  • the embodiment of the present application further provides an apparatus for local switching of IP voice, which is applied to a first network device.
  • the apparatus includes: a first receiving unit 100, a determining unit 200, and an establishing unit 300. , among them:
  • the first receiving unit 100 is configured to receive a first IP voice packet that is forwarded by the second network device, where the destination user equipment of the first IP voice packet is the first user equipment;
  • the determining unit 200 is configured to determine, according to the feature information of the first IP voice packet, the second use The feature information of the second IP voice packet sent by the user equipment is matched with the feature information of the first IP voice packet, where the first user equipment and the second user equipment belong to the first network device;
  • the establishing unit 300 is configured to establish a local exchange relationship between the second user equipment and the first user equipment, where the local exchange relationship indicates that the IP voice packet sent by the second user equipment is A network device is locally forwarded to the first user equipment, or an IP voice packet sent by the first user equipment is locally forwarded by the first network device to the second user equipment.
  • the device further includes:
  • a second receiving unit configured to receive the second IP voice packet sent by the second user equipment
  • a saving unit configured to save feature information of the second IP voice packet, and use the second IP voice packet Send to the second network device.
  • the establishing unit 300 is further configured to:
  • the device further includes:
  • a third receiving unit configured to receive a third IP voice packet sent by the second user equipment, where the first forwarding unit is configured to query the local switching relationship corresponding to the second user equipment, Transmitting, by the third IP voice packet, the first user equipment indicated by the local exchange relationship;
  • a fourth receiving unit configured to receive a fourth IP voice packet sent by the first user equipment, where the second forwarding unit is configured to query the local switching relationship corresponding to the first user equipment, The fourth IP voice packet is locally forwarded to the second user equipment indicated by the local exchange relationship.
  • the first forwarding unit is configured to:
  • the address translation relationship of the second user equipment After the local exchange relationship corresponding to the second user equipment is queried, based on the second usage Address translation relationship between the address translation relationship of the user equipment and the first user equipment, the address translation relationship of the second user equipment includes a first IP address and a first port, and a second IP address corresponding to the second port
  • the address conversion relationship of the first user equipment includes a third IP address and a third port, and a fourth IP address and a fourth port correspondence, and the third IP voice packet is locally forwarded to the first user equipment.
  • the second forwarding unit is configured to:
  • the address translation relationship between the address translation relationship of the first user equipment and the address translation relationship of the second user equipment is performed, and the first user equipment is
  • the address translation relationship includes a second IP address and a second port, and a correspondence between the first IP address and the first port, where the address translation relationship of the second user equipment includes a fourth IP address and a fourth port, and a third IP address and a
  • the third port correspondence is forwarded to the second user equipment locally.
  • the feature information includes:
  • the real-time transport protocol of the IP voice packet RTP sequence number, and the hash value calculated according to the payload of the IP voice packet;
  • a real-time transport protocol RTP sequence number of the IP voice packet, and a label of the IP voice packet the label is added after the device receives the IP voice packet sent by the user equipment, where the label of the IP voice packet is RTP
  • At least one coding field in the encapsulation header is combined to identify the first network device and the user equipment.
  • the determining unit 200 is configured to:
  • the method for the IP voice local exchange is used in the method for implementing the IP voice local exchange, and the method for the IP voice local exchange provided by the present application is described in the foregoing embodiment.
  • the operation of the various parts of the apparatus is consistent with one or more embodiments of the above methods, and will not be repeated here.
  • the embodiment of the present application further provides a system for IP voice local exchange, including: a first network device, and a second network device connected to the first network device; wherein, the first network device A device including the IP voice local exchange described above.
  • the embodiment of the present application further provides an apparatus for IP voice local exchange, which is applied to a first network device, where the apparatus includes:
  • a receiver configured to receive a first IP voice packet forwarded by the second network device, where the destination user equipment of the first IP voice packet is a first user equipment;
  • a processor configured to determine, according to the feature information of the first IP voice packet, that feature information of the second IP voice packet sent by the second user equipment matches the feature information of the first IP voice packet, where a user equipment and the second user equipment both belong to the first network device; and a local exchange relationship is established between the second user equipment and the first user equipment, where the local exchange relationship indicates the first
  • the IP voice packet sent by the user equipment is forwarded locally by the first network device to the first user equipment, or the IP voice packet sent by the first user equipment is locally forwarded by the first network device to the first Two user equipment;
  • a memory configured to store a local exchange relationship, and store feature information of the IP voice packet. Further, the receiver is further configured to: receive the second IP voice packet sent by the second user equipment, and the memory is further configured to: save feature information of the second IP voice packet;
  • the device further includes: a transmitter, configured to send the second IP voice packet to the second network device.
  • the device further includes: a counter, configured to: when the feature information of the second IP voice packet matches the feature information of the first IP voice packet, increase the value of the counter; The device is further configured to: determine that the value of the counter reaches a set threshold, where, when the value of the counter reaches the set threshold, set the second user equipment and the first user The local exchange relationship is established.
  • the receiver is further configured to: after establishing a local switching relationship between the second user equipment and the first user equipment, receive a third IP voice packet sent by the second user equipment;
  • the processor is further configured to: after querying the local exchange relationship corresponding to the second user equipment, controlling, by the sender, locally forwarding the third IP voice packet to the local exchange relationship indication First user equipment;
  • the receiver is further configured to: after establishing a local switching relationship between the second user equipment and the first user equipment, receive a fourth IP voice packet sent by the first user equipment;
  • the processor is further configured to: after the local exchange relationship corresponding to the first user equipment is queried, locally forward the fourth IP voice packet to the second user indicated by the local exchange relationship device.
  • the processor is further configured to: after querying the local exchange relationship corresponding to the second user equipment, based on an address translation relationship of the second user equipment and an address translation of the first user equipment The address translation is performed.
  • the address translation relationship of the second user equipment includes a first IP address and a first port, and a second IP address and a second port.
  • the address translation relationship of the first user equipment includes a third IP address. Corresponding relationship between the address and the third port and the fourth IP address and the fourth port; controlling the sender to locally forward the third IP voice packet to the first user equipment.
  • processor is further configured to:
  • the address translation relationship between the address translation relationship of the first user equipment and the address translation relationship of the second user equipment is performed, and the first user equipment is
  • the address translation relationship includes a second IP address and a second port, and a correspondence between the first IP address and the first port, where the address translation relationship of the second user equipment includes a fourth IP address and a fourth port, and a third IP address and a a three-port correspondence; controlling the sender to locally forward the fourth IP voice packet to the second user equipment.
  • the feature information includes: The real-time transport protocol RTP sequence number of the IP voice packet, and the hash value calculated according to the payload of the IP voice packet; or
  • the real-time transport protocol RTP serial number of the IP voice packet, and the label of the IP voice packet, the label is added by the first network device after receiving the IP voice packet sent by the user equipment, where the label is encapsulated by RTP At least one coding field in the header is combined to identify the first network device and the user equipment.
  • processor is further configured to:
  • the apparatus for locally switching between the IP voice local exchange and the first set of IP voice local exchange is based on the same invention concept, and the method for implementing the foregoing IP voice local exchange is also provided according to the foregoing embodiment.
  • Description of the method of IP voice local exchange, the working process of each part of the apparatus is consistent with one or more embodiments of the above method, and is not described here.
  • the destination user is the IP voice packet of the first user.
  • the feature information of the IP voice packet sent by the user is matched according to the feature information of the IP voice packet, and if the feature information of the IP voice packet is determined to be compatible with the saved IP voice packet sent by the second user.
  • a local exchange relationship is established between the second user and the first user, where the second user and the first user are used as the destination users of the other party in the local exchange relationship, and the next time the second user and the first user
  • the first network device can directly forward the IP voice packets based on the local switching relationship, and solve the problem when two users
  • the existing IP voice exchange method wastes the technical problem of network resources, and realizes establishing a local exchange relationship for two users connected under the same network device, so as to facilitate the relationship between the two users.
  • local exchange can be performed directly, which saves network resources.
  • the disclosed systems, devices, and methods may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be electrical, mechanical or otherwise.
  • the components displayed for the unit may or may not be physical units, ie may be located in one place, or may be distributed over multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one single unit. Yuanzhong.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • the technical solution of the present invention may contribute to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium.
  • a number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and the like, and the program code can be stored. Medium.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Telephonic Communication Services (AREA)

Abstract

本申请公开了一种 IP语音本地交换的方法、装置及系统,该方法包括:第一网络设备接收第二网络设备转发的第一IP语音包,其中,第一IP语音包的目的用户设备为第一用户设备;根据第一IP语音包的特征信息确定第二用户设备发送的第二IP语音包的特征信息与第一IP语音包的特征信息相匹配,其中,第一用户设备和第二用户设备都属于第一网络设备;为第二用户设备和第一用户设备建立本地交换关系,其中,本地交换关系指示第二用户设备发送的IP语音包由第一网络设备本地转发给第一用户设备,或者第一用户设备发送的IP语音包由第一网络设备本地转发给第二用户设备。

Description

一种 IP语音本地交换的方法、 装置及系统
技术领域
本申请涉及通信技术领域, 特别涉及一种 IP语音本地交换的方法、 装置 及系统。 背景技术
随着无线通信技术的快速发展, 我们进入了 LTE ( Long Term Evolution, 长期演进) 时代, LTE无线通信系统是 3G的演进, 通常被称作 3.9G, 与 3G 相比, LTE更具技术优势, 具体体现在: 高数据速率、 分组传送、 延迟降低、 广域覆盖和向下兼容等特点。 终端从 LTE接入系统的过程为: 用户设备 UE 接入演进基站 eNB ( eNB也可以由无线网络控制器 RNC代替或者无线局域网 WLANAP代替),再接入服务网关 SGW,再接入包交换网关 PGW,通过 PGW 进入互联网。
VOIP ( voice over IP ) IP语音是通过 IP网络来传输语音的方式, 两个用 户终端之间通过信令(一般是 SIP信令)协商 VOIP用户面信息 (包括 IP地 址端口, 语音编解码等), 协商之后, 就可以进行 VOIP通话了。 如图 1所示, 如果两个移动用户第一用户 UE1 与第二用户 UE2之间数据包的交换路径为 UEl -eNB-SGW-PGW-PGW- SGW- eNB- UE2 ,其中,在两个 PGW之间可能还 要经过若干路由器或者其他交换设备。
目前, 在图 1所示的交换路径中, 就算第一用户 UE1与第二用户 UE2都 属于同一个 eNB或者同一个 SGW(也就是 UE1与 UE2 都连接在同一个 eNB 下), 但是它们之间相互发送的 IP 语音包仍然要经历一条完整的 eNB-SGW-PGW-PGW-SGW-eNB 的路径, 那么必然会导致交换路径冗余, 增 加网络流量, 从而增加网络投资。
由此可见, 当两个用户处于同一个网络设备时, 现有的 IP语音交换方式 存在浪费网络资源的技术问题。 发明内容
本申请实施例通过提供一种 IP语音本地交换的方法、 装置及系统, 用以 解决当两个用户处于同一个网络设备时, 现有的 IP语音交换方式存在的浪费 网络资源的技术问题。
第一方面, 提供一种 IP语音本地交换的方法, 包括: 第一网络设备接收 第二网络设备转发的第一 IP语音包, 其中, 所述第一 IP语音包的目的用户设 备为第一用户设备; 根据所述第一 IP语音包的特征信息确定第二用户设备发 送的第二 IP语音包的特征信息与所述第一 IP语音包的特征信息相匹配,其中, 所述第一用户设备和所述第二用户设备都属于所述第一网络设备; 为所述第 二用户设备和所述第一用户设备建立本地交换关系, 其中, 所述本地交换关 系指示所述第二用户设备发送的 IP语音包由所述第一网络设备本地转发给所 述第一用户设备, 或者所述第一用户设备发送的 IP语音包由所述第一网络设 备本地转发给所述第二用户设备。
结合第一方面, 在第一种可能的实现方式中, 在所述第一网络设备接收 第二网络设备转发来的第一 IP语音包之前, 所述方法还包括: 所述第一网络 设备接收所述第二用户设备发送的所述第二 IP语音包;保存所述第二 IP语音 包的特征信息, 将所述第二 IP语音包发送至所述第二网络设备。
结合第一方面, 在第二种可能的实现方式中, 在所述为所述第二用户设 备和所述第一用户设备建立本地交换关系之前, 所述方法还包括: 当所述第 二 IP语音包的特征信息与所述第一 IP语音包的特征信息相匹配时,增加计数 器的值; 确定所述计数器的值达到设定阔值, 其中, 当所述计数器的值达到 所述设定阔值时, 为所述第二用户设备和所述第一用户设备建立所述本地交 换关系。
结合第一方面, 在第三种可能的实现方式中, 在所述为所述第二用户设 备和所述第一用户设备建立本地交换关系之后, 所述方法还包括: 所述第一 网络设备接收所述第二用户设备发来的第三 IP语音包, 并且查询到所述第二 用户设备对应的所述本地交换关系后, 将所述第三 IP语音包本地转发给所述 本地交换关系指示的所述第一用户设备; 或者所述第一网络设备接收到所述 第一用户设备发来的第四 IP语音包, 并且查询到所述第一用户设备对应的所 述本地交换关系后, 将所述第四 IP语音包本地转发给所述本地交换关系所指 示的所述第二用户设备。
结合第一方面的第三种可能的实现方式, 在第四种可能的实现方式中, 所述查询到所述第二用户设备对应的所述本地交换关系后, 将所述第三 IP语 音包本地转发给所述本地交换关系指示出的所述第一用户设备, 包括: 查询 到所述第二用户设备对应的所述本地交换关系后, 基于所述第二用户设备的 地址转换关系与所述第一用户设备的地址转换关系进行地址转换, 所述第二 用户设备的地址转换关系包括第一 IP地址和第一端口以及第二 IP地址和第二 端口对应关系, 所述第一用户设备的地址转换关系包括第三 IP地址和第三端 口以及第四 IP地址和第四端口对应关系; 将所述第三 IP语音包本地转发给 所述第一用户设备。
结合第一方面的第三种可能的实现方式, 在第五种可能的实现方式中, 所述查询到所述第一用户设备对应的所述本地交换关系后, 将所述第四 IP语 音包本地转发给所述本地交换关系所指示出的所述第二用户设备, 包括: 查 询到所述第一用户设备对应的所述本地交换关系后, 基于所述第一用户设备 的地址转换关系与所述第二用户设备的地址转换关系进行地址转换, 所述第 一用户设备的地址转换关系包括第二 IP地址和第二端口以及第一 IP地址和第 一端口对应关系, 所述第二用户设备的地址转换关系包括第四 IP地址和第四 端口以及第三 IP地址和第三端口对应关系; 将所述第四 IP语音包本地转发 给所述第二用户设备。
结合第一方面, 或者第一方面的第一种至第五种中任意一种可能的实现 方式, 在第六种可能的实现方式中, 所述特征信息, 包括: IP语音包的实时 传送协议 RTP序列号, 和根据 IP语音包的净荷计算得到的哈希值; 或者 IP 语音包的实时传送协议 RTP序列号, 和 IP语音包的标签, 所述标签是由所述 第一网络设备接收到用户设备发送的 IP语音包后添加的, 其中, 所述标签由 RTP封装头中的至少一个编码字段组合而成, 用于标识所述第一网络设备和 所述用户设备。
结合第一方面的第六种可能的实现方式, 在第七种可能的实现方式中, 所述确定第二用户设备发送的第二 IP语音包的特征信息与所述第一 IP语音包 的特征信息相匹配, 包括: 确定所述第二 IP语音包的 RTP序列号与所述第一 IP语音包的 RTP序列号相同,以及确定所述第二 IP语音包的哈希值与所述第 一 IP语音包的哈希值相同; 或者确定所述第二 IP语音包的 RTP序列号与所 述第一 IP语音包的 RTP序列号相同, 以及确定所述第二 IP语音包的标签与 所述第一 IP语音包的标签相同。
第二方面, 提供一种 IP语音本地交换的装置, 应用于第一网络设备, 所 述装置包括: 第一接收单元、 确定单元和建立单元, 其中: 所述第一接收单 元, 用于接收到第二网络设备转发的第一 IP语音包, 其中, 所述第一 IP语音 包的目的用户设备为第一用户设备; 所述确定单元, 用于根据所述第一 IP语 音包的特征信息确定第二用户设备发送的第二 IP语音包的特征信息与所述第 一 IP语音包的特征信息相匹配, 其中, 所述第一用户设备和所述第二用户设 备都属于所述第一网络设备; 所述建立单元, 用于为所述第二用户设备和所 述第一用户设备建立本地交换关系, 其中, 所述本地交换关系指示所述第二 用户设备发送的 IP语音包由所述第一网络设备本地转发给所述第一用户设 备, 或者所述第一用户设备发送的 IP语音包由所述第一网络设备本地转发给 所述第二用户设备。
结合第二方面, 在第一种可能的实现方式中, 所述装置还包括: 第二接 收单元, 用于接收所述第二用户设备发来的所述第二 IP语音包; 保存单元, 用于保存所述第二 IP语音包的特征信息,将所述第二 IP语音包发送至所述第 二网络设备。
结合第二方面, 在第二种可能的实现方式中, 所述建立单元, 还用于: 当所述第二 IP语音包的特征信息与所述第一 IP语音包的特征信息相匹配时, 增加计数器的值; 确定所述计数器的值达到设定阔值, 其中, 当所述计数器 的值达到所述设定阔值时, 为所述第二用户设备和所述第一用户设备建立所 述本地交换关系。
结合第二方面, 在第三种可能的实现方式中, 所述装置还包括: 第三接 收单元, 用于接收所述第二用户设备发来的第三 IP语音包; 第一转发单元, 用于查询到所述第二用户设备对应的所述本地交换关系后, 将所述第三 IP语 音包本地转发给所述本地交换关系指示的所述第一用户设备; 第四接收单元, 用于接收所述第一用户设备发来的第四 IP语音包; 第二转发单元, 用于查询 到所述第一用户设备对应的所述本地交换关系后, 将所述第四 IP语音包本地 转发给所述本地交换关系所指示的所述第二用户设备。
结合第二方面的第三种可能的实现方式, 在第四种可能的实现方式中, 所述第一转发单元, 用于: 查询到所述第二用户设备对应的所述本地交换关 系后, 基于所述第二用户设备的地址转换关系与所述第一用户设备的地址转 换关系进行地址转换, 所述第二用户设备的地址转换关系包括第一 IP地址和 第一端口以及第二 ip地址和第二端口对应关系, 所述第一用户设备的地址转 换关系包括第三 IP地址和第三端口以及第四 IP地址和第四端口对应关系,将 所述第三 IP语音包本地转发给所述第一用户设备。
结合第二方面的第三种可能的实现方式, 在第五种可能的实现方式中, 所述第二转发单元, 用于: 查询到所述第一用户设备对应的所述本地交换关 系后, 基于所述第一用户设备的地址转换关系与所述第二用户设备的地址转 换关系进行地址转换, 所述第一用户设备的地址转换关系包括第二 IP地址和 第二端口以及第一 IP地址和第一端口对应关系, 所述第二用户设备的地址转 换关系包括第四 IP地址和第四端口以及第三 IP地址和第三端口对应关系,将 所述第四 IP语音包本地转发给所述第二用户设备。
结合第二方面, 或者第二方面的第一种至第五种中任意一种可能的实现 方式, 在第六种可能的实现方式中, 所述特征信息, 包括: IP语音包的实时 传送协议 RTP序列号, 和根据 IP语音包的净荷计算得到的哈希值; 或者 IP 语音包的实时传送协议 RTP序列号, 和 IP语音包的标签, 所述标签是由所述 装置接收到用户设备发送的 IP语音包后添加的, 其中, 所述 IP语音包的标签 由 RTP封装头中的至少一个编码字段组合而成, 用于标识所述第一网络设备 和所述用户设备。
结合第二方面的第六种可能的实现方式, 在第七种可能的实现方式中, 所述确定单元, 用于: 确定所述第二 IP语音包的 RTP序列号与所述第一 IP 语音包的 RTP序列号相同,以及确定所述第二 IP语音包的哈希值与所述第一 IP语音包的哈希值相同;或者确定所述第二 IP语音包的 RTP序列号与所述第 一 IP语音包的 RTP序列号相同, 以及确定所述第二 IP语音包的标签与所述 第一 IP语音包的标签相同。
第三方面, 提供一种 IP语音本地交换的系统, 包括: 第一网络设备, 以 及与所述第一网络设备连接的第二网络设备; 其中, 所述第一网络设备包括 如第二方面所述的 IP语音本地交换的装置。
第四方面, 提供一种 IP语音本地交换的装置, 应用于第一网络设备, 所 述装置包括: 接收器 ,用于接收到第二网络设备转发的第一 IP语音包,其中, 所述第一 IP语音包的目的用户设备为第一用户设备; 处理器, 用于根据所述 第一 IP语音包的特征信息确定第二用户设备发送的第二 IP语音包的特征信息 与所述第一 IP语音包的特征信息相匹配, 其中, 所述第一用户设备和所述第 二用户设备都属于所述第一网络设备; 以及为所述第二用户设备和所述第一 用户设备建立本地交换关系, 其中, 所述本地交换关系指示所述第二用户设 备发送的 IP语音包由所述第一网络设备本地转发给所述第一用户设备, 或者 所述第一用户设备发送的 IP语音包由所述第一网络设备本地转发给所述第二 用户设备; 存储器, 用于存储本地交换关系, 以及存储所述第一 IP语音包以 及所述第二 IP语音包的特征信息。
结合第四方面, 在第一种可能的实现方式中, 所述接收器, 还用于: 接 收所述第二用户设备发送的所述第二 IP语音包; 所述装置, 还包括: 发送 器, 用于在所述存储器保存所述第二 IP语音包的特征信息之后, 将所述第二 IP语音包发送至所述第二网络设备。 结合第四方面, 在第二种可能的实现方式中, 所述装置, 还包括: 计数 器,用于当所述第二 IP语音包的特征信息与所述第一 IP语音包的特征信息相 匹配时, 增加所述计数器的值; 所述处理器, 还用于: 确定所述计数器的值 达到设定阔值, 其中, 当所述计数器的值达到所述设定阔值时, 为所述第二 用户设备和所述第一用户设备建立所述本地交换关系。
结合第四方面, 在第三种可能的实现方式中, 所述接收器, 还用于: 在 为所述第二用户设备和所述第一用户设备建立本地交换关系之后, 接收所述 第二用户设备发来的第三 IP语音包; 所述处理器, 还用于: 查询到所述第二 用户设备对应的所述本地交换关系后, 控制所述发送器将所述第三 IP语音包 本地转发给所述本地交换关系指示的所述第一用户设备; 所述接收器, 还用 于: 在为所述第二用户设备和所述第一用户设备建立本地交换关系之后, 接 收所述第一用户设备发来的第四 IP语音包; 所述处理器, 还用于: 查询到所 述第一用户设备对应的所述本地交换关系后, 控制所述发送器将所述第四 IP 语音包本地转发给所述本地交换关系所指示的所述第二用户设备。
结合第四方面的第三种可能的实现方式, 在第四种可能的实现方式中, 所述处理器, 还用于: 查询到所述第二用户设备对应的所述本地交换关系 后, 基于所述第二用户设备的地址转换关系与所述第一用户设备的地址转换 关系进行地址转换, 所述第二用户设备的地址转换关系包括第一 IP地址和第 一端口以及第二 IP地址和第二端口对应关系, 所述第一用户设备的地址转换 关系包括第三 IP地址和第三端口以及第四 IP地址和第四端口对应关系; 控制 所述发送器将所述第三 IP语音包本地转发给所述第一用户设备。
结合第四方面的第三种可能的实现方式, 在第五种可能的实现方式中, 所述处理器, 还用于: 查询到所述第一用户设备对应的所述本地交换关系 后, 基于所述第一用户设备的地址转换关系与所述第二用户设备的地址转换 关系进行地址转换, 所述第一用户设备的地址转换关系包括第二 IP地址和第 二端口以及第一 IP地址和第一端口对应关系, 所述第二用户设备的地址转换 关系包括第四 IP地址和第四端口以及第三 IP地址和第三端口对应关系; 控制 所述发送器将所述第四 IP语音包本地转发给所述第二用户设备。
结合第四方面, 或者第四方面的第一种至第五种中任意一种可能的实现 方式, 在第六种可能的实现方式中, 所述特征信息, 包括: IP语音包的实时 传送协议 RTP序列号, 和根据 IP语音包的净荷计算得到的哈希值; 或者 IP 语音包的实时传送协议 RTP序列号, 和 IP语音包的标签, 所述标签是由所述 第一网络设备接收到用户设备发送的 IP语音包后添加的, 其中, 所述标签由 RTP封装头中的至少一个编码字段组合而成, 用于标识所述第一网络设备和 所述用户设备。
结合第四方面的第六种可能的实现方式, 在第七种可能的实现方式中, 所述处理器, 还用于: 确定所述第二 IP语音包的 RTP序列号与所述第一 IP 语音包的 RTP序列号相同, 以及确定所述第二 IP语音包的哈希值与所述第一 IP语音包的哈希值相同; 或者确定所述第二 IP语音包的 RTP序列号与所述第 一 IP语音包的 RTP序列号相同, 以及确定所述第二 IP语音包的标签与所述 第一 IP语音包的标签相同。
本申请实施例中提供的一个或多个技术方案, 至少具有如下技术效果或 优点:
由于在本申请实施例中, 当第一用户与第二用户都属于第一网络设备时 , 在第一网络设备接收到第二网络设备转发来的目的用户为第一用户的 IP语音 包时,釆取根据该 IP语音包的特征信息与已保存的用户发送的 IP语音包的特 征信息相匹配, 如果确定该 IP语音包的特征信息能与已保存的第二用户发送 的 IP语音包的特征信息匹配上, 则为第二用户与第一用户之间建立本地交换 关系, 其中, 在本地交换关系中指示第二用户与第一用互相作为对方的目的 用户, 当下一次第二用户与第一用户之间要进行 IP语音包发送时, 第一网络 设备可以基于该本地交换关系对 IP语音包直接本地转发, 解决了当两个用户 处于同一个网络设备时, 现有的 IP语音交换方式存在的浪费网络资源的技术 问题, 实现了为连接在同一个网络设备下的两个用户建立本地交换关系以便 于该两个用户之间再交换 IP语音包时能够直接进行本地交换, 节约了网络资 附图说明
图 1为本申请实施例提供的第一用户 UE1与第二用户 UE2之间数据包的 交换路径示意图;
图 2为本申请实施例提供的一种 IP语音本地交换的方法的流程图; 图 3为本申请实施例提供的通过本申请实施例中 IP语音本地交换的方法 实现的 IP语音包的交换路径与现有的 IP语音包的交换路径对比图;
图 4为本申请实施例提供的一种 IP语音本地交换的装置结构示意图。 具体实施方式
本申请实施例通过提供一种 IP语音本地交换的方法、 装置及系统, 解决 了当两个用户处于同一个网络设备时, 现有的 IP语音交换方式存在的浪费网 络资源的技术问题。
为了更好的理解上述技术方案, 下面将结合说明书附图以及具体的实施 方式对上述技术方案进行详细的说明, 应当理解本申请实施例以及实施例中 的具体特征是对本申请技术方案的详细的说明, 而不是对本申请技术方案的 限定, 在不冲突的情况下, 本申请实施例以及实施例中的技术特征可以相互 组合。
VOIP ( voice over Internet Protocol 简称 IP语音) 简而言之就是将模拟信 号( Voice )数字化, 以数据封包( Data Packet )的形式在 IP网络 (IP Network ) 上做实时传递, 比如, 打 IP电话或者网络电话。 本申请实施例中提供的 IP语 音本地交换的方法主要应用在 IP语音本地交换系统中 ,该 IP语音本地交换系 统包括各种网络设备, 比如, 演进基站 eNB 、 无线网络控制器 RNC、 无线局 域网 WLAN AP、 服务网关 SGW、 包交换网关 PGW、 转码器以及混音器等。 与该 IP语音本地交换的方法相对应的 IP语音本地交换的装置就是设置在这些 网络设备中的中, 比如, 设置在演进基站 eNB或者服务网关 SGW中。 因此, 在本申请中提到的第一网络设备就指的是设置有 IP语音本地交换的装置, 从 而具有 IP语音本地交换功能的网络设备, 而第二网络设备指的是与第一网络 设备连接的且靠近互联网层的那些网络设备, 第二网络设备也可以称为第一 网络设备的上游网络设备。
目前不论进行 IP语音通信的两个用户设备是否处于同一个网络设备, IP 语音包的交换路径都是一样的, 即 IP语音包从用户设备发出后, 要经过各种 网络设备才能进入互联网,比如,经过演进基站 eNB ( 或无线网络控制器 RNC 或者无线局域网 WLANAP),再经过服务网关 SGW,再通过包交换网关 PGW 进入互联网。 本申请提供的 IP语音本地交换的方法就是为了解决当两个用户 设备都处于同一个网络设备时, IP语音包仍然要经过正常传输路径进入互联 网后再传回该网络设备而造成浪费网络资源的技术问题。 因此, 在本申请实 施例中提供的能够对 IP语音包进行本地交换的第一网络设备下, 连接有至少 一对要进行 IP语音通信的用户设备, 即第一用户设备与第二用户设备都属于 第一网络设备。 比如, 第一用户设备与第二用户设备连接于同一个演进基站 eNB, 或连接于同一个服务网关 SGW。 当第一用户设备与第二用户设备都连 接在第一网络设备下时, 第一网络设备可以理解为是这两个用户设备的本地 网络设备。
如图 2所示, 本申请实施例提供的 IP语音本地交换的方法, 具体包括步 骤:
S1 : 第一网络设备接收第二网络设备转发的第一 IP语音包, 其中, 所述 第一 IP语音包的目的用户设备为第一用户设备;
在具体实施过程中, 在步骤 S1 中, 第一网络设备作为 IP语音通信中与 用户设备连接的底层网络设备, 在第一网络设备下游连接有用户设备, 在第 一网络设备的上游连接有第二网络设备, 第二网络设备负责将互联网中的目 的用户设备为第一网络设备下的某一个用户设备的 IP语音包发送至第一网络 设备。 因此, 由于第一用户设备连接在第一网络设备下, 当第一 IP语音包的 目的用户设备为第一用户设备时, 第一网络设备会接收到第二网络设备转发 过来的第一 IP语音包。 这里要说明的是, 第二网络设备是比第一网络设备更 接近互联网的网络设备, 比如, 如果第一网络设备是演进基站 eNB时, 则第 二网络设备是服务网关 SGW, 如果第一网络设备是服务网关 SGW时, 则第 二网络设备是包交换网关 PGW。
S2: 根据所述第一 IP语音包的特征信息确定第二用户设备发送的第二 IP 语音包的特征信息与所述第一 IP语音包的特征信息相匹配, 其中, 所述第一 用户设备和所述第二用户设备都属于所述第一网络设备;
在具体实施过程中, 第一网络设备作为 IP语音通信中与用户设备连接的 底层网络设备, 不仅负责要接收上游的第二网络设备转发来的 IP语音包, 还 要负责将连接在其下面的用户设备发送的 IP语音包发送出去。 如果第一网络 设备接收到的 IP语音包与发出去的 IP语音包是同一个包, 则说明该 IP语音 包的目的用户设备与发送用户设备都连接在第一网络设备下。
因此, 当第一网络设备通过步骤 S1接收到上游的第二网络设备发送来的 第一 IP语音包后, 要获取第一 IP语意包的特征信息, 以使在步骤 S2中根据 第一 IP语音包的特征信息查询在本地是否保存有其他用户设备发送来的与第 一 IP语音包的特征信息相匹配的 IP语音包。如果确定由第二用户设备发送的 第二 IP语音包能够与第一 IP语音包的特征信息相匹配上,则说明第二用户设 备是第一 IP语音包的发送设备, 第一用户设备是第一 IP语音包的目的设备。
进一步的, 特征信息, 包括:
IP语音包的实时传送协议 RTP序列号,和根据 IP语音包的净荷计算得到 的哈希值; 或者
IP语音包的实时传送协议 RTP序列号, 和 IP语音包的标签, 所述标签是 由所述第一网络设备接收到用户设备发送的 IP语音包后添加的, 其中, 所述 标签由 RTP封装头中的至少一个编码字段组合而成, 用于标识所述第一网络 设备和用户设备。
在具体实施过程中,特征信息具体指的 IP语音包的实时传送协议 RTP序 列号以及根据 IP语音包的净荷计算得到的哈希值,或者 IP语音包的实时传送 协议 RTP序列号以及由第一网络设备接收到用户设备发送的 IP语音包后添加 的标签。
其中, 实时传送协议 RTP中规定了互联网上传递音频和视频的标准数据 送一个报文, 序列号增 1 , 接收者通过序列号来检测报文丟失情况, 重新排序 报文, 恢复数据, 简单说, RTP序列号在本申请实施例中就是 IP语音包在用 户设备侧被打包发送时所规定的一个序列号。
根据 IP语音包的净荷计算得到的哈希值指的是第一网络设备对 IP语音包 的净荷进行哈希计算, 获得的哈希值, 在本申请实施例中对釆用的哈希算法 不做具体限定, 比如, 釆用的哈希算法可以为: 对一个 IP语音包的净荷从头 到尾依次取 16bit, 构成一系列整数, 如果最后的数不够 16位, 在后面补 0 凑齐, 将这些整数按 bit进行异或计算, 最终得到一个整数, 这就是哈希值。 比如, 一个 IP 语音包的净荷为: 0X1A2346B1123 , 首先补 0 得到: 0X1 A2346B11230, 分成三个整形: 0X1 A23 , 0X46B1、 0X1230, 进行位异或 计算得到: 0Χ1Α23Λ0Χ46Β1Λ0Χ 1230=0X8EA2, 则 0X8EA2就是该 IP语音包 净荷的哈希值。
IP语音包的标签指的是第一网络设备在接收到用户设备发送来的 IP语音 包后为 IP语音包添加的标识, 标签可以打在 RTP序列号头里, 具体由 RTP 封装头中的至少一个编码字段组合而成, 编码具体可以是中国标准音像制品 编码 CSRC, 即对每个 IP语音包增添 CSRC字段作为该包的标签, IP语音包 的标签, 用于标识第一网络设备和用户设备。
对于一个 IP语音包来说, RTP序列号与净荷哈希值组合在一起,或者 RTP 序列号与标签组合在一起, 可作为对该 IP语音包的唯一标识, 因此, 在本申 请实施例中的针对每个 IP语音包的特征信息包括两种,一种是由 RTP序列号 与净荷哈希值组成, 另一种是由 RTP序列号与标签组成。
因此, 进一步的, 在步骤 S2中, 确定第二用户设备发送的第二 IP语音 包的特征信息与第一 IP语音包的特征信息相匹配的过程, 包括: 确定第二 IP 语音包的 RTP序列号与第一 IP语音包的 RTP序列号相同, 以及确定第二 IP 语音包的哈希值与第一 IP语音包的哈希值相同,则说明第二 IP语音包的特征 信息与第一 IP语音包的特征信息相匹配; 或者确定第二 IP语音包的 RTP序 列号与第一 IP语音包的 RTP序列号相同, 以及确定第二 IP语音包的标签与 第一 IP语音包的标签相同, 则说明第二 IP语音包的特征信息与第一 IP语音 包的特征信息相匹配。
由此可见,当确定第一 IP语音包的特征信息与第二 IP语音包的特征信息 能够匹配上时, 则说明第一 IP语音包与第二 IP语音包是同一个语音包, 且第 二用户设备是第一 IP语音包的发送设备,第一用户设备是第一 IP语音包的目 的设备。 因此, 在第一用户设备与第二用户设备之间可以建立一个本地交换 关系, 也就是说, 以后第一用户设备与第二用户设备之间再要进行 IP语音通 信时, 双方发送的 IP语音包可以不经由互联网, 而在第一网络设备本地直接 进行交换。
S3: 为所述第二用户设备和所述第一用户设备建立本地交换关系, 其中, 所述本地交换关系指示所述第二用户设备发送的 IP语音包由所述第一网络设 备本地转发给所述第一用户设备, 或者所述第一用户设备发送的 IP语音包由 所述第一网络设备本地转发给所述第二用户设备。
在具体实施过程中, 经过前面的实施例中的分析可知, 当确定了第二 IP 语音包与第一 IP语音包是同一个语音包时,则说明第一 IP语音包是由第二用 户设备通过第一网络设备发送出去的, 在经由互联网的传输后, 又经过第二 网络设备回到了第一网络设备, 因此, 执行步骤 S3 , 第一网络设备作为第一 用户设备与第二用户设备的本地网络设备, 第一网络设备要在第二用户设备 与第一用户设备之间建立本地交换关系。 其中, 本地交换关系指示出第二用 户设备与第一用户设备之间进行 IP语音通信时,第二用户设备发送的 IP语音 包可以由第一网络设备直接本地转发给第一用户设备, 同时, 第一用户设备 发送的 IP语音包可以由第一网络设备直接本地转发给第二用户设备。
在本申请实施例中对本地交换关系的保存位置并不做具体限定, 只要是 第一网络设备能够提取到的位置即可, 比如可以保存在第一网络设备中的用 户信息中, 但是当用户信息被删除时, 用户之间的本地交换关系也随之被解 除, 又只能按照正常交换路径进行 IP语音包交换了。
这里要说明的是,如果第一网络设备接收到的 IP语音包经过的 IP网络传 输路径中间有转码器或者混音器等网络设备存在, 则 IP语音包的净荷会被改 变, 此时就算该 IP语音包的标签与本地保存的 IP语音包的标签相同, 两个用 户设备之间也不能做本地 IP语音交换, 不能建立本地交换关系, 因此, 在实 际应用过程中, 当检测到上游的第二网络设备中包括有转码器或者混音器时, 为了防止第一网络设备会将第二网络设备发过来的 IP语音包的标签拿来进行 匹配, 第一网络设备在接收到第二网络设备发送过来的 IP语音包时, 要将该 IP语音包上的标签删除。 因此, 当第二网络设备中包括有转码器或者混音器 时,只能通过 IP语音包的 RTP序列号与净荷哈希值来判断两个包是否相匹配。
进一步的, 在步骤 S1之前, 还包括步骤:
所述第一网络设备接收所述第二用户设备发送的所述第二 IP语音包; 保存所述第二 IP语音包的特征信息,将所述第二 IP语音包发送至所述第 二网络设备。
在具体实施过程中, 步骤 S1 中第一网络设备能够基于第一 IP语音包的 特征信息在本地查询是否有与之相匹配的特征信息的前提是, 在第一网络设 备中已保存有其他用户设备发送来的 IP语音包的特征信息。 因此, 在步骤 S1 之前, 当第一网络设备接收到第二用户设备发来的第二 IP语音包时, 首先要 查询是否有关于第二用户设备对应的本地交换关系, 如果查询到的话, 就直 接进行本地交换; 如果查询不到, 则说明没有建立第二用户设备与本地其他 用户设备之间的本地交换关系, 则只能釆用普通交换路径, 将第二 IP语音包 发送至上游的第二网络设备, 以通过第二网络设备将该第二 IP语音包发送至 它的目的用户设备, 但在发送至第二网络设备之前, 第一网络设备要获取该 第二 IP语音包的特征信息, 即获取第二 IP语音包的 RTP序列号与净荷哈希 值, 或者获得第二 IP语音包的 RTP序列号与标签, 并保存获取的特征信息。
进一步的, 在步骤 S3之后, 还包括步骤: 所述第一网络设备接收所述第二用户设备发来的第三 IP语音包, 并且查 询到所述第二用户设备对应的所述本地交换关系后, 将所述第三 IP语音包本 地转发给所述本地交换关系指示的所述第一用户设备; 或者
所述第一网络设备接收到所述第一用户设备发来的第四 IP语音包, 并且 查询到所述第一用户设备对应的所述本地交换关系后, 将所述第四 IP语音包 本地转发给所述本地交换关系所指示的所述第二用户设备。
在具体实施过程中,基于步骤 S3中为第一用户设备与第二用户设备建立 的本地交换关系, 当第一网络设备再次接收到第二用户设备发来的第三 IP语 音包后, 就能查询到第二用户设备对应有本地交换关系, 如果该第三 IP语音 包的目的用户设备为第一用户设备, 因此, 就不再按照普通交换路径将第三
IP语音包发送至上游的第二网络设备中, 而是直接本地转发给本地交换关系 指示的第一用户设备; 同理, 当第一网络设备再次接收到第一用户设备发来 的第四 IP语音包后, 能查询到第一用户设备对应有本地交换关系, 如果该第 四 IP语音包的目的用户设备为第二用户设备,就将第四 IP语音包直接本地转 发给本地交换关系所指示出第二用户设备。 从而减少网络流量, 改善网络路 径冗余现象, 以及减少网络投资。
下面具体结合一个应用场景来说明第一网络设备通过本申请实施例中提 供的本地交换方法进行对 IP语音包转发的过程, 假设第一网络设备为演进基 站 eNB, 有两个移动用户设备第一设备与第二设备都连接在该演进基站下, eNB对发出去的 IP语音包以及对接收到的 IP语音包的处理过程为:
当第一设备要通过 eNB向它的目的用户设备发送第一 IP语音包时, eNB 首先会判断在本地是否保存有第一设备与它的目的用户设备之间的本地交换 关系, 如果有, 则说明它的目的用户设备与第一设备一样都是连接在 eNB本 地的, 如果本地没有本地交换关系, 则 eNB要将该第一 IP语音包的特征信息 记录并保存后, 才把第一 IP语音包发送至上游网络设备, 以通过上游网络设 备以及互联网将该第一 IP语音包发送到它的目的用户设备中。
当 eNB接收到从上游网络设备, 比如服务网关 SGW发送过来的目的设 备为第二设备的第二 IP语音包时, 就获取该第二 IP语音包的特征信息,根据 该特征信息在已经保存在本地的用户设备发送的 IP语音包中查询是否有与该 第二 IP语音包的特征信息相匹配的 IP语音包,如果检测到第一设备中的第一 IP语音包的特征信息与第二 IP语音包的特征信息相匹配, 则说明第一 IP语 音包与第二 IP语音包是同一个包,而第一 IP语音包的特征信息是由第一设备 通过该 eNB发送到上游网络设备前被记录保存下来的, 则说明第一设备与第 二设备不仅都连接在该 eNB本地, 而且互相是对方的目的用户设备, 下一次 这两者之间还要相互发送 IP语音包时就可以在本地直接交换, 因此, 该 eNB 会为第一设备与第二设备建立本地交换关系。
如图 3所示, 图 3为通过本申请实施例中 IP语音本地交换的方法实现的 IP语音包的交换路径与现有的 IP语音包的交换路径对比图。现有交换方法中, 即使 UE1与 UE2连接在同一个 eNB或者 SGW下, UE1与 UE2之间交换 IP 语音包的路径为路径 10, 而通过本申请实施例中提供的 IP语音本地交换的方 法, 当 UE1与 UE2连接在同一个 SGW时, IP语音包的路径为路径 20, 只需 要通过 SGW下游的 eNB, 不需再绕过上游网络设备, 即可实现本地交换; 当 UE1与 UE2连接在同一个 eNB时, IP语音包的路径为路径 30, 也就是说直 接在 eNB本地交换。
可见, 在本申请实施例中, 当第一用户与第二用户都属于第一网络设备 时, 在第一网络设备接收到第二网络设备转发来的目的用户为第一用户的 IP 语音包时,釆取根据该 IP语音包的特征信息与已保存的用户发送的 IP语音包 的特征信息相匹配, 如果确定该 IP语音包的特征信息能与已保存的第二用户 发送的 IP语音包的特征信息匹配上, 则为第二用户与第一用户之间建立本地 交换关系, 其中, 在本地交换关系中指示第二用户与第一用互相作为对方的 目的用户, 当下一次第二用户与第一用户之间要进行 IP语音包发送时, 第一 网络设备可以基于该本地交换关系对 IP语音包直接本地转发, 解决了当两个 用户处于同一个网络设备时, 现有的 IP语音交换方式存在的浪费网络资源的 技术问题, 实现了为连接在同一个网络设备下的两个用户建立本地交换关系 以便于该两个用户之间再交换 IP语音包时能够直接进行本地交换, 节约了网 络资源。
进一步的, 在步骤 S3中为所述第二用户设备和所述第一用户设备建立本 地交换关系之前, 还包括步骤:
当所述第二 IP语音包的特征信息与所述第一 IP语音包的特征信息相匹配 时, 增加计数器的值;
确定所述计数器的值达到设定阔值, 其中, 当所述计数器的值达到所述 设定阔值时, 为所述第二用户设备和所述第一用户设备建立所述本地交换关 系。
在具体实施过程中, 本施例中为步骤 S3中建立本地交换关系提供了一种 优选实施方式, 即选取多个 IP语音包进行匹配, 也就是说如果第一网络设备 接收到的目的用户设备是第一用户设备的 N个 IP语音包的特征信息都能与第 二用户设备中的 N个 IP语音包的特征信息相匹配, N为大于等 2的整数, 则 能进一步确认第一用户设备是第二用户设备的目的设备, 第一网络设备才为 第二用户设备与第一用户设备建立本地交换关系。 所以, 在优选的实施方式 中, 当每一次查询到第二用户设备中保存的 IP语音包的特征信息与发送给第 一用户设备的 IP语音包的特征信息相匹配之后, 就对递增计数器的值, 并判 断计数器的值是否达到设定阔值 N, 当达到 N后才对第二用户设备与第一用 户设备建立本地交换关系。
可见, 在本申请实施例中, 由于釆用要选取多个发送给第一用户设备的 IP语音包与在本地保存的第二用户设备发出的多个 IP语音包进行匹配, 只有 都匹配上才对第二用户设备与第一用户设备建立本地交换关系的技术手段, 实现了能够进一步确认第一用户设备是第二用户设备的目的用户设备, 以在 二者间建立本地交换关系的有益效果。
进一步的, 在第一网络设备基于本地交换关系对第二用户设备发送给第 一用户设备的第三 IP语音包进行本地转发的过程中, 还需要进行地址转换步 骤: 第一网络设备接收到第二用户设备发来的第三 IP语音包, 并查询到第二 用户设备对应的本地交换关系后, 若该第三 IP语音包的目的用户设备为第一 用户设备, 则基于第二用户设备的地址转换关系与第一用户设备的地址转换 关系进行地址转换, 第二用户设备的地址转换关系包括第一 IP地址和第一端 口以及第二 IP地址和第二端口对应关系, 第一用户设备的地址转换关系包括 第三 IP地址和第三端口以及第四 IP地址和第四端口对应关系 , 将第三 IP语 音包本地转发给第一用户设备。
进一步的, 同理, 在第一网络设备基于本地交换关系对第一用户设备发 送给第二用户设备的第四 IP语音包进行本地转发的过程中, 也需要进行地址 转换步骤:
第一网络设备接收到第一用户设备发来的第四 IP语音包, 并查询到第一 用户设备对应的本地交换关系后, 若该第四 IP语音包的目的用户设备为第二 用户设备, 则基于第一用户设备的地址转换关系与第二用户设备的地址转换 关系进行地址转换, 第一用户设备的地址转换关系包括第二 IP地址和第二端 口以及第一 IP地址和第一端口对应关系, 第二用户设备的地址转换关系包括 第四 IP地址和第四端口以及第三 IP地址和第三端口对应关系, 将第四 IP语 音包本地转发给第二用户设备。
在具体实施过程中,由于在 IP网络按照普通交换路径对 IP语音包传输时 要经过网关 NAT进行地址转换,因此当第一网络设备直接本地交换 IP语音包 时也要先进行地址转换, 所以在第一网络设备要记录第一用户设备与第二用 户设备之间的地址转换关系, 以便于当第一网络设备接收到第二用户设备发 来的第三 IP语音包并查询到本地交换关系后, 基于第二用户设备的地址转换 关系与第一用户设备的地址转换关系进行地址转换, 将第三 IP语音包的地址 转换为第一用户设备的地址后, 再本地转发给第一用户设备, 其中, 第二用 户设备的地址转换关系包括第一 IP地址和第一端口以及第二 IP地址和第二端 口对应关系, 第一用户设备的地址转换关系包括第三 IP地址和第三端口以及 第四 IP地址和第四端口对应关系。 或者当第一网络设备接收到第一用户设备 发来的第四 IP语音包并查询到本地交换关系后, 基于第一用户设备的地址转 换关系与第二用户设备的地址转换关系进行地址转换, 将第四 IP语音包的地 址转换为第二用户设备的地址后再本地转发给第二用户设备, 其中, 第一用 户设备的地址转换关系包括第二 IP地址和第二端口以及第一 IP地址和第一端 口对应关系, 第二用户设备的地址转换关系包括第四 IP地址和第四端口以及 第三 IP地址和第三端口对应关系。 这里的地址转换关系是在建立本地交换关 系之前建立的, 也就是在匹配多个 IP语音包的过程中, 当上游的第二网络设 备将第一 IP语音包成功从互联网中转发至该第一网络设备中的第一用户设备 的时, 说明第二网络设备已经对第一 IP语音包从发送端的地址转换为了第一 用户设备的地址了, 因此, 当第一 IP语音包的特征信息能够与第二用户设备 中保存的第二 IP语音包的特征信息相匹配时, 第一网络设备根据接收到的第 一 IP语音包的地址以及保存在本地的第二 IP语音包的地址,记录下第二网络 设备对这两个地址的转换方式, 作为地址转换关系保存在本地, 当建立本地 交换关系后, 就可以基于该地址转换关系将 IP语音包的地址转换为目的用户 设备的地址后, 转发给目的用户设备。 比如, 第一用户设备发送出去的第一
IP语音包的源地址 /端口是第一用户设备的原始地址 /端口, 如 10.0.0.1/5000, 而作为目的用户设备的第二用户设备端的地址应该是源地址转换后的地址, 如 200.1.1.1/9000, 因此, 在第一网络设备将第一用户设备发送的第一 IP语音 包直接本地交换给第二用户设备的时候, 要将 10.0.0.1/5000 转换为 200.1.1.1/9000再交换, 同理, 在将第二用户设备发送的 IP语音包直接本地交 换给第一用户设备的时候, 要将 200.1.1.1/9000转换为 10.0.0.1/5000。
基于同一发明构思, 本申请实施例还提供一种 IP语音本地交换的装置, 应用于第一网络设备, 如图 4所示, 该装置包括: 第一接收单元 100、 确定单 元 200和建立单元 300, 其中:
所述第一接收单元 100,用于接收到第二网络设备转发的第一 IP语音包, 其中, 所述第一 IP语音包的目的用户设备为第一用户设备;
所述确定单元 200, 用于根据所述第一 IP语音包的特征信息确定第二用 户设备发送的第二 IP语音包的特征信息与所述第一 IP语音包的特征信息相匹 配, 其中, 所述第一用户设备和所述第二用户设备都属于所述第一网络设备; 所述建立单元 300,用于为所述第二用户设备和所述第一用户设备建立本 地交换关系, 其中, 所述本地交换关系指示所述第二用户设备发送的 IP语音 包由所述第一网络设备本地转发给所述第一用户设备, 或者所述第一用户设 备发送的 IP语音包由所述第一网络设备本地转发给所述第二用户设备。
进一步的, 所述装置还包括:
第二接收单元, 用于接收所述第二用户设备发来的所述第二 IP语音包; 保存单元, 用于保存所述第二 IP语音包的特征信息,将所述第二 IP语音 包发送至所述第二网络设备。
进一步的, 所述建立单元 300, 还用于:
当所述第二 IP语音包的特征信息与所述第一 IP语音包的特征信息相匹配 时, 增加计数器的值;
确定所述计数器的值达到设定阔值, 其中, 当所述计数器的值达到所述 设定阔值时, 为所述第二用户设备和所述第一用户设备建立所述本地交换关 系。
进一步的, 所述装置还包括:
第三接收单元, 用于接收所述第二用户设备发来的第三 IP语音包; 第一转发单元, 用于查询到所述第二用户设备对应的所述本地交换关系 后, 将所述第三 IP语音包本地转发给所述本地交换关系指示的所述第一用户 设备;
第四接收单元, 用于接收所述第一用户设备发来的第四 IP语音包; 第二转发单元, 用于查询到所述第一用户设备对应的所述本地交换关系 后, 将所述第四 IP语音包本地转发给所述本地交换关系所指示的所述第二用 户设备。
进一步的, 所述第一转发单元, 用于:
查询到所述第二用户设备对应的所述本地交换关系后, 基于所述第二用 户设备的地址转换关系与所述第一用户设备的地址转换关系进行地址转换, 所述第二用户设备的地址转换关系包括第一 IP地址和第一端口以及第二 IP地 址和第二端口对应关系, 所述第一用户设备的地址转换关系包括第三 IP地址 和第三端口以及第四 IP地址和第四端口对应关系 , 将所述第三 IP语音包本 地转发给所述第一用户设备。
进一步的, 所述第二转发单元, 用于:
查询到所述第一用户设备对应的所述本地交换关系后, 基于所述第一用 户设备的地址转换关系与所述第二用户设备的地址转换关系进行地址转换, 所述第一用户设备的地址转换关系包括第二 IP地址和第二端口以及第一 IP地 址和第一端口对应关系, 所述第二用户设备的地址转换关系包括第四 IP地址 和第四端口以及第三 IP地址和第三端口对应关系 , 将所述第四 IP语音包本 地转发给所述第二用户设备。
进一步的, 所述特征信息, 包括:
IP语音包的实时传送协议 RTP序列号,和根据 IP语音包的净荷计算得到 的哈希值; 或者
IP语音包的实时传送协议 RTP序列号, 和 IP语音包的标签, 所述标签是 由所述装置接收到用户设备发送的 IP语音包后添加的, 其中, 所述 IP语音包 的标签由 RTP封装头中的至少一个编码字段组合而成, 用于标识所述第一网 络设备和所述用户设备。
进一步的, 所述确定单元 200, 用于:
确定所述第二 IP语音包的 RTP序列号与所述第一 IP语音包的 RTP序列 号相同,以及确定所述第二 IP语音包的哈希值与所述第一 IP语音包的哈希值 相同; 或者
确定所述第二 IP语音包的 RTP序列号与所述第一 IP语音包的 RTP序列 号相同 ,以及确定所述第二 IP语音包的标签与所述第一 IP语音包的标签相同。
在具体实施过程中, IP语音本地交换的装置用于实现上述 IP语音本地交 换的方法中,根据上述实施例对本申请提供的 IP语音本地交换的方法的描述, 该装置中各个部分的工作过程与上述方法的一个或多个实施例一致, 在此就 不一一赘述了。
基于同一发明构思, 本申请实施例还提供一种 IP语音本地交换的系统, 包括: 第一网络设备, 以及与所述第一网络设备连接的第二网络设备; 其中, 所述第一网络设备包括以上所述的 IP语音本地交换的装置。
基于同一发明构思, 本申请实施例还提供一种 IP语音本地交换的装置, 应用于第一网络设备, 所述装置包括:
接收器, 用于接收到第二网络设备转发的第一 IP语音包, 其中, 所述第 一 IP语音包的目的用户设备为第一用户设备;
处理器, 用于根据所述第一 IP语音包的特征信息确定第二用户设备发送 的第二 IP语音包的特征信息与所述第一 IP语音包的特征信息相匹配, 其中, 所述第一用户设备和所述第二用户设备都属于所述第一网络设备; 以及为所 述第二用户设备和所述第一用户设备建立本地交换关系, 其中, 所述本地交 换关系指示所述第二用户设备发送的 IP语音包由所述第一网络设备本地转发 给所述第一用户设备, 或者所述第一用户设备发送的 IP语音包由所述第一网 络设备本地转发给所述第二用户设备;
存储器, 用于存储本地交换关系, 以及存储所述 IP语音包的特征信息。 进一步的, 所述接收器, 还用于: 接收所述第二用户设备发送的所述第 二 IP语音包; 所述存储器, 还用于: 保存所述第二 IP语音包的特征信息;
所述装置, 还包括: 发送器, 用于将所述第二 IP语音包发送至所述第二 网络设备。
进一步的, 所述装置, 还包括: 计数器, 用于当所述第二 IP语音包的特 征信息与所述第一 IP语音包的特征信息相匹配时, 增加所述计数器的值; 所述处理器, 还用于: 确定所述计数器的值达到设定阔值, 其中, 当所 述计数器的值达到所述设定阔值时, 为所述第二用户设备和所述第一用户设 备建立所述本地交换关系。
进一步的, 所述接收器, 还用于: 在为所述第二用户设备和所述第一用 户设备建立本地交换关系之后 ,接收所述第二用户设备发来的第三 IP语音包; 所述处理器, 还用于: 查询到所述第二用户设备对应的所述本地交换关 系后, 控制所述发送器将所述第三 IP语音包本地转发给所述本地交换关系指 示的所述第一用户设备;
所述接收器, 还用于: 在为所述第二用户设备和所述第一用户设备建立 本地交换关系之后, 接收到所述第一用户设备发来的第四 IP语音包;
所述处理器, 还用于: 查询到所述第一用户设备对应的所述本地交换关 系后, 将所述第四 IP语音包本地转发给所述本地交换关系所指示的所述第二 用户设备。
进一步的, 所述处理器, 还用于: 查询到所述第二用户设备对应的所述本地交换关系后, 基于所述第二用 户设备的地址转换关系与所述第一用户设备的地址转换关系进行地址转换, 所述第二用户设备的地址转换关系包括第一 IP地址和第一端口以及第二 IP地 址和第二端口对应关系, 所述第一用户设备的地址转换关系包括第三 IP地址 和第三端口以及第四 IP地址和第四端口对应关系; 控制所述发送器将所述第 三 IP语音包本地转发给所述第一用户设备。
进一步的, 所述处理器, 还用于:
查询到所述第一用户设备对应的所述本地交换关系后, 基于所述第一用 户设备的地址转换关系与所述第二用户设备的地址转换关系进行地址转换, 所述第一用户设备的地址转换关系包括第二 IP地址和第二端口以及第一 IP地 址和第一端口对应关系, 所述第二用户设备的地址转换关系包括第四 IP地址 和第四端口以及第三 IP地址和第三端口对应关系; 控制所述发送器将所述第 四 IP语音包本地转发给所述第二用户设备。
进一步的, 所述特征信息, 包括: IP语音包的实时传送协议 RTP序列号,和根据 IP语音包的净荷计算得到 的哈希值; 或者
IP语音包的实时传送协议 RTP序列号, 和 IP语音包的标签, 所述标签是 由所述第一网络设备接收到用户设备发送的 IP语音包后添加的, 其中, 所述 标签由 RTP封装头中的至少一个编码字段组合而成, 用于标识所述第一网络 设备和所述用户设备。
进一步的, 所述处理器, 还用于:
确定所述第二 IP语音包的 RTP序列号与所述第一 IP语音包的 RTP序列 号相同,以及确定所述第二 IP语音包的哈希值与所述第一 IP语音包的哈希值 相同; 或者
确定所述第二 IP语音包的 RTP序列号与所述第一 IP语音包的 RTP序列 号相同 ,以及确定所述第二 IP语音包的标签与所述第一 IP语音包的标签相同。
在具体实施过程中,该 IP语音本地交换的装置与第一套 IP语音本地交换 的装置是基于同一个发明构思,同样用于实现上述 IP语音本地交换的方法中, 根据上述实施例对本申请提供的 IP语音本地交换的方法的描述, 该装置中各 个部分的工作过程与上述方法的一个或多个实施例一致, 在此就不——赘述 了。
本申请实施例中提供的一个或多个技术方案, 至少具有如下技术效果或 优点:
由于在本申请实施例中, 当第一用户与第二用户都属于第一网络设备时 , 在第一网络设备接收到第二网络设备转发来的目的用户为第一用户的 IP语音 包时,釆取根据该 IP语音包的特征信息与已保存的用户发送的 IP语音包的特 征信息相匹配, 如果确定该 IP语音包的特征信息能与已保存的第二用户发送 的 IP语音包的特征信息匹配上, 则为第二用户与第一用户之间建立本地交换 关系, 其中, 在本地交换关系中指示第二用户与第一用互相作为对方的目的 用户, 当下一次第二用户与第一用户之间要进行 IP语音包发送时, 第一网络 设备可以基于该本地交换关系对 IP语音包直接本地转发, 解决了当两个用户 处于同一个网络设备时, 现有的 IP语音交换方式存在的浪费网络资源的技术 问题, 实现了为连接在同一个网络设备下的两个用户建立本地交换关系以便 于该两个用户之间再交换 IP语音包时能够直接进行本地交换, 节约了网络资 源。
本领域普通技术人员可以意识到, 结合本文中所公开的实施例描述的各 示例的单元及算法步骤, 能够以电子硬件、 计算机软件或者二者的结合来实 现, 为了清楚地说明硬件和软件的可互换性, 在上述说明中已经按照功能一 般性地描述了各示例的组成及步骤。 这些功能究竟以硬件还是软件方式来执 行, 取决于技术方案的特定应用和设计约束条件。 专业技术人员可以对每个 特定的应用来使用不同方法来实现所描述的功能, 但是这种实现不应认为超 出本发明的范围。
所属领域的技术人员可以清楚地了解到, 为描述的方便和简洁, 上述描 述的系统、 装置和单元的具体工作过程, 可以参考前述方法实施例中的对应 过程, 在此不再赘述。
在本申请所提供的几个实施例中, 应该理解到, 所揭露的系统、 装置和 方法, 可以通过其它的方式实现。 例如, 以上所描述的装置实施例仅仅是示 意性的, 例如, 所述单元的划分, 仅仅为一种逻辑功能划分, 实际实现时可 以有另外的划分方式, 例如多个单元或组件可以结合或者可以集成到另一个 系统, 或一些特征可以忽略, 或不执行。 另一点, 所显示或讨论的相互之间 的耦合或直接耦合或通信连接可以是通过一些接口, 装置或单元的间接耦合 或通信连接, 可以是电性, 机械或其它的形式。 为单元显示的部件可以是或者也可以不是物理单元, 即可以位于一个地方, 或者也可以分布到多个网络单元上。 可以根据实际的需要选择其中的部分或 者全部单元来实现本实施例方案的目的。
另外, 在本发明各个实施例中的各功能单元可以集成在一个处理单元中, 也可以是各个单元单独物理存在, 也可以两个或两个以上单元集成在一个单 元中。 上述集成的单元既可以釆用硬件的形式实现, 也可以釆用软件功能单 元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售 或使用时, 可以存储在一个计算机可读取存储介质中。 基于这样的理解, 本 发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的 全部或部分可以以软件产品的形式体现出来, 该计算机软件产品存储在一个 存储介质中, 包括若干指令用以使得一台计算机设备(可以是个人计算机, 服务器, 或者网络设备等)执行本发明各个实施例所述方法的全部或部分步 骤。 而前述的存储介质包括: U盘、移动硬盘、只读存储器(ROM, Read-Only Memory )、 随机存取存者器( RAM, Random Access Memory ), 磁碟或者光盘 等各种可以存储程序代码的介质。
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围并不局限 于此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可轻易 想到变化或替换, 都应涵盖在本发明的保护范围之内。 因此, 本发明的保护 范围应所述以权利要求的保护范围为准。

Claims

权 利 要 求
1、 一种 IP语音本地交换的方法, 其特征在于, 包括:
第一网络设备接收第二网络设备转发的第一 IP语音包, 其中, 所述第一 IP语音包的目的用户设备为第一用户设备;
根据所述第一 IP语音包的特征信息确定第二用户设备发送的第二 IP语音 包的特征信息与所述第一 IP语音包的特征信息相匹配, 其中, 所述第一用户 设备和所述第二用户设备都属于所述第一网络设备;
为所述第二用户设备和所述第一用户设备建立本地交换关系, 其中, 所 述本地交换关系指示所述第二用户设备发送的 IP语音包由所述第一网络设备 本地转发给所述第一用户设备, 或者所述第一用户设备发送的 IP语音包由所 述第一网络设备本地转发给所述第二用户设备。
2、 如权利要求 1所述的方法, 其特征在于, 在所述第一网络设备接收第 二网络设备转发来的第一 IP语音包之前, 所述方法还包括:
所述第一网络设备接收所述第二用户设备发送的所述第二 IP语音包; 保存所述第二 IP语音包的特征信息,将所述第二 IP语音包发送至所述第 二网络设备。
3、 如权利要求 1所述的方法, 其特征在于, 在所述为所述第二用户设备 和所述第一用户设备建立本地交换关系之前, 所述方法还包括:
当所述第二 IP语音包的特征信息与所述第一 IP语音包的特征信息相匹配 时, 增加计数器的值;
确定所述计数器的值达到设定阔值, 其中, 当所述计数器的值达到所述 设定阔值时, 为所述第二用户设备和所述第一用户设备建立所述本地交换关 系。
4、 如权利要求 1所述的方法, 其特征在于, 在所述为所述第二用户设备 和所述第一用户设备建立本地交换关系之后, 所述方法还包括:
所述第一网络设备接收所述第二用户设备发来的第三 IP语音包, 并且查 询到所述第二用户设备对应的所述本地交换关系后, 将所述第三 IP语音包本 地转发给所述本地交换关系指示的所述第一用户设备; 或者
所述第一网络设备接收到所述第一用户设备发来的第四 IP语音包, 并且 查询到所述第一用户设备对应的所述本地交换关系后, 将所述第四 IP语音包 本地转发给所述本地交换关系所指示的所述第二用户设备。
5、 如权利要求 4所述的方法, 其特征在于, 所述查询到所述第二用户设 备对应的所述本地交换关系后, 将所述第三 IP语音包本地转发给所述本地交 换关系指示出的所述第一用户设备, 包括:
查询到所述第二用户设备对应的所述本地交换关系后, 基于所述第二用 户设备的地址转换关系与所述第一用户设备的地址转换关系进行地址转换, 所述第二用户设备的地址转换关系包括第一 IP地址和第一端口以及第二 IP地 址和第二端口对应关系, 所述第一用户设备的地址转换关系包括第三 IP地址 和第三端口以及第四 IP地址和第四端口对应关系;
将所述第三 IP语音包本地转发给所述第一用户设备。
6、 如权利要求 4所述的方法, 其特征在于, 所述查询到所述第一用户设 备对应的所述本地交换关系后, 将所述第四 IP语音包本地转发给所述本地交 换关系所指示出的所述第二用户设备, 包括:
查询到所述第一用户设备对应的所述本地交换关系后, 基于所述第一用 户设备的地址转换关系与所述第二用户设备的地址转换关系进行地址转换, 所述第一用户设备的地址转换关系包括第二 IP地址和第二端口以及第一 IP地 址和第一端口对应关系, 所述第二用户设备的地址转换关系包括第四 IP地址 和第四端口以及第三 IP地址和第三端口对应关系;
将所述第四 IP语音包本地转发给所述第二用户设备。
7、 如权利要求 1-6中任一权项所述的方法, 其特征在于, 所述特征信息, 包括:
IP语音包的实时传送协议 RTP序列号,和根据 IP语音包的净荷计算得到 的哈希值; 或者 IP语音包的实时传送协议 RTP序列号, 和 IP语音包的标签, 所述标签是 由所述第一网络设备接收到用户设备发送的 IP语音包后添加的, 其中, 所述 标签由 RTP封装头中的至少一个编码字段组合而成, 用于标识所述第一网络 设备和所述用户设备。
8、 如权利要求 7所述的方法, 其特征在于, 所述确定第二用户设备发送 的第二 IP语音包的特征信息与所述第一 IP语音包的特征信息相匹配, 包括: 确定所述第二 IP语音包的 RTP序列号与所述第一 IP语音包的 RTP序列 号相同,以及确定所述第二 IP语音包的哈希值与所述第一 IP语音包的哈希值 相同; 或者
确定所述第二 IP语音包的 RTP序列号与所述第一 IP语音包的 RTP序列 号相同 ,以及确定所述第二 IP语音包的标签与所述第一 IP语音包的标签相同。
9、 一种 IP语音本地交换的装置, 应用于第一网络设备, 其特征在于, 所 述装置包括: 第一接收单元、 确定单元和建立单元, 其中:
所述第一接收单元, 用于接收到第二网络设备转发的第一 IP语音包, 其 中, 所述第一 IP语音包的目的用户设备为第一用户设备;
所述确定单元, 用于根据所述第一 IP语音包的特征信息确定第二用户设 备发送的第二 IP语音包的特征信息与所述第一 IP语音包的特征信息相匹配, 其中, 所述第一用户设备和所述第二用户设备都属于所述第一网络设备; 所述建立单元, 用于为所述第二用户设备和所述第一用户设备建立本地 交换关系, 其中, 所述本地交换关系指示所述第二用户设备发送的 IP语音包 由所述第一网络设备本地转发给所述第一用户设备, 或者所述第一用户设备 发送的 IP语音包由所述第一网络设备本地转发给所述第二用户设备。
10、 如权利要求 9所述的装置, 其特征在于, 所述装置还包括: 第二接收单元, 用于接收所述第二用户设备发来的所述第二 IP语音包; 保存单元, 用于保存所述第二 IP语音包的特征信息,将所述第二 IP语音 包发送至所述第二网络设备。
11、 如权利要求 9所述的装置, 其特征在于, 所述建立单元, 还用于: 当所述第二 IP语音包的特征信息与所述第一 IP语音包的特征信息相匹配 时, 增加计数器的值;
确定所述计数器的值达到设定阔值, 其中, 当所述计数器的值达到所述 设定阔值时, 为所述第二用户设备和所述第一用户设备建立所述本地交换关 系。
12、 如权利要求 9所述的装置, 其特征在于, 所述装置还包括: 第三接收单元, 用于接收所述第二用户设备发来的第三 IP语音包; 第一转发单元, 用于查询到所述第二用户设备对应的所述本地交换关系 后, 将所述第三 IP语音包本地转发给所述本地交换关系指示的所述第一用户 设备;
第四接收单元, 用于接收所述第一用户设备发来的第四 IP语音包; 第二转发单元, 用于查询到所述第一用户设备对应的所述本地交换关系 后, 将所述第四 IP语音包本地转发给所述本地交换关系所指示的所述第二用 户设备。
13、如权利要求 12所述的装置, 其特征在于, 所述第一转发单元, 用于: 查询到所述第二用户设备对应的所述本地交换关系后, 基于所述第二用 户设备的地址转换关系与所述第一用户设备的地址转换关系进行地址转换, 所述第二用户设备的地址转换关系包括第一 IP地址和第一端口以及第二 IP地 址和第二端口对应关系, 所述第一用户设备的地址转换关系包括第三 IP地址 和第三端口以及第四 IP地址和第四端口对应关系 , 将所述第三 IP语音包本 地转发给所述第一用户设备。
14、如权利要求 12所述的装置, 其特征在于, 所述第二转发单元, 用于: 查询到所述第一用户设备对应的所述本地交换关系后, 基于所述第一用 户设备的地址转换关系与所述第二用户设备的地址转换关系进行地址转换, 所述第一用户设备的地址转换关系包括第二 IP地址和第二端口以及第一 IP地 址和第一端口对应关系, 所述第二用户设备的地址转换关系包括第四 IP地址 和第四端口以及第三 IP地址和第三端口对应关系 , 将所述第四 IP语音包本 地转发给所述第二用户设备。
15、 如权利要求 9-14中任一权项所述的装置, 其特征在于, 所述特征信 息, 包括:
IP语音包的实时传送协议 RTP序列号,和根据 IP语音包的净荷计算得到 的哈希值; 或者
IP语音包的实时传送协议 RTP序列号, 和 IP语音包的标签, 所述标签是 由所述装置接收到用户设备发送的 IP语音包后添加的, 其中, 所述 IP语音包 的标签由 RTP封装头中的至少一个编码字段组合而成, 用于标识所述第一网 络设备和所述用户设备。
16、 如权利要求 15所述的装置, 其特征在于, 所述确定单元, 用于: 确定所述第二 IP语音包的 RTP序列号与所述第一 IP语音包的 RTP序列 号相同,以及确定所述第二 IP语音包的哈希值与所述第一 IP语音包的哈希值 相同; 或者
确定所述第二 IP语音包的 RTP序列号与所述第一 IP语音包的 RTP序列 号相同 ,以及确定所述第二 IP语音包的标签与所述第一 IP语音包的标签相同。
17、 一种 IP语音本地交换的系统, 其特征在于, 包括:
第一网络设备, 以及与所述第一网络设备连接的第二网络设备; 其中,所述第一网络设备包括如权利要求 9-16中任一权项所述的 IP语音 本地交换的装置。
PCT/CN2014/071503 2014-01-26 2014-01-26 一种ip语音本地交换的方法、装置及系统 WO2015109575A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2014/071503 WO2015109575A1 (zh) 2014-01-26 2014-01-26 一种ip语音本地交换的方法、装置及系统
CN201480000452.8A CN104995985B (zh) 2014-01-26 2014-01-26 一种ip语音本地交换的方法、装置及系统

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2014/071503 WO2015109575A1 (zh) 2014-01-26 2014-01-26 一种ip语音本地交换的方法、装置及系统

Publications (1)

Publication Number Publication Date
WO2015109575A1 true WO2015109575A1 (zh) 2015-07-30

Family

ID=53680677

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/071503 WO2015109575A1 (zh) 2014-01-26 2014-01-26 一种ip语音本地交换的方法、装置及系统

Country Status (2)

Country Link
CN (1) CN104995985B (zh)
WO (1) WO2015109575A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115811570B (zh) * 2023-01-27 2023-08-18 荣耀终端有限公司 Ims通话语音质量测试方法及系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101159905A (zh) * 2007-11-07 2008-04-09 华为技术有限公司 基站控制器内实现本地交换方法、核心网设备及网络系统
EP2059087A1 (en) * 2007-11-06 2009-05-13 Nokia Siemens Networks S.p.A. Method for establishing circuit switched calls in a mobile radio network and mobile radio network
CN101790246A (zh) * 2009-01-23 2010-07-28 华为技术有限公司 一种本地交换的方法、装置和系统
CN101815358A (zh) * 2009-02-24 2010-08-25 鼎桥通信技术有限公司 一种用户设备之间的数据传输方法

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8818322B2 (en) * 2006-06-09 2014-08-26 Trapeze Networks, Inc. Untethered access point mesh system and method
CN101800911B (zh) * 2009-02-06 2012-10-17 华为技术有限公司 实现本地交换的方法及系统
CN102281187A (zh) * 2010-06-11 2011-12-14 中兴通讯股份有限公司 一种实现本地交换传输的系统及方法、基站

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2059087A1 (en) * 2007-11-06 2009-05-13 Nokia Siemens Networks S.p.A. Method for establishing circuit switched calls in a mobile radio network and mobile radio network
CN101159905A (zh) * 2007-11-07 2008-04-09 华为技术有限公司 基站控制器内实现本地交换方法、核心网设备及网络系统
CN101790246A (zh) * 2009-01-23 2010-07-28 华为技术有限公司 一种本地交换的方法、装置和系统
CN101815358A (zh) * 2009-02-24 2010-08-25 鼎桥通信技术有限公司 一种用户设备之间的数据传输方法

Also Published As

Publication number Publication date
CN104995985A (zh) 2015-10-21
CN104995985B (zh) 2019-08-27

Similar Documents

Publication Publication Date Title
US11356294B2 (en) Packet processing method and device
WO2007073696A1 (fr) Procede, appareil et systeme pour acces sans fil
WO2008022596A1 (fr) Procédé, système et appareil pour la remise de sms en mode de partage dynamique
WO2016173076A1 (zh) 一种数据中转传输方法、系统和具备中继功能的ue
US9332094B2 (en) Communication system and method
KR20180014031A (ko) 서비스 레이트를 위한 조정 방법 및 디바이스
TWI543565B (zh) 封包重傳的方法、使用此方法的資料伺服器及封包重傳系統
JP2002185555A (ja) 通信方式および方法ならびに交換ノード
WO2021103016A1 (zh) 报文传输方法、通信装置和通信系统
US20150381696A1 (en) Bonding of Multiple Concurrent Data Streams Among Multiple Devices
WO2014067486A1 (zh) 一种报文转发的方法及相应设备
US7436817B2 (en) Call clearing for legacy mobile circuit switched domain wireless systems
WO2015070377A1 (zh) 一种多方通话方法及装置
WO2014121606A1 (zh) 业务处理方法和相关设备
CN104105222B (zh) 建立通信
US8031697B2 (en) Method for bearer independent call control (BICC) optimization for IP bearer support
WO2020147091A1 (zh) 无线通信的方法和设备
WO2015109575A1 (zh) 一种ip语音本地交换的方法、装置及系统
WO2012088830A1 (zh) 一种通信方法、消息处理方法及系统
WO2011000291A1 (zh) 关联sip会话中rtp包的方法、装置及系统
WO2012003771A1 (zh) 一种环形组网中数据传输的方法及系统
WO2010028600A1 (zh) 用户面数据传输的方法和网络系统
WO2015085741A1 (zh) 一种切换方法、源基站、目标基站、系统、存储介质
WO2017210824A1 (zh) 集群业务数据传输、控制方法、装置和设备
WO2017177356A1 (zh) 数据传输的方法、基站和用户设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14879374

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14879374

Country of ref document: EP

Kind code of ref document: A1