CN112217766B - Method and device for forwarding RTP data packet - Google Patents

Method and device for forwarding RTP data packet Download PDF

Info

Publication number
CN112217766B
CN112217766B CN201910621456.2A CN201910621456A CN112217766B CN 112217766 B CN112217766 B CN 112217766B CN 201910621456 A CN201910621456 A CN 201910621456A CN 112217766 B CN112217766 B CN 112217766B
Authority
CN
China
Prior art keywords
calling
information
protocol
called
equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910621456.2A
Other languages
Chinese (zh)
Other versions
CN112217766A (en
Inventor
李赛
温天斗
万修龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nokia Solutions and Networks Oy
Original Assignee
Nokia Solutions and Networks Oy
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 Nokia Solutions and Networks Oy filed Critical Nokia Solutions and Networks Oy
Priority to CN201910621456.2A priority Critical patent/CN112217766B/en
Publication of CN112217766A publication Critical patent/CN112217766A/en
Application granted granted Critical
Publication of CN112217766B publication Critical patent/CN112217766B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management
    • H04L65/1069Session establishment or de-establishment
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management
    • H04L65/1101Session protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management
    • H04L65/1101Session protocols
    • H04L65/1104Session initiation protocol [SIP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/65Network streaming protocols, e.g. real-time transport protocol [RTP] or real-time control protocol [RTCP]
    • 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/80Responding to QoS
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q11/00Selecting arrangements for multiplex systems
    • H04Q11/0001Selecting arrangements for multiplex systems using optical switching
    • H04Q11/0005Switch and router aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q11/00Selecting arrangements for multiplex systems
    • H04Q11/0001Selecting arrangements for multiplex systems using optical switching
    • H04Q11/0062Network aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q11/00Selecting arrangements for multiplex systems
    • H04Q11/0001Selecting arrangements for multiplex systems using optical switching
    • H04Q11/0062Network aspects
    • H04Q2011/0084Quality of service aspects

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a method for forwarding RTP data packets in an optical network terminal, which comprises the following steps: receiving first calling information from calling equipment, negotiating with called equipment based on the first calling information, and obtaining second calling information from the called equipment; extracting first parameter information of the calling device from the first calling information, extracting second parameter information of the called device from the second calling information, and generating a network address translation rule and a routing rule according to the first parameter information and the second parameter information; sending the second parameter information to the calling equipment; receiving RTP data packet from the calling device, and forwarding the RTP data packet to the called device according to the network address conversion rule and the routing rule. According to the scheme of the application, the RTP data packet forwarding for the IP-based call can be realized in the optical network terminal.

Description

Method and device for forwarding RTP data packet
Technical Field
The present application relates to the field of communications technologies, and in particular, to a technical scheme for forwarding RTP packets.
Background
In the prior art, a Local Area Network (LAN) side device may be connected to an Optical Network Terminal (ONT) through a Wireless Fidelity (WiFi), and the LAN side device may obtain a private IP (Internet Protocol) address from the ONT and send a data stream thereof to the ONT, so as to forward the data stream to a Wide Area Network (WAN) through the ONT. The ONT generally has a plurality of WAN interfaces to connect different networks, such as the Internet, a VoIP (Voice over Internet Protocol) network, etc., however, since the LAN-side device has only one private IP address, the ONT cannot directly forward RTP packets from the LAN-side device to a remote-side device (such as a terminal device in the VoIP network), and also cannot directly forward RTP packets from the remote-side device to the LAN-side device, and therefore, an IP-based call between the LAN-side device and the remote party cannot be directly realized based on the existing ONT.
Disclosure of Invention
The purpose of the present application is to provide a technical solution for forwarding RTP packets.
According to an embodiment of the present application, a method for forwarding an RTP packet in an optical network terminal is provided, wherein the method includes:
receiving first calling information from calling equipment, negotiating with called equipment based on the first calling information, and obtaining second calling information from the called equipment;
extracting first parameter information of the calling device from the first calling information, extracting second parameter information of the called device from the second calling information, and generating a network address translation rule and a routing rule according to the first parameter information and the second parameter information;
sending the second parameter information to the calling equipment;
and receiving an RTP data packet from the calling device, and forwarding the RTP data packet to the called device according to the network address conversion rule and the routing rule.
According to another embodiment of the present application, there is also provided a method for forwarding an RTP packet, where the method includes:
the method comprises the steps that calling equipment generates first calling information and sends the first calling information to an optical network terminal;
the optical network terminal receives the first call information from the call equipment;
the optical network terminal negotiates with called equipment based on the first call information to obtain second call information from the called equipment;
the optical network terminal extracts first parameter information of the calling equipment from the first calling information, extracts second parameter information of the called equipment from the second calling information, and generates a network address conversion rule and a routing rule according to the first parameter information and the second parameter information;
the optical network terminal sends the second parameter information to the calling equipment;
the calling equipment receives the second parameter information;
the calling equipment generates an RTP data packet for calling the called equipment according to the first parameter information and the second parameter information of the calling equipment, and sends the RTP data packet to the optical network terminal;
and the optical network terminal receives the RTP data packet from the calling equipment and forwards the RTP data packet to the called equipment according to the network address conversion rule and the routing rule.
According to another embodiment of the present application, there is also provided an apparatus for forwarding an RTP packet in an optical network terminal, wherein the apparatus includes:
the device comprises a calling device, a called device and a communication device, wherein the calling device is used for receiving first calling information from the calling device and negotiating with the called device based on the first calling information to obtain second calling information from the called device;
means for extracting first parameter information of the calling device from the first call information, extracting second parameter information of the called device from the second call information, and generating a network address translation rule and a routing rule according to the first parameter information and the second parameter information;
means for sending the second parameter information to the calling device;
and means for receiving RTP packets from the calling device, and forwarding the RTP packets to the called device according to the NAT rules and routing rules.
According to another embodiment of the present application, there is also provided an optical network terminal, where the optical network terminal includes the apparatus for forwarding an RTP packet described in the present application.
According to another embodiment of the present application, there is also provided a system for forwarding an RTP packet, where the system includes the optical network terminal, the calling device, and the called device described in the present application.
According to another embodiment of the present application, there is also provided an optical network terminal, where the optical network terminal includes:
a memory for storing one or more programs;
one or more processors coupled to the memory,
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the operations of:
receiving first calling information from calling equipment, negotiating with called equipment based on the first calling information, and obtaining second calling information from the called equipment;
extracting first parameter information of the calling device from the first calling information, extracting second parameter information of the called device from the second calling information, and generating a network address translation rule and a routing rule according to the first parameter information and the second parameter information;
sending the second parameter information to the calling equipment;
receiving RTP data packet from the calling device, and forwarding the RTP data packet to the called device according to the network address conversion rule and the routing rule.
According to another embodiment of the present application, there is also provided a computer-readable storage medium having a computer program stored thereon, the computer program being executable by a processor to:
receiving first calling information from calling equipment, negotiating with called equipment based on the first calling information, and obtaining second calling information from the called equipment;
extracting first parameter information of the calling device from the first calling information, extracting second parameter information of the called device from the second calling information, and generating a network address translation rule and a routing rule according to the first parameter information and the second parameter information;
sending the second parameter information to the calling equipment;
receiving RTP data packet from the calling device, and forwarding the RTP data packet to the called device according to the network address conversion rule and the routing rule.
Compared with the prior art, the method has the following advantages: in the initial stage of calling, the optical network terminal can extract first parameter information of the calling device from the first calling information, extract second parameter information of the called device from the second calling information, and generate a network address conversion rule and a routing rule according to the first parameter information and the second parameter information so as to realize the forwarding of an RTP data packet in the optical network terminal, thereby realizing audio or video calling between LAN side equipment and WAN side remote party equipment through the optical network terminal; furthermore, the LAN side device can forward the data stream to the internet VLan while forwarding the RTP packet for the call to the VLan (such as VoIP VLan) to which the remote side device belongs; the scheme does not require the LAN side equipment to support SIP, namely does not limit the LAN side equipment, and the optical network terminal does not need to encode and decode the RTP data packet, but only needs to forward the received RTP data packet, thereby saving the resources on the optical network terminal, even the optical network terminal does not need DSP (Digital Signal Processing), thereby saving the hardware cost; in addition, the scheme has better QoS (Quality of Service) optimization for audio or video calls, and can realize better voice Quality.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
fig. 1 is a schematic flowchart of a method for forwarding an RTP packet in an optical network terminal according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a system and method for forwarding RTP packets according to an embodiment of the present application;
fig. 3 is a schematic diagram of a system architecture for forwarding RTP packets according to an example of the present application;
fig. 4 is a schematic structural diagram of an apparatus for forwarding an RTP packet in an optical network terminal according to an embodiment of the present application.
The same or similar reference numbers in the drawings identify the same or similar elements.
Detailed Description
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the operations as a sequential process, many of the operations can be performed in parallel, concurrently, or simultaneously. In addition, the order of the operations may be re-arranged. The process may be terminated when its operations are completed, but could have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
The methods discussed later herein, some of which are illustrated by flow diagrams, may be implemented by hardware, software, firmware, middleware, microcode, hardware description languages, or any combination thereof. When implemented in software, firmware, middleware or microcode, the program code or code segments to perform the necessary tasks may be stored in a machine or computer readable medium such as a storage medium. The processor(s) may perform the necessary tasks.
Specific structural and functional details disclosed herein are merely representative and are provided for purposes of describing example embodiments of the present application. This application may, however, be embodied in many alternate forms and should not be construed as limited to only the embodiments set forth herein.
It will be understood that, although the terms first, second, etc. may be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, a first element could be termed a second element, and, similarly, a second element could be termed a first element, without departing from the scope of example embodiments. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of example embodiments. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used herein, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be noted that, in some alternative implementations, the functions/acts noted may occur out of the order noted in the figures. For example, two figures shown in succession may, in fact, be executed substantially concurrently, or the figures may sometimes be executed in the reverse order, depending upon the functionality/acts involved.
Before describing the scheme of the present application in detail, it should be noted that the present application is applicable to a scenario where an audio call or a video call is performed based on IP (e.g., a scenario where a LAN-side device makes a VoIP call), that is, the RTP packet described in the present application refers to an RTP packet during an audio call or a video call based on IP. The scheme of the application relates to an optical network terminal, LAN side equipment and WAN side remote side equipment, wherein the optical network terminal refers to network equipment which carries out transmission through an optical fiber medium and modulates and demodulates optical signals into other Protocol signals, the LAN side equipment is connected to the optical network terminal through WiFi, the optical network terminal is provided with a LAN side interface for connecting the LAN side equipment and a plurality of WAN interfaces for connecting a plurality of networks, and the optical network terminal is connected to a network to which the remote side equipment belongs through corresponding WAN interfaces thereof (the network to which the remote side equipment belongs in the application comprises any network which supports IP-based audio and/or video calls, such as a VoIP network, an IPTV (Internet Protocol Television) network or other networks which may appear in the future); in some embodiments, the LAN-side device has the capability of encoding/decoding RTP packets, but does not support SIP (Session Initiation Protocol). It should be further noted that, in this context, a calling device refers to a device that initiates a call, a called device refers to a device that is called, and both the calling device and the called device support an IP-based audio call or a video call; in some embodiments, the calling device is a LAN side device, such as an AI (intelligent speaker), a soft phone, etc., and the called device is a WAN side remote device, such as a terminal device located in a VoIP VLan (Virtual Local Area Network), a terminal device located in an IPTV Network, etc.; in other embodiments, the calling device is a WAN-side remote device and the called device is a LAN-side device. It should be noted that the above-mentioned LAN side device, remote side device, network, etc. are only examples, and are not intended to limit the present application, and any existing or later-appearing LAN side device, remote side device, network, etc. should be included in the scope of protection of the present application.
The present application is described in further detail below with reference to the attached drawing figures.
Fig. 1 is a schematic flowchart of a method for forwarding an RTP packet in an optical network terminal according to an embodiment of the present application. The method includes step S11, step S12, step S13, and step S14.
In step S11, the optical network terminal receives first call information from the calling device, and negotiates with the called device based on the first call information to obtain second call information from the called device.
The first call information includes first parameter information of the calling device for calling, and preferably, the first parameter information includes an IP address, a port, and a codec of the calling device, such as an audio IP, an audio port, and an audio codec used when the calling device initiates an audio call, and also such as a video IP, a video port, and a video codec used when the calling device initiates a video call; and the source address in the first calling information is the IP address of the calling equipment, and the destination address in the first calling information is the IP address of the called equipment. As an example, the calling device is a LAN side device, the called device is a remote side device on a WAN side, a source address in the first call information from the LAN side device is a private IP address of the LAN side device, and a destination address is an IP address of the remote side device. As another example, the calling device is a remote party device on a WAN side, the called device is a LAN side device, a source address in the first call information from the remote party device is an IP address of the remote party device, and a destination address is a private IP address of the LAN side device. In some embodiments, the first call information further includes behavior indication information of the calling device, where the behavior indication information is used to indicate whether the behavior of the calling device is a calling behavior.
Wherein the second call information includes second parameter information of the called device for the call, preferably, the second parameter information includes an IP address, a port and a codec of the called device, such as an audio IP, an audio port and an audio codec of the called device for the audio call, and further such as a video IP, a video port and a video codec of the called device for the video call. And the source address in the second calling information is the IP address of the called equipment, and the destination address in the second calling information is the public IP address of the optical network terminal.
The first call information is transmitted between the calling equipment and the optical network terminal based on a first protocol, and the optical network terminal receives the first call information from the calling equipment based on the first protocol. And the optical network terminal and the called equipment negotiate and transmit the second call information based on a second protocol. In some embodiments, the first protocol and the second protocol are different. In some embodiments, if the calling device is a LAN side device, the first protocol is a private control protocol and the second protocol is a SIP protocol; if the calling device is WAN side equipment, the first protocol is an SIP protocol, and the second protocol is a private control protocol.
In some embodiments, the negotiating with the called device based on the first call information, the obtaining second call information from the called device includes: the optical network terminal converts the first call information into a session request message based on the second protocol, the source address in the converted data packet is the public IP address of the optical network terminal, and the destination address is the IP address of the called device, then the optical network terminal sends the session request message based on the second protocol to the called device, and the called device feeds back the second call information based on the second protocol to the optical network terminal after receiving the session request message. As an example, the calling device is an intelligent speaker located on the LAN side, the called device is a remote party device in the VoIP VLan, the intelligent speaker sends first call information to the optical network terminal based on a private control protocol, the source address of the first call information is a private IP address of the intelligent speaker, and the destination address is an IP address of the remote party device; after receiving the first call information, the optical network terminal converts the first call information into a session request message based on an SIP protocol, and sends the session request message to remote party equipment in a VoIP network through a VoIP Wan interface, wherein a source address of the session request message is a public IP address of the optical network terminal and a destination address is an IP address of the remote party equipment; the remote party equipment receives the session request message, generates second call information based on a second protocol according to the session request message, and feeds the second call information back to the optical network terminal, wherein the second call information comprises an IP address, a port and a coder-decoder of the remote party equipment, and a source address of the second call information is the IP address of the remote party equipment and a destination address is a public IP address of the optical network terminal.
In some embodiments, the first call information includes behavior indication information of the calling device, and the step of receiving the first call information from the calling device and negotiating with the called device based on the first call information to obtain the second call information from the called device includes: receiving first call information from the calling device, and extracting behavior indication information of the calling device from the first call information; and when the behavior indication information is used for indicating calling behavior, negotiating with the called device based on the first calling information, and obtaining second calling information from the called device. In some embodiments, when the behavior indicated by the behavior indication information is not a call behavior (as the behavior indication information is used to indicate an access behavior), the optical network terminal performs a corresponding processing operation based on the behavior indicated by the behavior indication information, which is not described in detail herein.
It should be noted that, the implementation manner of sending the first call information to the optical network terminal by the calling device will be described in detail in the following embodiments, and details are not described herein again.
It should be noted that, the foregoing examples are only for better illustrating the technical solutions of the present application, and not for limiting the present application, and those skilled in the art should understand that any implementation manner of receiving the first call information from the calling device and negotiating with the called device based on the first call information to obtain the second call information from the called device should be included in the scope of the present application.
In step S12, the optical Network terminal extracts first parameter information of the calling device from the first call information, extracts second parameter information of the called device from the second call information, and generates a Network Address Translation (NAT) rule and a routing rule according to the first parameter information and the second parameter information.
In some embodiments, the optical network terminal extracts first parameter information of the call device from the first call information (preferably, extracts the first parameter information from a body in the first call information) based on a data format defined by the first protocol, for example, the call device is a LAN-side device, and the optical network terminal extracts a private IP address, an audio port (or a video port), and an audio codec (or a video codec) of the LAN-side device from the first call information based on a data format defined by a private control protocol provided by a service provider of the LAN-side device. As an example, the calling device is an intelligent speaker located on the LAN side, the called device is a remote party device in the VoIP VLan, the first protocol is a private control protocol, and the second protocol is an SIP protocol, and the optical network terminal extracts the following information "spoke _ ip" from the first call information from the intelligent speaker based on a data format defined by the private control protocol: 192.168.1.100; spaker _ port:1000", where spear _ IP represents the private IP address of the speaker and spear _ port represents the private port of the speaker for audio or video calls, and based on the extracted information, the private IP address of the speaker is 192.168.1.100 and the private port of the speaker for audio or video calls is 1000.
In some embodiments, the onu extracts the second parameter information of the called device from the second call information (preferably, extracts the second parameter information from a body in the second call information) based on a data format defined by the second protocol, for example, the called device is a remote party device, and the onu extracts an IP address, an audio port (or a video port), and an audio codec (or a video codec) of the remote party device from the second call information based on a data format defined by the SIP protocol. As an example, based on the data format defined by the SIP protocol, the optical network terminal extracts the following information "mobility _ ip" from the second call information from the remote device side: 12.34.56.78; remote _ port:1234", where, remote _ IP indicates the public IP address of the remote party device, remote _ port indicates the UDP port of the remote party device for audio or video call, and based on the extracted information, the public IP address of the remote party device is 12.34.56.78, and the UDP (User data Protocol) port of the remote party device for audio or video call is 1234.
In some embodiments, the optical network terminal records the first parameter information and the second parameter information.
The Network Address Translation rule includes a Source Address Translation (SNAT) rule set for an uplink RTP packet, where the "uplink RTP packet" refers to an RTP packet that comes from a LAN-side device and needs to be forwarded to a remote-side device, and the "downlink RTP packet" refers to an RTP packet that comes from the remote-side device and needs to be forwarded to the LAN-side device. Wherein the routing rule is used to indicate a routing policy for RTP packets.
As an example, the optical network terminal automatically generates a UDP port (denoted as "VoIp _ port") for an audio or video call, and sets an SNAT rule "iptables-t nat-I post server _ IP-UDP-port-d movement _ IP-port movement _ snap-port-snap-port for an upstream RTP packet according to the extracted first parameter information and second parameter information, and sets a dna rule" iptables-t nat-I route _ j snap-to-source VoIpwan _ IP-p-port _ IP: voIp _ port "for a downstream RTP packet, and converts the destination address of the upstream port into the VoIp address (denoted by the VoIp _ port _ WAN-address), and converts the destination address of the upstream port into the VoIp address of the VoIp port (denoted by the VoIp _ WAN _ port _ address); and, the optical network terminal generates the following routing rule for the uplink RTP packet:
“iptables-t mangle-I PREROUTING-s speaker_ip-p udp--sport speaker_port-d remoteparty_ip--dport remoteparty_port-j MARK--set-mark 0xb0000000/0xf0000000
ip rule add from speaker_ip to remoteparty_ip fwmark0xb0000000/0xf0000000table v100 pref 100
ip route add remoteparty_ip/32 dev VoIPWAN table v100
ip route add default dev VoIPWAN table v100”
wherein "iptables-t-rule-I-PREROUTING-s-header _ ip-udp-sports _ ip-dport-sports _ port-j MARK-set-MARK 0xb0000000/0xf0000000" indicates that an RTP packet with source address as distinct _ ip and destination address as distinct _ ip is marked with "0xb0000000/0xf0000000", "ip add from distinct _ ip to distinct _ ip fwmark 0xb0000000/0xf0000000" indicates that if the source address of the RTP packet is distinct _ ip and the destination address is distinct _ ip, and has the label "0xb0000000/0xf0000000", then go to the lookup rule in the table "v100", the "ip route added remote _ ip/32 dev VoIPWAN table v100" indicates that the RTP data packet with destination address as remote _ ip is sent to VoIP network by VoIPWAN (VoIP Wan interface), and the "ip route added remote dev VoIPWAN table v100" indicates that other default rules are not matched.
It should be noted that, the foregoing examples are only for better illustrating the technical solutions of the present application, and are not limiting to the present application, and those skilled in the art should understand that any implementation manner of extracting the first parameter information of the calling device from the first calling information, extracting the second parameter information of the called device from the second calling information, and generating the network address translation rule and the routing rule according to the first parameter information and the second parameter information should be included in the scope of the present application.
In step S13, the optical network terminal sends the second parameter information to the calling device.
In some embodiments, the optical network terminal converts the second call information based on the second protocol into a data packet based on the first protocol, where a source address in the converted data packet is a public IP address of the optical network terminal and a destination address is an IP address of the calling device, and then the optical network terminal sends the converted data packet to the calling device. As an example, if the calling device is a LAN-side device, the first protocol is a private control protocol, and the second protocol is an SIP protocol, the optical network terminal converts the second call information based on the SIP protocol into a data packet based on the private control protocol, where a source address in the converted data packet is a public IP address of the optical network terminal and a destination address is a private IP address of the LAN-side device, and then the optical network terminal sends the converted data packet to the LAN-side device.
In other embodiments, the optical network terminal encapsulates the extracted second parameter information directly based on a data format defined by the first protocol to obtain a data packet based on the first protocol, where a source address in the encapsulated data packet is a public IP address of the optical network terminal and a destination address is an IP address of the calling device, and then the optical network terminal sends the encapsulated data packet to the calling device.
It should be noted that, the foregoing examples are only for better illustrating the technical solutions of the present application, and are not meant to limit the present application, and those skilled in the art should understand that any implementation manner of sending the second parameter information to the calling device should be included in the scope of the present application.
In step S14, the onu receives an RTP packet from the calling device, and forwards the RTP packet to the called device according to the nat rule and the routing rule.
After receiving second parameter information of the called device sent by the optical network terminal, the calling device generates an RTP packet for initiating a call to the called device according to the first parameter information and the second parameter information of the called device, where a source address of the RTP packet is an IP address of the calling device and a destination address is an IP address of the called device, the RTP packet includes the first parameter information and the second parameter information, and then the calling device sends the RTP packet for initiating a call to the called device to the optical network terminal. The implementation manner of generating, by the calling device, an RTP packet for calling the called device according to the first parameter information and the second parameter information of the calling device and sending the RTP packet to the optical network terminal will be described in detail in the following embodiments, which is not described herein again.
Specifically, in step S14, the optical network terminal receives an RTP packet from the calling device, and then, the optical network terminal determines whether the RTP packet satisfies a routing rule set in the optical network terminal (i.e., the routing rule generated in step S12), and if so, performs network address translation on a source address in the RTP packet according to the set network address translation rule, so as to send the translated RTP packet to the called device.
It should be noted that, after the call connection is established, the optical network terminal continues to forward the RTP packet to the called device according to the network address translation rule and the routing rule, and forward the RTP packet from the calling device to the called device, or forward the RTP packet from the called device to the calling device.
As a preferable scheme, the method further comprises the following steps: and when the call initiated by the calling equipment to the called equipment is terminated, the optical network terminal deletes the network address conversion rule and the routing rule.
In some embodiments, when the calling device terminates the call initiated to the called device, the optical network terminal deletes the network address translation rule and the routing rule used for the current call (i.e., the network address translation rule and the routing rule generated for the current call in step S12), and sends a call termination instruction to the calling device, so that the calling device stops the call. In some embodiments, if other information that is first associated with the call is stored in the onu, the other information is also deleted when the call is terminated.
The application finds that the following technical problems exist in the prior art: 1) The LAN side device only has a private IP address, the ONT cannot directly forward the RTP packet from the LAN side device to the remote side device, and since the network of the remote side device cannot recognize the private IP address, the RTP packet from the remote side device cannot be forwarded to the LAN side device as well; 2) No solution for IP-based calls has been provided in the prior art for LAN-side devices that do not support the SIP protocol. In view of the above problem 1), the following solutions exist in the prior art: the method comprises the steps that an ALG-SIP (application layer gateway for SIP) is installed on an ONT, the ALG-SIP can process SIP messages from a LAN side, the ALG-SIP can convert a private IP address of a LAN side device into a public IP address of the ONT, and a random port number is generated for the SIP messages; however, this solution has the following drawbacks: the ALG-SIP can only translate the IP address and the port when receiving the SIP message from the LAN side equipment or the SIP message sent to the LAN side equipment, and can not realize the forwarding of the RTP data packet if not receiving the SIP message; also, ALG-SIP can only handle SIP/RTP messages from one VLan, i.e. if ALG-SIP is set on Internet WAN, another ALG-SIP cannot be set on VoIP WAN.
According to the solution of this embodiment, at the initial stage of the call, the optical network terminal may extract the first parameter information of the calling device from the first call information, extract the second parameter information of the called device from the second call information, and generate a network address translation rule and a routing rule according to the first parameter information and the second parameter information, so as to be able to implement the forwarding of the RTP packet in the optical network terminal, thereby implementing the audio or video call between the LAN side device and the WAN side remote party device through the optical network terminal; furthermore, the LAN-side device can forward the RTP packet for the call to the VLan (such as VoIP VLan) to which the remote device belongs, and also forward the data stream to the internet VLan; the scheme does not require the LAN side equipment to support SIP, namely does not limit the LAN side equipment, and the optical network terminal does not need to encode and decode the RTP data packet, but only needs to forward the received RTP data packet, thereby saving the resources on the optical network terminal, even the optical network terminal can not need DSP, thereby saving the hardware cost; in addition, the scheme has better QoS optimization for audio or video calls and can realize better voice quality.
Fig. 2 is a flowchart illustrating a system and method for forwarding RTP packets according to an embodiment of the present application. The system method includes step S21, step S22, step S23, step S24, step S25, step S26, step S27, and step S28.
In step S21, the calling device generates first call information and sends the first call information to the optical network terminal.
In some embodiments, the calling device, in response to a call triggering operation performed by a user for calling a called party (e.g., clicking a "call" button on a page on which the called party is presented), obtains IP address or number information corresponding to the called party (i.e., IP address or number information of a called device), generates first call information in combination with first parameter information of the calling device, and then sends the first call information to an optical network terminal.
In some embodiments, the method for generating and sending the first call information to the optical network terminal by the calling device includes: the calling equipment obtains a recognition result corresponding to the voice information according to the voice information of a calling party, wherein the recognition result comprises behavior indication information corresponding to the calling party; when the behavior indication information is used for indicating calling behavior, the calling device generates the first calling information, wherein the first calling information comprises the first parameter information, the behavior indication information and address information of the called device; and the calling equipment sends the first calling information to an optical network terminal. As an example, the calling device includes a module for performing voice recognition, and the calling device performs voice recognition on voice information of a calling party through the module to obtain a recognition result. As another example, the calling device is an AI smart speaker, which sends voice information of a calling party to the ONT, and the ONT sends the voice information to an AI Cloud (Cloud) located in the internet VLan through an internet Wan interface thereon, and the AI Cloud performs voice recognition on the voice information to obtain a recognition result and sends the recognition result to the ONT so as to feed back the recognition result to the AI smart speaker through the ONT.
It should be noted that, the foregoing examples are only used for better illustrating the technical solutions of the present application, and are not meant to limit the present application, and those skilled in the art should understand that any implementation manner of generating the first call information and sending the first call information to the optical network terminal should be included in the scope of the present application.
In step S22, the optical network terminal receives the first call information from the calling device;
the implementation manner of the optical network terminal receiving the first call information from the calling device has been described in detail in the foregoing step S11, and is not described herein again.
In step S23, the onu negotiates with the called device based on the first call information to obtain second call information from the called device.
The implementation manner of the optical network terminal negotiating with the called device based on the first call information to obtain the second call information from the called device has been described in detail in the foregoing step S11, and is not described herein again. The dotted line shown in fig. 3 represents the negotiation process between the optical network terminal and the called device.
In step S24, the onu extracts first parameter information of the calling device from the first call information, extracts second parameter information of the called device from the second call information, and generates a network address translation rule and a routing rule according to the first parameter information and the second parameter information.
The step S24 is the same as or similar to the implementation of the step S12, and is not described herein again.
In step S25, the optical network terminal sends the second parameter information to the calling device.
The implementation manner of step S25 is the same as or similar to that of step S13, and is not described herein again.
In step S26, the calling device receives the second parameter information.
In step S27, the calling device generates an RTP packet for calling the called device according to the first parameter information and the second parameter information, and sends the RTP packet to the optical network terminal.
In some embodiments, the calling device combines the first parameter information and the second parameter information, and encapsulates the combined data based on an RTP protocol to obtain an RTP packet for calling the called device, where a source address of the RTP packet is an IP address of the calling device and a destination address of the RTP packet is an IP address of the called device, and the body (i.e., body) of the RTP packet contains the combined data.
In step S28, the onu receives an RTP packet from the calling device, and forwards the RTP packet to the called device according to the nat rule and the routing rule.
The step S28 is the same as or similar to the implementation of the step S14, and is not described herein again.
According to the scheme of the embodiment, the LAN side equipment can call the remote side equipment in a VoIP network or an IPTV network through the optical network terminal, and the remote side equipment in other networks can also call the LAN side equipment through the optical network terminal, so that better QoS optimization is realized for audio or video calling, and better voice quality can be realized; furthermore, the end user may only need one AI smart speaker or similar device capable of connecting to the optical network terminal, instead of a fixed telephone, to enable e.g. a VoIP phone or an IPTV phone to be dialed.
Fig. 3 is a schematic diagram of a system architecture for forwarding RTP packets according to an example of the present application. As can be seen from fig. 3, an intelligent speaker (LAN side device) is connected to an optical network terminal ONT through WiFI, and obtains a private IP address "192.168.1.100" from the ONT, the ONT has a BRO interface (LAN side interface), an Internet Wan (belonging to Internet VLan) interface, a VoIP Wan (belonging to VoIP VLan) interface, the Internet Wan interface uses a public IP address of 11.22.33.44, the VoIP Wan interface uses a public IP address of 12.34.56.77, the Internet VLan includes an AI Cloud having an IP address of 11.22.33.45, and the VoIP VLan includes a remote party device having an IP address of 12.34.56.78. The ONT comprises a VoIP module, the intelligent loudspeaker carries out data transmission with the VoIP module based on the private control protocol of the intelligent loudspeaker, and the VoIP module carries out data transmission with a VoIP network based on the SIP protocol.
The call process is described in more detail below with the example of the smart speaker initiating a call (hereinafter also referred to as "this call") to a remote party device having an IP address of 12.34.56.78: 1) The smart speaker sends the user's voice information (e.g., "dial xxxx") to the ONT through the BRO interface, and the ONT sends the voice information to the AI Cloud located in the internet VLan through the internet Wan interface thereon; 2) The AI Cloud receives the voice information, obtains a recognition result for the voice recognition of the voice information, and then feeds back the recognition result to the ONT, and the ONT feeds back the recognition result to the intelligent loudspeaker, wherein the recognition result comprises behavior indication information and the IP address of the remote party equipment; 3) The intelligent loudspeaker determines that the behavior indication information indicates the calling behavior according to the received identification result, and then the intelligent loudspeaker generates first calling information based on a data format defined by a private control protocol, wherein the main body part of the first calling information comprises an IP address, a port, a codec, the behavior indication information and an IP address of a remote party device of the intelligent loudspeaker, the source address of the first calling information is '192.168.1.100', and the destination address is '12.34.56.78'; then, the intelligent loudspeaker sends the first call information to a VoIP module in the ONT; 4) After receiving first call information from a smart speaker, a VoIP module in an ONT determines that the call behavior is currently performed according to behavior indication information in the first call information, converts the first call information into an SIP message, where a source address of the SIP message is "12.34.56.77" and a destination address is "12.34.56.78", and then sends the SIP message to a VoIP network for negotiation, and receives second call information based on an SIP protocol fed back by the VoIP network, where the source address of the second call information is "12.34.56.78" and the destination address is "12.34.56.77"; it should be noted that the SIP message will terminate at the VoIP module; 5) The VoIP module extracts the IP address, the port and the codec of the intelligent loudspeaker from the main body of the first calling information, and extracts the IP address, the port and the codec of the remote party equipment from the main body of the second calling information; 6) The VoIP module automatically generates a UDP port used for the call, and combines the extracted information to generate a network address conversion rule (including SNAT used for an uplink RTP data packet and DNAT used for a downlink RTP data packet) used for the call and a routing (Route) rule used for the uplink RTP data packet; 7) The VoIP module converts the second call information into a data packet based on a private control protocol, and sends the converted data packet to the intelligent loudspeaker (namely, the second parameter information is sent to the intelligent loudspeaker); 8) The intelligent loudspeaker receives the converted data packet (namely, equivalently receives the second parameter information); 9) The intelligent loudspeaker generates an RTP data packet for calling the called device according to the private IP address, the port and the codec of the intelligent loudspeaker and the public IP address, the port and the codec of the remote party device, and sends the RTP data packet to the optical network terminal, wherein the source address of the RTP data packet is '192.168.1.100', and the destination address is '12.34.56.78'; 10 When the ONT receives the RTP packet from the smart speaker, it determines that the RTP packet needs to be forwarded from the VoIP Wan to the VoIP network according to the routing rule for the call stored in the ONT, then performs source address conversion according to the SNAT for the call stored in the ONT to convert the source address in the RTP packet from "192.168.1.100" to "12.34.56.77", converts the port to the UDP port for the call automatically generated by the VoIP module, and then sends the RTP packet after the source address conversion to the remote device through the VoIP Wan, thereby completing the call initiation process.
It should be noted that the process of the remote party device initiating the audio or video call to the LAN side device is similar to the process of the LAN side device initiating the audio or video call to the remote party device, and is not described herein again.
Fig. 4 is a schematic structural diagram of an apparatus for forwarding an RTP packet in an optical network terminal according to an embodiment of the present application. The apparatus for forwarding RTP packets (hereinafter referred to as "apparatus 1") includes an apparatus 11, an apparatus 12, an apparatus 13, and an apparatus 14.
The apparatus 11 is configured to receive first call information from a calling device, and negotiate with a called device based on the first call information to obtain second call information from the called device.
The first call information includes first parameter information of the calling device for calling, and preferably, the first parameter information includes an IP address, a port, and a codec of the calling device, such as an audio IP, an audio port, and an audio codec used when the calling device initiates an audio call, and also such as a video IP, a video port, and a video codec used when the calling device initiates a video call; and the source address in the first calling information is the IP address of the calling equipment, and the destination address in the first calling information is the IP address of the called equipment. As an example, the calling device is a LAN side device, the called device is a remote party device on a WAN side, the source address in the first call information from the LAN side device is a private IP address of the LAN side device, and the destination address is an IP address of the remote party device. As another example, the calling device is a remote party device on a WAN side, the called device is a LAN side device, a source address in the first call information from the remote party device is an IP address of the remote party device, and a destination address is a private IP address of the LAN side device. In some embodiments, the first call information further includes behavior indication information of the calling device, where the behavior indication information is used to indicate whether the behavior of the calling device is a calling behavior.
The second call information includes second parameter information of the called device for a call, and preferably, the second parameter information includes an IP address, a port, and a codec of the called device, such as an audio IP, an audio port, and an audio codec of the called device for an audio call, and further such as a video IP, a video port, and a video codec of the called device for a video call. And the source address in the second calling information is the IP address of the called equipment, and the destination address in the second calling information is the public IP address of the optical network terminal.
Wherein, the first call information is transmitted between the calling device and the optical network terminal based on a first protocol, and the device 11 receives the first call information based on the first protocol from the calling device. Wherein, the apparatus 11 negotiates and transmits the second call information based on a second protocol between the called device and the apparatus 11. In some embodiments, the first protocol and the second protocol are different. In some embodiments, if the calling device is a LAN side device, the first protocol is a private control protocol and the second protocol is a SIP protocol; if the calling device is WAN side equipment, the first protocol is an SIP protocol, and the second protocol is a private control protocol.
In some embodiments, the negotiating with the called device based on the first call information, the obtaining second call information from the called device includes: the device 11 converts the first call information into a session request message based on the second protocol, where a source address in the converted data packet is a public IP address of the optical network terminal, and a destination address is an IP address of the called device, then the device 11 sends the session request message based on the second protocol to the called device, and the called device receives the session request message and feeds back second call information based on the second protocol to the device 11. As an example, the calling device is an intelligent speaker located on the LAN side, the called device is a remote party device in the VoIP VLan, the intelligent speaker sends first call information to the optical network terminal based on a private control protocol, a source address of the first call information is a private IP address of the intelligent speaker, and a destination address of the first call information is an IP address of the remote party device; after receiving the first call information, the device 11 in the optical network terminal converts the first call information into a session request message based on an SIP protocol, and sends the session request message to a remote device in a VoIP network through a VoIP Wan interface, wherein a source address of the session request message is a public IP address of the optical network terminal and a destination address is an IP address of the remote device; the remote party device receives the session request message, generates second call information based on a second protocol according to the session request message, and feeds back the second call information to the apparatus 11, where the second call information includes an IP address, a port, and a codec of the remote party device, and a source address of the second call information is an IP address of the remote party device and a destination address is a public IP address of the optical network terminal.
In some embodiments, the first call information comprises behavior indication information of the calling device, and the means 11 is configured to: receiving first calling information from the calling equipment, and extracting behavior indication information of the calling equipment from the first calling information; and when the behavior indication information is used for indicating calling behavior, negotiating with called equipment based on the first calling information, and obtaining second calling information from the called equipment. In some embodiments, when the behavior indicated by the behavior indication information is not a call behavior (as the behavior indication information is used to indicate an access behavior), the optical network terminal performs a corresponding processing operation based on the behavior indicated by the behavior indication information, which is not described in detail herein.
It should be noted that, the implementation manner of sending the first call information to the optical network terminal by the calling device has been described in detail in the foregoing embodiment, and details are not described herein again.
It should be noted that, the foregoing examples are only for better illustrating the technical solutions of the present application, and not for limiting the present application, and those skilled in the art should understand that any implementation manner of receiving the first call information from the calling device and negotiating with the called device based on the first call information to obtain the second call information from the called device should be included in the scope of the present application.
The device 12 is configured to extract first parameter information of the calling device from the first call information, extract second parameter information of the called device from the second call information, and generate a network address translation rule and a routing rule according to the first parameter information and the second parameter information.
In some embodiments, the apparatus 12 extracts first parameter information of the calling device from the first call information (preferably, extracts the first parameter information from a body in the first call information) based on a data format defined by the first protocol, for example, the calling device is a LAN-side device, and the apparatus 12 in the optical network terminal extracts a private IP address, an audio port (or a video port), and an audio codec (or a video codec) of the LAN-side device from the first call information based on a data format defined by a private control protocol provided by a service provider of the LAN-side device. As an example, the calling device is an intelligent speaker located on the LAN side, the called device is a remote party device in the VoIP VLan, the first protocol is a private control protocol, and the second protocol is an SIP protocol, then the apparatus 12 in the onu extracts the following information "spoke _ ip" from the first call information from the intelligent speaker based on a data format defined by the private control protocol: 192.168.1.100; spaker _ port:1000", where spear _ IP represents the private IP address of the speaker and spear _ port represents the private port of the speaker for audio or video calls, and based on the extracted information, the private IP address of the speaker is 192.168.1.100 and the private port of the speaker for audio or video calls is 1000.
In some embodiments, the apparatus 12 extracts second parameter information of the called device from the second call information (preferably, extracts the second parameter information from a body in the second call information) based on a data format defined by the second protocol, for example, the called device is a remote party device, and the apparatus 12 extracts an IP address, an audio port (or a video port), and an audio codec (or a video codec) of the remote party device from the second call information based on the data format defined by the SIP protocol. As an example, the apparatus 12 extracts the following information "mobility _ ip" from the second call information from the remote device side based on the data format defined by the SIP protocol: 12.34.56.78; remote _ port:1234", where remote _ IP represents the public IP address of the remote party device, remote _ port represents the UDP port of the remote party device for audio or video calls, and based on the extracted information, the public IP address of the remote party device is 12.34.56.78, and the UDP port of the remote party device for audio or video calls is 1234.
In some embodiments, the device 12 records the first parameter information and the second parameter information.
The network address translation rules include a source address translation rule set for an uplink RTP packet and a destination address translation rule set for a downlink RTP packet, where the uplink RTP packet refers to an RTP packet that comes from the LAN side device and needs to be forwarded to the remote side device, and the downlink RTP packet refers to an RTP packet that comes from the remote side device and needs to be forwarded to the LAN side device. Wherein the routing rule is used to indicate a routing policy for RTP packets.
As an example, the optical network terminal automatically generates a UDP port (denoted as "VoIp _ port") for an audio or video call, and sets an SNAT rule "iptables-t nat-I post server _ IP-UDP-port-d movement _ IP-port movement _ snap-port-snap-port for an upstream RTP packet according to the extracted first parameter information and second parameter information, and sets a dna rule" iptables-t nat-I route _ j snap-to-source VoIpwan _ IP-p-port _ IP: voIp _ port "for a downstream RTP packet, and converts the destination address of the upstream port into the VoIp address (denoted by the VoIp _ port _ WAN-address), and converts the destination address of the upstream port into the VoIp address of the VoIp port (denoted by the VoIp _ WAN _ port _ address); and, the optical network terminal generates the following routing rule for the uplink RTP packet:
“iptables-t mangle-I PREROUTING-s speaker_ip-p udp--sport speaker_port-d remoteparty_ip--dport remoteparty_port-j MARK--set-mark 0xb0000000/0xf0000000
ip rule add from speaker_ip to remoteparty_ip fwmark 0xb0000000/0xf0000000 table v100 pref 100
ip route add remoteparty_ip/32 dev VoIPWAN table v100
ip route add default dev VoIPWAN table v100”
wherein "RTP packets with source address of" sports _ ip "and destination address of" 0xb0000000/0xf0000000"," ip rule add _ to "fw fwark 0xb0000000/0xf0000000" indicate that the source address is sports _ ip and the destination address is removability _ ip are marked with "0xb0000000/0xf0000000", "ip rule add from sports _ ip to removability _ ip fwark 0xb0000000/0xf 0000v100vref 100" indicates that if the source address of the RTP packet is sports _ 000and the destination address is removability _ ip, and has the label "0xb0000000/0xf0000000", then the rule is looked up in the table "v100", the "ip route added remote _ ip/32 dev VoIPWAN table v100" indicates that the RTP packet with the destination address of remote _ ip is sent to the VoIP network by the VoIPWAN (VoIP Wan interface), and the "ip route added remote dev VoIPWAN table v100" indicates that other default rules are not matched.
It should be noted that, the foregoing examples are only for better illustrating the technical solutions of the present application, and are not limiting to the present application, and those skilled in the art should understand that any implementation manner of extracting the first parameter information of the calling device from the first calling information, extracting the second parameter information of the called device from the second calling information, and generating the network address translation rule and the routing rule according to the first parameter information and the second parameter information should be included in the scope of the present application.
The device 13 sends the second parameter information to the calling device.
In some embodiments, the device 13 converts the second call information based on the second protocol into a data packet based on the first protocol, where a source address in the converted data packet is a public IP address of the onu and a destination address is an IP address of the calling device, and then the device 13 sends the converted data packet to the calling device. As an example, if the calling device is a LAN-side device, the first protocol is a private control protocol, and the second protocol is an SIP protocol, the device 13 converts the second call information based on the SIP protocol into a packet based on the private control protocol, where a source address in the converted packet is a public IP address of the onu and a destination address is a private IP address of the LAN-side device, and then the device 13 sends the converted packet to the LAN-side device.
In other embodiments, the device 13 directly encapsulates the extracted second parameter information based on the data format defined by the first protocol to obtain a data packet based on the first protocol, where a source address in the encapsulated data packet is a public IP address of the onu and a destination address is an IP address of the calling device, and then the device 13 sends the encapsulated data packet to the calling device.
It should be noted that the above examples are only for better illustrating the technical solutions of the present application, and not for limiting the present application, and those skilled in the art should understand that any implementation manner of sending the second parameter information to the calling device should be included in the scope of the present application.
The device 14 is configured to receive an RTP packet from the calling device, and forward the RTP packet to the called device according to the network address translation rule and the routing rule.
After receiving second parameter information of the called device sent by the optical network terminal, the calling device generates an RTP packet for initiating a call to the called device according to the first parameter information and the second parameter information of the called device, where a source address of the RTP packet is an IP address of the calling device and a destination address is an IP address of the called device, the RTP packet includes the first parameter information and the second parameter information, and then the calling device sends the RTP packet for initiating a call to the called device to the optical network terminal. The implementation manner of the calling device generating the RTP packet for calling the called device according to the first parameter information and the second parameter information of the calling device and sending the RTP packet to the optical network terminal has been described in detail in the foregoing embodiments, and is not described herein again.
Specifically, the device 14 in the optical network terminal receives the RTP packet from the calling device, and then the device 14 determines whether the RTP packet satisfies the routing rule set in the optical network terminal (i.e., the routing rule generated by the device 12), and if so, performs network address translation on the source address in the RTP packet according to the set network address translation rule, so as to send the translated RTP packet to the called device.
It should be noted that, after the call connection is established, the optical network terminal continues to forward the RTP packet to the called device according to the network address translation rule and the routing rule, and forward the RTP packet from the calling device to the called device, or forward the RTP packet from the called device to the calling device.
As a preferred solution, the apparatus 1 further comprises: means (hereinafter, referred to as "means 15" for short, not shown) for deleting the network address translation rule and the routing rule by the onu when the call initiated by the calling device to the called device is terminated.
In some embodiments, when the call initiated by the calling device to the called device is terminated, the apparatus 15 deletes the network address translation rule and the routing rule for the current call, and sends a call termination indication to the calling device, so that the calling device stops the call. In some embodiments, if other information that is first associated with the call is stored in the onu, the device 15 deletes the other information when the call is terminated.
It should be noted that the VoIP module shown in fig. 3 can be regarded as equivalent to integrating the device 11, the device 12, and the device 13. It should be further noted that the optical network terminal may include a plurality of modules, each of which includes the device 11, the device 12, and the device 13 (i.e., the device 1 may include a plurality of devices 11, 12, and 13), and each of the modules corresponds to a different network to which the optical network terminal is connected; for example, the optical network terminal includes a VoIP module for VoIP network as shown in fig. 3 and an IPTV module for IPTV network, the VoIP module is used for establishing corresponding network address conversion rules and routing rules for audio or video calls between the LAN side device and the remote party device in the VoIP network, and the IPTV module is used for establishing corresponding network address conversion rules and routing rules for audio or video calls between the LAN side device and the remote party device in the IPTV network. Therefore, the scheme can simultaneously support the IP-based call facing to a plurality of networks in the optical network terminal.
According to the scheme of this embodiment, in the initial stage of a call, the optical network terminal may extract first parameter information of the calling device from the first call information, extract second parameter information of the called device from the second call information, and generate a network address translation rule and a routing rule according to the first parameter information and the second parameter information, so as to be able to implement forwarding of an RTP packet in the optical network terminal, thereby implementing an audio or video call between a LAN-side device and a WAN-side remote party device through the optical network terminal; furthermore, the LAN-side device can forward the RTP packet for the call to the VLan (such as VoIP VLan) to which the remote device belongs, and also forward the data stream to the internet VLan; the scheme does not require the LAN side equipment to support SIP, namely does not limit the LAN side equipment, and the optical network terminal does not need to encode or decode the RTP data packet but only needs to forward the RTP data packet received by the optical network terminal, thereby saving the resources on the optical network terminal, even needing no DSP in the optical network terminal, and saving the hardware cost; in addition, the scheme has better QoS optimization for audio or video calls and can realize better voice quality.
The present application further provides an optical network terminal, where the optical network terminal includes the apparatus for forwarding an RTP packet according to the present application.
The application also provides a system for forwarding the RTP data packet, wherein the system comprises the optical network terminal, the calling device and the called device.
The present application further provides an optical network terminal, wherein the optical network terminal includes:
a memory for storing one or more programs;
one or more processors coupled to the memory,
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method for forwarding RTP packets described herein.
The present application further provides a computer-readable storage medium having stored thereon a computer program which can be executed by a processor for performing the method for forwarding RTP packets as described herein.
The present application also provides a computer program product, which, when executed by an apparatus, causes the apparatus to perform the method for forwarding RTP packets described herein.
It should be noted that the present application may be implemented in software and/or a combination of software and hardware, for example, implemented using Application Specific Integrated Circuits (ASICs), general purpose computers or any other similar hardware devices. In one embodiment, the software programs of the present application may be executed by a processor to implement the steps or functions described above. As such, the software programs (including associated data structures) of the present application can be stored in a computer readable recording medium, such as RAM memory, magnetic or optical drive or diskette and the like. Further, some of the steps or functions of the present application may be implemented in hardware, for example, as circuitry that cooperates with the processor to perform various steps or functions.
In addition, some of the present application may be implemented as a computer program product, such as computer program instructions, which when executed by a computer, may invoke or provide methods and/or techniques in accordance with the present application through the operation of the computer. Those skilled in the art will appreciate that the form in which the computer program instructions reside on a computer-readable medium includes, but is not limited to, source files, executable files, installation package files, and the like, and that the manner in which the computer program instructions are executed by a computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Computer-readable media herein can be any available computer-readable storage media or communication media that can be accessed by a computer.
Communication media includes media whereby communication signals, including, for example, computer readable instructions, data structures, program modules, or other data, are transmitted from one system to another. Communication media may include conductive transmission media such as cables and wires (e.g., fiber optics, coaxial, etc.) and wireless (non-conductive transmission) media capable of propagating energy waves, such as acoustic, electromagnetic, RF, microwave, and infrared. Computer readable instructions, data structures, program modules, or other data may be embodied in a modulated data signal, for example, in a wireless medium such as a carrier wave or similar mechanism such as is embodied as part of spread spectrum techniques. The term "modulated data signal" means a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal. The modulation may be analog, digital or hybrid modulation techniques.
By way of example, and not limitation, computer-readable storage media may include volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer-readable instructions, data structures, program modules or other data. For example, computer-readable storage media include, but are not limited to, volatile memory such as random access memory (RAM, DRAM, SRAM); and non-volatile memory such as flash memory, various read-only memories (ROM, PROM, EPROM, EEPROM), magnetic and ferromagnetic/ferroelectric memories (MRAM, feRAM); and magnetic and optical storage devices (hard disk, tape, CD, DVD); or other now known media or later developed that are capable of storing computer-readable information/data for use by a computer system.
It will be evident to those skilled in the art that the present application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms first, second, etc. are used to denote names, but not to denote any particular order.

Claims (17)

1. A method for forwarding RTP packets in an optical network terminal, wherein the method comprises the steps of:
receiving first calling information from calling equipment, negotiating with called equipment based on the first calling information, and obtaining second calling information from the called equipment;
extracting first parameter information of the calling device from the first calling information, extracting second parameter information of the called device from the second calling information, and generating a network address translation rule and a routing rule according to the first parameter information and the second parameter information;
sending the second parameter information to the calling equipment;
receiving an RTP data packet from the calling device, and forwarding the RTP data packet to the called device according to the network address conversion rule and the routing rule;
the first call information and the second parameter information are transmitted between the calling equipment and the optical network terminal based on a first protocol, the optical network terminal and the called equipment negotiate and transmit the second call information based on a second protocol, and the first protocol is different from the second protocol.
2. The method of claim 1, wherein if the calling device is a LAN-side device, the first protocol is a private control protocol and the second protocol is a SIP protocol; if the calling device is WAN side device, the first protocol is SIP protocol, and the second protocol is private control protocol.
3. The method of claim 1, wherein the first call information includes behavior indication information of the calling device, and the receiving the first call information from the calling device and negotiating with the called device based on the first call information, the obtaining the second call information from the called device comprises:
receiving first call information from the calling device, and extracting behavior indication information of the calling device from the first call information;
and when the behavior indication information is used for indicating calling behavior, negotiating with called equipment based on the first calling information, and obtaining second calling information from the called equipment.
4. The method of claim 1, wherein the first parameter information includes an IP address, a port, and a codec of the calling device, and the second parameter information includes an IP address, a port, and a codec of the called device.
5. The method according to any one of claims 1 to 4, wherein the method further comprises the step of:
and when the calling device terminates the call initiated to the called device, deleting the network address translation rule and the routing rule.
6. A method of forwarding RTP packets, wherein the method comprises the steps of:
the method comprises the steps that calling equipment generates first calling information and sends the first calling information to an optical network terminal;
the optical network terminal receives the first call information from the call equipment;
the optical network terminal negotiates with called equipment based on the first call information to obtain second call information from the called equipment;
the optical network terminal extracts first parameter information of the calling equipment from the first calling information, extracts second parameter information of the called equipment from the second calling information, and generates a network address conversion rule and a routing rule according to the first parameter information and the second parameter information;
the optical network terminal sends the second parameter information to the calling equipment;
the calling equipment receives the second parameter information;
the calling equipment generates an RTP data packet for calling the called equipment according to the first parameter information and the second parameter information of the calling equipment, and sends the RTP data packet to the optical network terminal;
the optical network terminal receives an RTP data packet from the calling equipment, and forwards the RTP data packet to the called equipment according to the network address conversion rule and the routing rule;
the first call information and the second parameter information are transmitted between the calling equipment and the optical network terminal based on a first protocol, the negotiation is carried out between the optical network terminal and the called equipment based on a second protocol, and the second call information is transmitted between the optical network terminal and the called equipment, wherein the first protocol is different from the second protocol.
7. The method of claim 6, wherein if the calling device is a LAN-side device, the first protocol is a private control protocol and the second protocol is a SIP protocol; if the calling device is WAN side device, the first protocol is SIP protocol, and the second protocol is private control protocol.
8. The method of claim 6, wherein the calling device generating first call information and transmitting the first call information to an optical network terminal comprises:
the calling equipment acquires a recognition result corresponding to voice information according to the voice information of a calling party, wherein the recognition result comprises behavior indication information corresponding to the calling party;
when the behavior indication information is used for indicating calling behavior, the calling device generates the first calling information, wherein the first calling information comprises the first parameter information, the behavior indication information and address information of the called device;
and the calling equipment sends the first calling information to an optical network terminal.
9. The method of any one of claims 6 to 8, wherein the first parameter information includes an IP address, a port, and a codec of the calling device, and the second parameter information includes an IP address, a port, and a codec of the called device.
10. An apparatus for forwarding RTP packets in an optical network terminal, wherein the apparatus comprises:
the device comprises a calling device, a called device and a processor, wherein the calling device is used for receiving first calling information from the calling device and negotiating with the called device based on the first calling information to obtain second calling information from the called device;
means for extracting first parameter information of the calling device from the first calling information, extracting second parameter information of the called device from the second calling information, and generating a network address translation rule and a routing rule according to the first parameter information and the second parameter information;
means for sending the second parameter information to the calling device;
means for receiving an RTP packet from the calling device, and forwarding the RTP packet to the called device according to the network address translation rule and the routing rule;
the first call information and the second parameter information are transmitted between the calling equipment and the optical network terminal based on a first protocol, the optical network terminal and the called equipment negotiate and transmit the second call information based on a second protocol, and the first protocol is different from the second protocol.
11. The apparatus of claim 10, wherein if the calling device is a LAN-side device, the first protocol is a private control protocol and the second protocol is a SIP protocol; if the calling device is WAN side equipment, the first protocol is an SIP protocol, and the second protocol is a private control protocol.
12. The apparatus of claim 10, wherein the first parameter information includes an IP address, a port, and a codec of the calling device, and the second parameter information includes an IP address, a port, and a codec of the called device.
13. The apparatus of any one of claims 10 to 12, wherein the apparatus further comprises:
means for deleting the network address translation rules and routing rules when a call originated by the calling device to the called device is terminated.
14. An optical network terminal, wherein the optical network terminal comprises the apparatus for forwarding RTP packets according to any of claims 10 to 13.
15. A system for forwarding RTP packets, wherein the system comprises an optical network terminal, a calling device and a called device according to claim 14.
16. An optical network terminal, wherein the optical network terminal comprises:
a memory for storing one or more programs;
one or more processors coupled to the memory,
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the operations of:
receiving first calling information from calling equipment, negotiating with called equipment based on the first calling information, and obtaining second calling information from the called equipment;
extracting first parameter information of the calling device from the first calling information, extracting second parameter information of the called device from the second calling information, and generating a network address translation rule and a routing rule according to the first parameter information and the second parameter information;
sending the second parameter information to the calling equipment;
receiving an RTP data packet from the calling device, and forwarding the RTP data packet to the called device according to the network address conversion rule and the routing rule;
the first call information and the second parameter information are transmitted between the calling equipment and the optical network terminal based on a first protocol, the negotiation is carried out between the optical network terminal and the called equipment based on a second protocol, and the second call information is transmitted between the optical network terminal and the called equipment, wherein the first protocol is different from the second protocol.
17. A computer-readable storage medium having a computer program stored thereon, the computer program being executable by a processor to:
receiving first calling information from calling equipment, negotiating with called equipment based on the first calling information, and obtaining second calling information from the called equipment;
extracting first parameter information of the calling device from the first calling information, extracting second parameter information of the called device from the second calling information, and generating a network address conversion rule and a routing rule according to the first parameter information and the second parameter information;
sending the second parameter information to the calling equipment;
receiving an RTP data packet from the calling device, and forwarding the RTP data packet to the called device according to the network address conversion rule and the routing rule;
the first call information and the second parameter information are transmitted between the calling equipment and the optical network terminal based on a first protocol, the optical network terminal and the called equipment negotiate and transmit the second call information based on a second protocol, and the first protocol is different from the second protocol.
CN201910621456.2A 2019-07-10 2019-07-10 Method and device for forwarding RTP data packet Active CN112217766B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910621456.2A CN112217766B (en) 2019-07-10 2019-07-10 Method and device for forwarding RTP data packet

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910621456.2A CN112217766B (en) 2019-07-10 2019-07-10 Method and device for forwarding RTP data packet

Publications (2)

Publication Number Publication Date
CN112217766A CN112217766A (en) 2021-01-12
CN112217766B true CN112217766B (en) 2023-03-17

Family

ID=74048148

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910621456.2A Active CN112217766B (en) 2019-07-10 2019-07-10 Method and device for forwarding RTP data packet

Country Status (1)

Country Link
CN (1) CN112217766B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1604589A (en) * 2004-10-28 2005-04-06 无锡三通科技有限公司 SIP crossing supported firewall implementing method
CN1832471A (en) * 2005-03-09 2006-09-13 华为技术有限公司 Method of communicating between different protocal of terminal user interface of IP multimedia subsystem
CN102714614A (en) * 2012-02-17 2012-10-03 华为技术有限公司 Method for transmitting data in passive optical network, user-side equipment, and system
CN102780675A (en) * 2011-05-09 2012-11-14 中兴通讯股份有限公司 Transmission method, device and system for streaming media service
CN103379027A (en) * 2012-04-16 2013-10-30 中兴通讯股份有限公司 Gateway optimizing method and device
CN103957142A (en) * 2014-04-11 2014-07-30 烽火通信科技股份有限公司 System, method and device for achieving three-network integration of PON system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1604589A (en) * 2004-10-28 2005-04-06 无锡三通科技有限公司 SIP crossing supported firewall implementing method
CN1832471A (en) * 2005-03-09 2006-09-13 华为技术有限公司 Method of communicating between different protocal of terminal user interface of IP multimedia subsystem
CN102780675A (en) * 2011-05-09 2012-11-14 中兴通讯股份有限公司 Transmission method, device and system for streaming media service
CN102714614A (en) * 2012-02-17 2012-10-03 华为技术有限公司 Method for transmitting data in passive optical network, user-side equipment, and system
CN103379027A (en) * 2012-04-16 2013-10-30 中兴通讯股份有限公司 Gateway optimizing method and device
CN103957142A (en) * 2014-04-11 2014-07-30 烽火通信科技股份有限公司 System, method and device for achieving three-network integration of PON system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于光网络终端插件承载IMS语音的智能音箱业务;林国强等;《电信技术》;20190525(第05期);全文 *

Also Published As

Publication number Publication date
CN112217766A (en) 2021-01-12

Similar Documents

Publication Publication Date Title
US10798138B2 (en) Instant calling method, apparatus and system
CN106850399B (en) Communication method based on WebRTC technology instant message
JP2007049415A (en) Voice data conversion apparatus, network system, and control method and program
CN102480575B (en) VOIP recording control method and system thereof
US20230353603A1 (en) Call processing system and call processing method
CN108306986B (en) Multi-type media data network address conversion traversing method, terminal and system
WO2015062454A1 (en) Audio and video call method, device and system
TW201320691A (en) Data management methods for use in a network system and systems thereof
WO2016165749A1 (en) In-session communication for service application
CN109995734A (en) A kind of communication means of the WebRTC based on Session Initiation Protocol
US20070036138A1 (en) VoIP communication module
CN113726968B (en) Terminal communication method, device, server and storage medium
CN113630512B (en) Rich media call mobile terminal system and application method thereof
JP4795027B2 (en) Communication apparatus and communication system
WO2013189430A2 (en) Method, system, and media server for implementing automatic speech recognition service
CN107689945B (en) Media conversion equipment control method and device and media gateway
CN104105222B (en) Establish communication
CN112217766B (en) Method and device for forwarding RTP data packet
CN103684970A (en) Transmission method and thin terminals for media data streams
US20060143314A1 (en) Remote USB videophone communication
CN113726750B (en) Voice real-time translation method, device and storage medium
CN104363149A (en) SIP (session initiation protocol)-based system and method for achieving VOIP (voice over Internet protocol) network state monitoring
JP3980562B2 (en) SIP communication control device
KR100534598B1 (en) Set-top box to provide SIP-based VoIP service and its method
JP4372629B2 (en) SIP communication control apparatus for performing FW control and FW control method thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant