WO2009082908A1 - Procédé, dispositif et système de traitement d'un protocole de flux en temps réel - Google Patents
Procédé, dispositif et système de traitement d'un protocole de flux en temps réel Download PDFInfo
- Publication number
- WO2009082908A1 WO2009082908A1 PCT/CN2008/073318 CN2008073318W WO2009082908A1 WO 2009082908 A1 WO2009082908 A1 WO 2009082908A1 CN 2008073318 W CN2008073318 W CN 2008073318W WO 2009082908 A1 WO2009082908 A1 WO 2009082908A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- terminal
- rtsp
- media gateway
- message
- rtsp message
- Prior art date
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/10—Architectures or entities
- H04L65/102—Gateways
- H04L65/1043—Gateway controllers, e.g. media gateway control protocol [MGCP] controllers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/60—Network streaming of media packets
- H04L65/61—Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio
- H04L65/613—Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio for the control of the source by the destination
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/60—Network streaming of media packets
- H04L65/65—Network streaming protocols, e.g. real-time transport protocol [RTP] or real-time control protocol [RTCP]
Definitions
- the embodiments of the present invention relate to the field of communications technologies, and in particular, to a method, an apparatus, and a system for processing an RTSP (Real Time Streaming Protocol). Background technique
- RTSP Real Time Streaming Protocol
- MGC Media Gateway Controller
- MG Media Gateway
- the MGC is responsible for the call control function.
- the MG is responsible for the service bearer function, which separates the call control plane from the service bearer plane, thereby fully sharing network resources, simplifying equipment upgrades and service expansion, and greatly reducing development and maintenance costs.
- the Media Gateway Control Protocol is the main protocol for communication between the MG and the MGC.
- H.248/MeGaCo and MGCP Media Gateway Controller Protocol
- Protocol communication such as RTP (Real-time Transport Protocol).
- Real Time Streaming Protocol Establishes and controls one or several time synchronized continuous streams, such as audio and video.
- the media stream can be a unicast or multicast media stream.
- continuous media streams may intersect with control flows, RTSP itself does not send continuous media streams.
- RTSP acts as a network remote control for the multimedia server.
- RTSP provides an extensible framework for real-time control of real-time data such as audio and video. Transfer on demand. Data sources include live data and stored clips.
- RTSP is used to control multiple data transmission sessions, and provides a way to select the transmission channel, such as UDP (User Datagram Protocol), multicast UDP, and Transmission Control Protocol (TCP).
- UDP User Datagram Protocol
- TCP Transmission Control Protocol
- the media gateway can complete the transmission and related processing of the media data stream between different IP networks, but cannot forward and process the RTSP message, and the media gateway discards the received RTSP message.
- Embodiments of the present invention provide a method, apparatus, and system for processing an RTSP protocol, so as to implement a media gateway to forward and process an RTSP message.
- Embodiments of the present invention provide a method for processing a real-time streaming media protocol, including the following steps:
- the second IP network After receiving, by the first IP terminal, the first RTSP message from the first IP network, sending, by the second IP terminal, a second RTSP message to the second IP network; and/or through the second IP terminal After receiving the second RTSP message, the second IP network sends the first RTSP message to the first IP network by using the first IP terminal.
- Another embodiment of the present invention provides a method for processing a real-time streaming media protocol, including the following steps:
- the third IP terminal receives the third RTSP message from the IP network where the third IP terminal is located, the content of the third RTSP message is reported to the media gateway controller.
- the embodiment of the invention further provides a media gateway, including:
- a topology connection setting unit configured to set a context and a first IP terminal and a second IP terminal inside the context according to the indication of the media gateway controller, and set the real-time streaming media on the first IP terminal and the second IP terminal a remote address of the protocol RTSP message; the local address of the real-time streaming media protocol RTSP message is allocated and transmitted on the first IP terminal and the second IP terminal;
- An RTSP message sending and receiving unit configured to receive, by the first IP terminal, an RTSP message from an IP network where the first IP terminal is located, where the RTSP message remains unchanged or modified, and then sent to the second IP terminal by using the second IP terminal.
- Embodiments of the present invention further provide a system for processing a real-time streaming media protocol, including a media gateway and a media gateway controller:
- the media gateway is configured to set, according to a media gateway controller, a context and a first IP terminal and a second IP terminal, and set a real-time streaming media protocol on the first IP terminal and the second IP terminal.
- a remote address of the RTSP message the local address of the real-time streaming protocol RTSP message is allocated and received on the first IP terminal and the second IP terminal; and the first IP terminal is located from the first IP terminal by the first IP terminal.
- the IP network receives the RTSP message, and the RTSP message remains unchanged or modified, and then sent to the IP network where the second IP terminal is located by using the second IP terminal;
- the media gateway controller is configured to instruct the media gateway to create a context and a first IP terminal and a second IP terminal in the context, and set and send real-time streaming media on the first IP terminal and the second IP terminal.
- the local address and remote address of the protocol RTSP message is configured to instruct the media gateway to create a context and a first IP terminal and a second IP terminal in the context, and set and send real-time streaming media on the first IP terminal and the second IP terminal.
- the embodiment of the invention further provides a media gateway, including: a topology connection setting unit, configured to create a context according to an indication of the media gateway controller and a third IP terminal inside the context, and set, at the third IP terminal, a remote address and a local address of the real-time streaming protocol RTSP message End address
- the RTSP messaging unit is configured to receive, by the third IP terminal, a third RTSP message from the IP network where the third IP terminal is located, and report the content of the third RTSP message to the media gateway controller.
- Embodiments of the present invention further provide a system for processing a real-time streaming media protocol, including a media gateway and a media gateway controller:
- the media gateway is configured to create a context and a third IP terminal in the context according to the indication of the media gateway controller, and negotiate a remote address and a local address of the real-time streaming media protocol RTSP message sent by the third IP terminal; And after the third IP terminal receives the third RTSP message from the IP network where the third IP terminal is located, the content of the third RTSP message is reported to the media gateway controller;
- the media gateway controller is configured to instruct the media gateway to create a context and a third IP terminal inside the context, and set a local address and a remote end of the real-time streaming protocol RTSP message on the third IP terminal. Address; receiving the third RTSP message from the media gateway.
- the media gateway sets the transceiver on the first IP terminal and the second IP terminal by creating a context and a first IP terminal and a second IP terminal inside the context.
- the remote address and the local address of the RTSP message of the real-time streaming protocol; the function of forwarding the RTSP message by the media gateway is implemented.
- FIG. 1 is a schematic diagram of a H.248 terminal context for transmitting an RTSP message according to Embodiment 1 of the present invention
- FIG. 2 is a flowchart of a media gateway controller controlling a media gateway to directly respond to an RTSP message according to Embodiment 2 of the present invention
- FIG. 3 is a media gateway controller in the third embodiment of the present invention, which controls a media gateway to continue Flowchart for sending RTSP messages forward;
- FIG. 4 is a flowchart of a media gateway controller controlling a media gateway to receive and receive an RTSP message according to Embodiment 4 of the present invention
- FIG. 5 is a schematic diagram of interworking between border gateways between two IP networks in an embodiment of the present invention. detailed description
- the process of processing RTSP messages through the IP terminal on the media gateway is shown in Figure 1.
- the RTSP message involved in the embodiment of the present invention may be an RTSP request message or an RTSP response message.
- the first IP terminal ie, terminal 1, hereinafter collectively referred to as IP terminal 1
- the second IP terminal ie, terminal 2, hereinafter collectively referred to as IP terminal 2
- IP network 1 shown as IP network 1 in the figure
- IP network 2 shown as IP network 2 in the figure
- An IP terminal is a virtual terminal that is assigned to a network interface.
- the network interface where the terminal 1 is located is in the first IP network 1, and the network interface where the terminal 2 is located is in the second IP network 2.
- Terminal 1 and terminal 2 can be used to send and receive and process media data streams, such as RTP data streams and RTCP data streams, while receiving and processing RTSP messages.
- Terminal 1 and terminal 2 can also be used only to send and receive RTSP messages.
- the RTSP message and the media data stream may be separately described in different stream descriptors on the IP terminal, or the RTSP message and the media data stream are respectively described in different SDP groups (groups) in the same stream descriptor, because Transceiving and processing media data streams is an existing function of the media gateway, and will not be described here.
- the media gateway controller controls the media gateway to negotiate the local (local) and remote (remote) addresses of the IP terminal to send and receive RTSP messages.
- the negotiation process is similar to the local and remote addresses of the negotiated media data stream.
- the local address is generally allocated to receive the media stream or the destination address of the RTSP message, but the local address is usually used as the source address of the sending media stream.
- a topology connection relationship is set between the IP terminal 1 and the IP terminal 2 in the same context.
- the topology connection relationships supported by the H.248 protocol include two-way non-conduction, two-way conduction, and one-way communication.
- the topology connection (at this time, the topology allows the IP terminal 1 to be turned on from the IP terminal 2), and the RTSP message is sent to the second IP network 2 through the IP terminal 2; similarly, the IP terminal 2 receives from the second IP network 2.
- the incoming RTSP message can also be sent to the first IP network 1 through the IP terminal 1 through the topology connection between the terminals within the context (where the topology allows the IP terminal 2 to be turned on from the IP terminal 2).
- the process of performing capability negotiation (including sending and receiving address negotiation and RTSP codec negotiation) on the IP terminal can be implemented by using the SDP to carry the IP address and port number of the RTSP message.
- the media gateway controller sends a command to create a IP terminal or modify an IP terminal to the media gateway, where
- the local (or local) SDP contains the following parts:
- the remote SDP contains the following parts:
- the media type and format can be ignored during the negotiation process.
- the local SDP in the response message from the media gateway to the media gateway controller contains the following
- the above SDP indicates that the media gateway allocates the 192.168.100.100 address to the IP terminal to transmit the UDP data stream, and the RTSP message can be sent and received through the address.
- the RTSP description section and the media stream description section can also be separately described in different stream descriptors. It can also coexist in a stream descriptor. E.g:
- the media gateway controller notifies the media gateway of the information of the remote SDP by creating or modifying the terminal, and obtains the media gateway for receiving and/or receiving the message replied from the media gateway.
- the present invention does not exclude the receipt and transmission of RTSP messages by different addresses, but in practice, the same address is usually used to send and receive RTSP messages.
- the IP terminal can be used to send and receive RTSP messages, and can also be used to receive or only send RTSP messages, for example, only one-way RTSP messages are processed. In practical applications, it may also Divided into multiple H.248 message interactions to complete.
- the media gateway controller does not provide the remote SDP information, and then notifys by modifying the message of the terminal.
- the RTSP message received by one of the terminal 1 and the terminal 2 can be sent out through another terminal.
- the interface at the interface level is created on the media gateway.
- the SDP mode described above is not used to negotiate the IP address and port for sending and receiving RTSP messages, but the RTSP can still be sent and received. Message.
- the media gateway may also send the media gateway controller to the media gateway controller through the H.248 event. After the media gateway controller makes a decision, the media gateway may instruct the media gateway to send the responding RTSP message, or may indicate that the media gateway's IP terminal continues.
- the RTSP message is forwarded forward, and the RTSP message can be updated by the media gateway controller before being forwarded.
- the media gateway is autonomous. After receiving the RTSP message, the terminal 1 of the media gateway does not report to the media gateway controller, but forwards it through the terminal 2, and may also modify the RTSP message spontaneously before forwarding.
- Some RTSP messages carry media stream information, such as the IP address AA1 and port P1 of the media stream received by the RTSP device A, and the address is invisible to the peer end of the media stream, so the media gateway spontaneously is on the terminal 2 side.
- the IP address BB2 and port P2 are allocated on the network interface for receiving the media stream, and AA1 and P1 in the RTSP message are replaced with BB2 and P2 when forwarding the RTSP message. Similar processing is also performed for the reverse RTSP message, and the media resource is allocated on the media gateway and the related content in the RTSP message is replaced. I won't go into details here.
- the media gateway releases them.
- the second embodiment of the present invention is a process in which the media gateway controller controls the media gateway to continue to send the RTSP message forward.
- the method includes the following steps: Step s301: The RTSP device A sends the first RTSP request to the media gateway. Interest.
- Step s302 The terminal 1 of the media gateway receives the first RTSP request message, and reports the content of the first RTSP request message to the media gateway controller by using an H.248 event.
- the terminal 1 has determined the IP address and port of the RTSP request message received by the terminal by the method described in Embodiment 1, and/or the destination IP address and port of the RTSP request message.
- Step s303 The media gateway controller answers the Notify message to the media gateway.
- the terminal 2 has determined the IP address and port of the RTSP message received by the terminal 2 by the method described in Embodiment 1, and/or the destination IP address and port of the RTSP request message.
- the media gateway controller may replace the content in the RTSP request message received by the terminal 1, including replacing the media stream transceiving address. For example, if the £ is disposed on the same IP terminal to process both the media data stream and the RTSP request message, the RTSP device A in the first IP network 1 in FIG. 1 provides the IP address of the received media stream S1 in the sent RTSP message M1. A1 and port P1. This media stream is provided by the RTSP peer device B in the second IP network 2. Due to the blocking of the media gateway, the RTSP device A cannot be directly routed to the RTSP peer device B in the second IP network 2.
- the RTSP request message is sent to the IP terminal 1 on the media gateway, and the IP terminal 1
- the functions include forwarding the media stream S1 and transceiving RTSP messages in the IP network.
- the functions of the IP terminal 2 in the second IP network 2 include receiving the media stream S1 and transceiving the RTSP message in the second IP network 2.
- the media gateway needs to replace the IP address A1 and the port P1 with the IP address and port allocated by the IP terminal T2 for receiving the media stream S1.
- the media stream S1 arrives at the IP terminal 2 and passes the IP.
- the terminal 1 transmits to the first IP network 1 and is finally forwarded to the RTSP device A in the first IP network 1.
- the media gateway needs to replace the corresponding header field or SDP when forwarding the RTSP message.
- the principle is the same as the destination address of the replacement media stream described above.
- the IP address and port of the sending media stream carried in the RTSP message need to be replaced with the media gateway.
- the terminal when the same terminal, such as the IP terminal 2, processes the RTSP message and the media stream, the terminal can allocate the same or different IP address and port for the RTSP message and/or the media stream.
- the media gateway can also create separate terminals for RTSP messages and media streams, but in most cases it is not necessary. In some cases, for example, for the same session, media streams and RTSP messages are passed through different paths (one possible case is delivered through two different media gateways), which is only responsible for transceiving RTSP messages. Do not send or receive the media stream involved. Regardless of whether the RTSP message and the media stream are processed by the same terminal, the processing flow is the same.
- resources such as IP addresses and ports are allocated on the media gateway for sending and receiving media streams. Therefore, an optional step is implicitly preceded by this step, that is, the media gateway controller instructs the media gateway to allocate these media streams for receiving and receiving media on the new terminal or the existing terminal through the H.248 ADD command or the MODIDY command. Resources.
- the media gateway returns information such as the IP address and port of the allocated resource to the media gateway controller through the SDP in the response message. The media gateway controller can use this information to construct a second RTSP request message.
- Step s305 The media gateway sends a second RTSP request message to the RTSP peer device through the terminal 2 according to the indication.
- the content of the second RTSP request message may be the same as the first RTSP message in step s301, and the first RTSP message in step s301 may also be changed under the direction of the media gateway controller.
- the media gateway can avoid by setting the topology relationship between terminal 1 and terminal 2 (for example, modifying to isolate)
- the terminal 2 sends both the RTSP message sent by the media gateway controller and the RTSP message received by the terminal 1.
- Step s306 The media gateway sends a response message of the Modify message to the media gateway controller.
- step s306 and step s305 can be reversed.
- Step s307 The media gateway receives the response message of the foregoing second RTSP request message on the terminal 2.
- Step s308 The media gateway forwards the RTSP response message to the RTSP client through the terminal 1.
- the media gateway may report the received RTSP response message to the media gateway controller and receive an indication from the media gateway controller to determine the content of the RTSP response message sent to the RTSP device.
- the principle is the same as step s302, step s303, step s304, and step s306, and details are not described herein.
- the media gateway processing the RT SP request message and processing the RT SP response message may be two separate processes, for example, a media gateway only processes the RTSP request message, and the RTSP response message is not transmitted through the media gateway (via another transmission path), Or other IP terminals on the media gateway.
- the two processes are placed in the same flow of Figure 3 to fully illustrate the flow of a full RTSP request plus response, but does not prevent the present invention from being used only for RTSP request messages or only for RTSP response messages.
- step s302, step s303, step s304, and step s306 are optional. That is, the media gateway can complete the forward forwarding of the RTSP request message by itself, and the message can be updated by the media gateway before being forwarded.
- This configuration can be set or updated by the media gateway controller. This configuration may include replacement logic for media stream transceiving IP addresses and ports, and replacement logic for some fields and header fields in RTSP messages, which are described in detail later.
- the RTSP device and the RTSP peer device in the second embodiment are an RTSP client and an RTSP server, respectively, or an RTSP server and an RTSP client. If the protocol allows RTSP protocol interaction between RTSP clients or RTSP servers, the RTSP device and the RTSP peer device may also be RTSP clients or RTSP servers. According to the embodiment of the present invention, after the media gateway controller controls the media gateway to negotiate the local (local) and remote (remote) addresses of the RTSP message sent and received by the IP terminal, in some scenarios, the single IP terminal can also implement the RTSP message. Processing.
- the IP terminal that processes the RTSP message separately is referred to as a third IP terminal, and the RTSP message processed by the third terminal is a third RTSP message.
- the third IP terminal may be the terminal 1, the terminal 2 or the specially created terminal in FIG. The following describes the specific application scenarios.
- the third embodiment of the present invention is a process in which the media gateway controller controls the media gateway to directly respond to the RTSP message.
- the third terminal is specifically the terminal 1, and includes the following steps:
- Step s201 The RTSP device sends a third RTSP message, such as an RTSP request message, to the media gateway.
- Step s202 The terminal 1 of the media gateway receives the RTSP request message, and reports the content of the RTSP request message to the media gateway controller by using an H.248 event.
- the terminal 1 has specified the IP address and port for receiving the RTSP message by the method described in Embodiment 1.
- Step s203 The media gateway controller answers the Notify message to the media gateway.
- Step s204 The media gateway controller instructs the media gateway to send an RTSP response message through the terminal 1 by using a Modify message.
- the content of the RTSP response message in the message may be the RTSP message itself, or may be a description of the content of the RTSP. For example, if the bandwidth required in the RTSP request cannot be met, the media gateway controller instructs the media gateway to answer the error code.
- Step s205 The media gateway sends an RTSP response message through the terminal 1 according to the indication.
- Step s206 The media gateway sends a Modify message to the media gateway controller. Reply message.
- step s206 and step s205 can be reversed. If the processing logic of the RTSP message is configured on the media gateway or set by the media gateway controller, step s202, step s203, step s204, and step s206 are optional, that is, the media gateway can complete the response to the RTSP request message by itself. There is no need to interact with the media gateway to control information.
- the RTSP device is an RTSP client (client) or an RTSP server (server).
- the media gateway controller is required to control the media gateway to send and receive RTSP messages, so that the H.248 protocol itself is included.
- the user terminal device of the media gateway such as the residential gateway supports the ability to send and receive RTSP messages. As shown in Figure 4, the following steps are included:
- Step s401 The media gateway controller instructs the media gateway to send a third RTSP message, such as an RTSP request message, through the third IP terminal (terminal 3) through the Modify message.
- the message carries the content of the RTSP message.
- the terminal 3 has determined the IP address and port of the RTSP request message received by the terminal by the method described in Embodiment 1, and/or the destination IP address and port of the RTSP request message.
- Step s402 The media gateway sends, according to the indication, the RTSP request message sent by the media gateway controller through the terminal 3.
- Step s403 The media gateway sends a response message of the Modify message to the media gateway controller.
- step s403 and step s404 can be reversed.
- Step s404 The media gateway receives the RTSP response message on the terminal 3.
- Step s405 The media gateway reports the content of the received RTSP response message to the media gateway controller by using an H.248 event.
- the media gateway controller answers the Notify message to the media gateway.
- the media gateway controller allocates resources by creating or modifying the terminal on the media gateway.
- the resource information such as the IP address and port returned by the media gateway in the response message is used for RTSP.
- the message is described in the message.
- the media gateway can be used as a buffer of the media stream.
- the media data is cached on the media gateway.
- the media gateway may request the media stream from the RTSP device B, or provide the media data that has been cached.
- RTSP device A the media gateway can terminate the RTSP message, send a response message to the RTSP device A, and then provide the cached media stream data to the RT SP device A.
- the media stream requested by the RT SP device A may also be partially provided by the cache in the media gateway, and partially requested by the media gateway to other RTSP devices (for example, RTSP device B in FIG. 1) to be forwarded to the RTSP device A.
- the media gateway can respond to the RTSP request message of the RTSP device A by itself, or report the content of the RTSP request message sent by the RTSP device A to the media gateway controller, and further, the media gateway.
- the controller instructs to send a reply message to RTSP device A.
- the media gateway is also on the RTSP device B side.
- the media gateway can send and receive RTSP messages by itself, or report the contents of the received RTSP message and/or send RTSP messages under the indication of the media gateway controller.
- the H.248 protocol needs to be extended.
- the basic functions to be extended are as follows:
- the media gateway reports the detected RTSP message through the extended event, and the reported event carries the RTSP message.
- the media gateway controller instructs the media gateway to send an RTSP message by means of an extended signal, wherein the signal carries the content of the RTSP message to be sent by parameters;
- the media gateway controller sets a rule for processing the RTSP message to the media gateway through the extended attribute, for example
- the rules of the RTSP message header field are changed. According to these rules, the media gateway can autonomously complete the update and forwarding of the RTSP message, and reduce the message interaction with the media gateway controller.
- the method filters the parameter mf.
- the media gateway controller instructs the media gateway to report the list of RTSP methods to be reported. For example, only ask for detection Report the setup method and the teardown method.
- the data type of this parameter is an enumeration list, and the enumeration value is each method supported by the RTSP protocol.
- the bearer layer forwarding switch parameter tt by which the media gateway controller instructs the media gateway to forward the RTSP message that has been reported in the bearer layer, for example, whether the terminal 1 passes the RTSP message in FIG. Terminal 2 forwards forward.
- the media gateway controller may update the RTSP message to instruct the media gateway to forward through the terminal 2.
- the media gateway may also pass the topology relationship (the topology allows the terminal 1 to the terminal 2 to be guided).
- the RTSP message is forwarded, so that two duplicate RTSP messages are sent to the destination address. Therefore, if the media gateway controller prepares to control the RTSP message to be forwarded, the parameter indicates whether the media gateway forwards the already reported RTSP message at the bearer layer.
- the data type of this parameter is a switch variable.
- the value is on/off and the default is on. On indicates that the media gateway forwards itself. Off means that the media gateway does not forward forward. It is also possible to define parameters that require the media gateway to report RTSP messages involving QoS metrics. For example, define the following parameters:
- Bandwidth reporting parameter br the parameter is a switch variable, the value is on/off, and the default value is off. If the switch value is on, if the transmission bandwidth is involved in the RTSP message received by the terminal, it needs to be reported.
- the speed change parameter sc the parameter is a switch variable, the value is on / off, the default value is off; If the switch value is on, if the speed header field value of the RTSP message received by the terminal changes, it needs to be reported .
- RTSP message carries other information related to the QoS indicator
- the event reporting of the media gateway is triggered.
- the media stream carries the parameter sap.
- the parameter is a switch variable, and the value is on/off. The default value is on. If the switch value is on, if the RTSP message received by the terminal carries the media stream description information, Reported.
- Specify the report content parameter rc which describes the media gateway controller needs The information format reported by the media gateway.
- the parameter may be used to specify that the media gateway reports the entire RTSP message body, and the parameter may be used to specify only the content of the specified part of the RTSP message, which is as follows: Specify content (such as Speed header field, etc.), specify that the media gateway is required to report the specified specific options in the specified header field (such as the dest_addr and src_addr fields of the Transport header field).
- the media gateway controller can obtain the required content from the media gateway.
- the parameters of the event include:
- RTSP message content It can be defined that the entire RTSP message is directly reported to the media gateway controller as the content of the parameter.
- the data type of this parameter is a string.
- the media gateway may be required to decompose the content of the RTSP message and report the specified content, for example, the source address and the destination address in the Transport header field of the upper 4 RTSP message. It is also possible to define corresponding parameters - after the reported RTSP message is decomposed Each media gateway controller requires a single item of information to be reported. The method for defining parameters is not unique and will not be described here.
- the signal RTSPs the parameters of the signal include: RTSP message content, which can be defined to deliver the entire RTSP message as the content of the parameter to the media gateway, and the data type of the parameter is a string.
- the media gateway After receiving the signal, the media gateway sends the RTSP message carried in the parameter to the address specified by the remote descriptor.
- Other feasible methods are to decompose the content of the RTSP message into pieces of information, which are respectively sent out in multiple parameters, and the media gateway constructs an RTSP message according to the information carried in the parameters and sends it. The specific details are not described here.
- the rules for defining the Media Gateway Controller to set up RTSP messages to the Media Gateway can be as follows:
- requrl which is used by the media gateway controller to set the rules for processing the "Request-URI" part of the RTSP message to the media gateway.
- the data type of this attribute is a string. This parameter is empty by default, indicating that the "Request-URI” is not converted. If the value of the requrl parameter is " RT SP: //example . com/fizzle/foo " , the media gateway receives the following message on the terminal with this parameter set:
- the attribute srcaddrexp the data type of the attribute is a string. Represents the value of the src_addr field of the Transport header field in the received RTSP message. For example, the attribute value is "10.11.1.100". :9000"/"10.11.1.100:9001” means replace the contents of the src_addr field of the received Transport header field with "10.11 ⁇ 100:9000"/"10.11.1.100:9001".
- a similar attribute can also be defined to replace the media stream source address and/or destination address involved in the SDP in the RTSP message.
- the IP terminal that receives and receives the RTSP message by the media gateway and the IP terminal that receives and receives the media stream may be the same IP terminal or different IP terminals.
- the media stream source address becomes the source address of the media stream sent by the media gateway; when the unicast media stream reaches the media gateway, the destination address of the media stream is the address of the media gateway, and the media gateway will When it is forwarded out on the other side of the IP network, the destination address also needs to be updated to the destination address.
- the RTSP message forwarded by the media gateway may carry the IP address and port of the RTSP device itself to receive and receive the media stream.
- the device address in the IP network on the media gateway side is the device in the IP network on the other side. It is not directly reachable. Therefore, the media gateway needs to replace the affected part of the source address and the destination address of the media stream carried in the RTSP message forwarded by itself into the address allocated on the IP terminal of the media gateway.
- the media stream source address in the present invention indicates the source IP address of the media stream.
- Address and port, destination address represents the destination IP address and port.
- the border gateway between the two IP networks in Figure 5 is also a media gateway that performs the transfer and related processing of media data streams between different IP networks, and forwards and processes RTSP messages.
- Terminal 1 receives RTSP device A as follows RTSP message:
- the destination ports of the media stream are 4588 and 4589, and the ports allocated by the media gateway to the media stream on the second IP network 2 side are 8000 and 8001.
- the terminal 2 forwards the RTSP message to the destination device B of the RTSP message, it sends:
- Terminal 2 receives the following response message:
- 192.0.2.241:6256" and “192.0.2.241:6257” are the source IP address and port of the media stream, and the IP address and port assigned by the media gateway for the media stream on the first ip network 1 side is 10.11.1.100: 9000 and 10.11.1.100: 9001.
- the RTSP devices on both sides of the media gateway interact with the IP terminals on the media gateway, and the media gateway transforms and transmits the RTSP messages.
- the media gateway reports the received RTSP message to the media gateway controller, and the media gateway controller sends the information of the RTSP message to be sent to the media gateway, where the information carries the converted IP address and port.
- Steps 302 through 306 in the process use this method.
- the other is to forward the conversion rule to the media gateway in advance.
- the media gateway replaces the relevant part of the RT SP message according to the rule, such as the media stream IP address and port, the specified header field, and the like.
- the embodiment of the present invention further provides a system for processing a real-time streaming media protocol, including: a media gateway, configured to receive, by a media gateway controller, a creation context and a first IP terminal and a second IP terminal within the context, where Setting a remote address of the real-time streaming media protocol RTSP message on the first IP terminal and the second IP terminal; and allocating a local address of the real-time streaming media protocol RTSP message on the first IP terminal and the second IP terminal; Receiving, by the first IP terminal, an RTSP message from the IP network where the first IP terminal is located, where the RTSP message remains unchanged or modified, and then sent to the second IP terminal by using the second IP terminal.
- the IP network where it is located where it is located.
- a media gateway controller configured to instruct the media gateway to create a context and a first IP terminal and a second IP terminal inside the context, and set a real-time streaming protocol RTSP on the first IP terminal and the second IP terminal The local address and remote address of the message.
- the media gateway specifically includes: a topology connection setting unit, configured to receive, by the media gateway controller, a creation context and a first IP terminal and a second IP terminal inside the context, where the first IP terminal and the second IP address The remote address of the real-time streaming media protocol RTSP message is set on the terminal; the local address of the real-time streaming media protocol RTSP message is allocated on the first IP terminal and the second IP terminal; the RTSP messaging unit is used to pass the The first IP terminal is located from the first IP terminal
- the IP network receives the RTSP message, and the RTSP message remains unchanged or modified and then sent to the IP network where the second IP terminal is located through the second IP terminal.
- the topology connection setting unit specifically includes: a topology connection storage subunit, configured to pre-store the local end and the remote address of the IP terminal transceiving the RTSP message preset by the media gateway controller; and obtaining the setting by the media gateway controller
- the IP terminal sends the local and remote addresses of the RTSP message.
- the media gateway further includes: an event reporting unit, configured to: detect, by the first IP terminal, the first request for detection by the media gateway controller from the IP network where the first IP terminal is located
- the RTSP message is used to report the content of the first RTSP message to the media gateway controller by using an event;
- the command receiving unit is configured to send the replied RTSP message from the receiving IP terminal according to the command sent by the media gateway controller. , or forward the RTSP message through other IP terminals.
- the media gateway further includes: a message update unit, configured to determine, according to the extended signal indication sent by the media gateway controller, content of the RT SP message to be sent.
- the embodiment of the present invention further provides a system for processing a real-time streaming media protocol, including: a media gateway, configured to create a context according to an indication of a media gateway controller, and a third IP terminal inside the context, and negotiate a third IP address thereof.
- a media gateway configured to create a context according to an indication of a media gateway controller, and a third IP terminal inside the context, and negotiate a third IP address thereof.
- the border gateway is provided with the capability of forwarding and processing RTSP messages; and the user terminal equipment supporting the H.248 protocol is capable of supporting and transmitting RTSP messages.
- the present invention can be implemented by hardware, or can be implemented by means of software plus necessary general hardware platform, and the technical solution of the present invention. It can be embodied in the form of a software product that can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), including a number of instructions for making a computer device (may It is a personal computer, a server, or a network device, etc.) that performs the methods described in various embodiments of the present invention.
- a non-volatile storage medium which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.
- a computer device may It is a personal computer, a server, or a network device, etc.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Description
一种处理实时流媒体协议的方法、 装置及系统 本申请要求于 2007年 12月 3 日提交中国专利局、 申请号为 200710195883.6、 发明名称为 "一种处理实时流媒体协议的方法及 系统" 的中国专利申请, 以及于 2008年 3月 26 日提交中国专利 局、 申请号为 200810086354.7、 发明名称为 "一种处理实时流媒 体协议的方法及系统" 的中国专利申请的优先权, 其全部内容通 过引用结合在本申请中。 技术领域
本发明实施例涉及通信技术领域, 尤其涉及一种处理 RTSP ( Real Time Streaming Protocol , 实时流媒体协议) 的方法、 装置 及系统。 背景技术
MGC ( Media Gateway Controller, 媒体网关控制器) 和 MG ( Media Gateway ,媒体网关 )是分组网络中的两个关键构件。 MGC 负责呼叫控制功能, MG负责业务承载功能, 实现呼叫控制平面和 业务承载平面的分离, 从而充分共享网络资源, 简化设备升级和 业务扩展, 大大降低开发和维护成本。
媒体网关控制协议是 MG和 MGC之间通信的主要协议, 目前 应用较为广泛的有 H.248/MeGaCo 和 MGCP ( Media Gateway Controller Protocol, 媒体网关控制器协议) 两种协议; MG与 MG 之间通过 RTP ( Real-time Transport Protocol, 实时传输协议 )等协 议通信。
实时流协议 (RTSP ) 建立并控制一个或几个时间同步的连续 流媒体, 如音频和视频。 该媒体流可以是单播或者组播媒体流。 尽管连续媒体流可能与控制流交叉, RTSP 本身并不发送连续媒体 流。 换言之, RTSP 充当多媒体服务器的网络远程控制。 RTSP 提 供了一个可扩展框架, 实现实时数据 (如音频与视频) 的受控、
按需传送。数据源包括实况数据与存储的剪辑。 RTSP 用于控制多 个数据发送会话, 提供了选择发送通道的方式, 如 UDP ( User Datagram Protocol , 用户数据才艮协议) 、 组播 UDP 与 TCP ( Transmission Control Protocol, 传输控制协议) 等, 并提供了选 择基于 RTP ( Realtime Transmission Potocol, 实时传输协议) 的 发送机制的方法。
在实现本发明的过程中, 发明人发现现有技术至少存在以下 问题:
媒体网关可以完成媒体数据流在不同 IP网络之间的传递和相 关处理,但无法转发并处理 RTSP消息,媒体网关会丟弃接收到的 RTSP消息。 发明内容
本发明实施例提供一种处理 RTSP协议的方法、 装置及系统, 以实现媒体网关转发和处理 RTSP消息。
本发明实施例提供了一种处理实时流媒体协议的方法, 包括 以下步骤:
根据媒体网关控制器的指示创建上下文以及所述上下文内部 的第一 IP终端和第二 IP终端, 协商所述第一 IP终端收发实时流 媒体协议 RTSP消息的远端地址和本端地址, 以及第二 IP终端收 发实时流媒体协议 RTSP消息的远端地址和本端地址;
通过所述第一 IP终端从第一 IP网络接收到第一 RTSP消息后 , 通过所述第二 IP终端向第二 IP网络发送第二 RTSP消息; 和 /或 通过所述第二 IP终端从第二 IP网络接收到第二 RTSP消息后, 通 过所述第一 IP终端向第一 IP网络发送第一 RTSP消息。
本发明实施例还提供了另一种处理实时流媒体协议的方法, 包括以下步骤:
根据媒体网关控制器的指示创建上下文以及所述上下文内部 的第三 IP终端, 协商其上第三 IP终端收发实时流媒体协议 RTSP
消息的远端地址和本端地址;
通过所述第三 IP终端从所述第三 IP终端所在的 IP网络接收 到第三 RTSP消息后,将所述第三 RTSP消息的内容上报给媒体网 关控制器。
本发明实施例进一步提供了一种媒体网关, 包括:
拓朴连接设置单元, 用于根据媒体网关控制器指示创建上下 文以及所述上下文内部的第一 IP终端和第二 IP终端,在所述第一 IP终端和第二 IP终端上设置收发实时流媒体协议 RTSP消息的远 端地址;在所述第一 IP终端和第二 IP终端上分配收发实时流媒体 协议 RTSP消息的本端地址;
RTSP消息收发单元, 用于通过所述第一 IP终端从所述第一 IP终端所在的 IP网络接收到 RTSP消息, 所述 RTSP消息保持不 变或者进行修改后通过所述第二 IP终端发送到所述第二 IP终端所 在的 IP网络。
本发明实施例进一步提供了一种处理实时流媒体协议的系 统, 包括媒体网关和媒体网关控制器:
所述媒体网关, 用于根据媒体网关控制器指示创建上下文以 及所述上下文内部的第一 IP终端和第二 IP终端, 在所述第一 IP 终端和第二 IP终端上设置收发实时流媒体协议 RTSP消息的远端 地址;在所述第一 IP终端和第二 IP终端上分配收发实时流媒体协 议 RTSP消息的本端地址; 并通过所述第一 IP终端从所述第一 IP 终端所在的 IP网络接收到 RTSP消息, 所述 RTSP消息保持不变 或者进行修改后通过所述第二 IP终端发送到所述第二 IP终端所在 的 IP网络;
所述媒体网关控制器, 用于指示所述媒体网关创建上下文以 及所述上下文内部的第一 IP终端和第二 IP终端, 在所述第一 IP 终端和第二 IP终端上设置收发实时流媒体协议 RTSP消息的本端 地址和远端地址。
本发明实施例进一步提供了一种媒体网关, 包括:
拓朴连接设置单元, 用于根据媒体网关控制器的指示创建上 下文以及所述上下文内部的第三 IP终端,在所述第三 IP终端上设 置收发实时流媒体协议 RTSP消息的远端地址和本端地址;
RTSP消息收发单元, 用于通过所述第三 IP终端从所述第三 IP终端所在的 IP网络接收到第三 RTSP消息, 将所述第三 RTSP 消息的内容上报给媒体网关控制器。
本发明实施例进一步提供了一种处理实时流媒体协议的系 统, 包括媒体网关和媒体网关控制器:
所述媒体网关, 用于根据媒体网关控制器的指示创建上下文 以及所述上下文内部的第三 IP终端,协商其上第三 IP终端收发实 时流媒体协议 RTSP消息的远端地址和本端地址;并通过所述第三 IP终端从所述第三 IP终端所在的 IP网络接收到第三 RTSP消息后 , 将所述第三 RTSP消息的内容上报给媒体网关控制器;
所述媒体网关控制器, 用于指示所述媒体网关创建上下文以 及所述上下文内部的第三 IP终端,在所述第三 IP终端上设置收发 实时流媒体协议 RTSP消息的本端地址和远端地址;接收来自所述 媒体网关的所述第三 RTSP消息。
与现有技术相比, 本发明实施例中, 媒体网关通过创建上下 文以及所述上下文内部的第一 IP终端和第二 IP终端,通过在所述 第一 IP终端和第二 IP终端上设置收发实时流媒体协议 RTSP消息 的远端地址和本端地址;实现了媒体网关转发处理 RTSP消息的功 能。 附图说明
图 1是本发明实施例一中传递 RTSP消息的 H.248终端上下文 示意图;
图 2 是本发明实施例二中媒体网关控制器控制媒体网关直接 应答 RTSP消息的流程图;
图 3 是本发明实施例三中媒体网关控制器控制媒体网关继续
前向发送 RTSP消息的流程图;
图 4 是本发明实施例四中媒体网关控制器控制媒体网关收发 RTSP消息流程图;
图 5是本发明实施例中两个 IP网络之间的边界网关互通示意 图。 具体实施方式
媒体网关上通过 IP终端处理 RTSP消息过程如图 1所示。 本 发明实施例中所涉及的 RTSP消息可以为 RTSP请求消息或 RTSP 应答消息等。 其中, 第一 IP终端(即终端 1 , 下文统称 IP终端 1 ) 和第二 IP终端(即终端 2 , 下文统称 IP终端 2 )分别在第一 IP网 络 1 (图中表示为 IP网络 1 ) 和第二 IP网络 2 (图中表示为 IP网 络 2 ) 中。 IP终端是虚拟终端, 是被分配在网络接口上的。 终端 1 所在的网络接口在第一 IP网络 1中, 终端 2所在的网络接口在第 二 IP网络 2中。 终端 1和终端 2在收发和处理 RTSP消息的同时 可以用于收发和处理媒体数据流, 例如 RTP数据流和 RTCP数据 流, 终端 1和终端 2也可以只用来收发和处理 RTSP消息。 IP终 端上可以在不同的流描述符( stream descriptor ) 中分别描述 RTSP 消息和媒体数据流, 或者相同的流描述符中通过不同的 SDP 组 ( group ) 中分别描述 RTSP消息和媒体数据流, 因为收发以及处 理媒体数据流是媒体网关已有的功能, 这里不赘述。
媒体网关控制器控制媒体网关协商 IP终端收发 RTSP消息 的本端 (local )和远端 (remote )地址, 协商过程和协商媒体数据 流的本端和远端地址类似。 其中, 分配本端地址, 一般来说是接 收媒体流或 RTSP消息的目的地址,但是通常情况下也用该本端地 址作为发送媒体流的源地址。同一个上下文中的 IP终端 1和 IP终 端 2之间被设置拓朴连接关系。 H.248协议支持的拓朴连接关系包 括双向不导通, 双向导通和单向导通。 地址协商完成后, IP终端 1 从第一 IP网络 1接收到 RTSP消息, 通过上下文内部的终端之间
的拓朴连接 (此时拓朴允许从 IP终端 1到 IP终端 2导通) , 将 RTSP消息通过 IP终端 2发送到第二 IP网络 2; 同理, IP终端 2 从第二 IP网络 2接收到的 RTSP消息也可以通过上下文内部的终 端之间的拓朴连接(此时拓朴允许从 IP终端 2到 IP终端 1导通 ) , 将 RTSP消息通过 IP终端 1发送到第一 IP网络 1。
上述在 IP终端进行能力协商 (包括收发地址协商和 RTSP 编解码协商)的过程可以通过 SDP携带收发 RTSP消息的 IP地址 和端口号来实现。 例如, 媒体网关控制器向媒体网关发送创建 IP 终端或者修改 IP终端的命令, 其中,
本地(或者说本端) SDP中包含如下部分:
v=0
c=IN IP4 $
m=message $ udp RTSP
远端 SDP包含如下部分:
v=0
c=IN IP4 192.168.200.10
m=message 10000 udp RTSP
本地 SDP中, " v=0" 表示 SDP版本为 0; " c=IN IP4 $" 用来描述连接属性, " IN IP4" 表示使用 internet协议的 IPv4协 议, " $"表示要求媒体网关为该终端分配地址; " m=message $ udp RTSP" 用来描述媒体属性, " UDP" 表示使用 UDP协议, " $" 表示需要媒体网关分配一个 UDP端口, " message"表示媒体类型 为 message , " RTSP" 表示格式为 RTSP。
远端 SDP 中, " v=0" 表示 SDP 版本为 0 ; " c=IN IP4 192.168.200.10" 表示使用 internet 协议的 IPv4协议, 远端地址为 192.168.200.10; " m= message 10000 udp RTSP"表示远端使用 UDP 端口为 10000 , 媒体类型为 message , 格式为 RTSP。
虽然上述举例是通过 UDP协议传输 RTSP消息, 但实际中 也可以使用其它协议进行传输。 如果使用其它的传输层协议, 则
SDP的 111=行也要作对应的改动。 例如, 如果该 IP终端通过 TCP 协议传递 RTSP协议,则本端的 111=行的格式为类似 m=application 9 tcp iptv rts 的格式。
媒体类型和格式在协商过程中可以忽略, 例如本端 m=行也可 以为 m=- $ udp -。
媒体网关向媒体网关控制器的应答消息中的本地 SDP 包含 如下部分
v=0
c=IN IP4 192.168.200.100
m=message 20000 udp RTSP
以上 SDP 表示媒体网关为该 IP 终端分配了地址 192.168.100.100的 20000端口用于传递 UDP数据流, RTSP消息 可以通过该地址进行收发。
RTSP描述部分和媒体流描述部分也可以在不同的流描述符 中分别描述。 也可以在一个流描述符中并存。 例如:
v=0
c=IN IP4 $
m=message $ udp RTSP
v=0
c=IN IP4 $
m=audio $ RTP/AVP 8 本发明实施例一中,媒体网关控制器通过创建或者修改终端 向媒体网关通知远端 SDP的信息, 以及从媒体网关应答的消息中 获得媒体网关为接收和 /或发送 RTSP消息分配的 IP地址和端口。 本发明不排除通过不同的地址分别接收和发送 RTSP消息, 但是, 实际应用中通常使用相同的地址收发 RTSP消息。 另外, IP终端 可以用于收发 RTSP消息,也可以用来只接收或者只发送 RTSP消 息, 例如只处理单向的 RTSP消息的情况。 实际应用中, 还可能会
分成多个 H.248 消息交互才能完成。 例如, 增加终端的时候媒体 网关控制器不提供远端 SDP信息, 之后再通过修改终端的消息进 行通知。 通过设置终端 1和终端 2之间的拓朴关系, 可以将终端 1 和终端 2中的一个终端接收到的 RTSP消息通过另外一个终端发送 出去。
另外, 如果转发 RTSP消息的媒体网关支持路由模式下, 媒 体网关上创建接口级别的终端, 这些终端上不使用前面描述的 SDP方式来协商发送收发 RTSP消息的 IP地址和端口, 但是仍然 可以收发 RTSP消息。
媒体网关收到 RTSP消息后,还可以通过 H.248事件上 ^艮给 媒体网关控制器, 媒体网关控制器进行决策后可以指示媒体网关 发送应答的 RTSP消息, 也可以指示媒体网关的 IP终端继续向前 转发该 RTSP消息,该 RTSP消息在被转发前可以被媒体网关控制 器指示更新。
还有一种方式是媒体网关进行自治。媒体网关的终端 1侧接 收到 RTSP消息后, 不上报给媒体网关控制器, 而是自行通过终端 2 进行转发, 转发前还可能自发地对 RTSP 消息进行修改。 一些 RTSP消息中带有媒体流信息,例如带有 RTSP设备 A接收的媒体 流的 IP地址 AA1和端口 P1 , 而该地址对于媒体流对端是不可见 的, 因此媒体网关自发在终端 2侧的网络接口上分配 IP地址 BB2 和端口 P2用于接收该媒体流, 而在转发 RTSP消息时将 RTSP消 息中的 AA1和 P1替换成 BB2和 P2。 对于反向的 RTSP消息也要 做类似处理,在媒体网关上自行分配媒体资源和替换 RTSP消息中 的相关内容。 这里不再赘述。
在自治的方式下, 当自行分配的媒体资源使用完毕后,媒体 网关将其释放。
本发明实施例二是媒体网关控制器控制媒体网关继续前向 发送 RTSP消息的流程, 请一同参阅图 1与图 3 , 包括以下步骤: 步骤 s301 , RTSP设备 A向媒体网关发送第一 RTSP请求消
息。
步骤 s302 ,媒体网关的终端 1接收到该第一 RTSP请求消息, 通过 H.248事件将该第一 RTSP请求消息的内容上报给媒体网关控 制器。 终端 1 已经通过实施例 1 所述的方法确定了该终端接收 RTSP请求消息的 IP地址和端口, 和 /或, 发送 RTSP请求消息的 目的 IP地址和端口。
步骤 s303 ,媒体网关控制器向媒体网关应答该 Notify消息。 步骤 s304 , 媒体网关控制器通过 Modify消息指示媒体网关 通过终端 2发送第二 RTSP请求消息。可以是第一 RTSP请求消息 本身, 也可以是对该第一 RTSP内容的描述,媒体网关可以根据这 些信息以及自身保存的信息构造终端 2要发送的第二 RTSP请求消 息。
终端 2 已经通过实施例 1 所述的方法确定了该终端 2接收 RTSP消息的 IP地址和端口, 和 /或, 发送 RTSP请求消息的目的 IP地址和端口。
在该步骤中,媒体网关控制器可以对终端 1接收的 RTSP请 求消息中的内容进行替换, 包括对媒体流收发地址进行替换。 例 如, £设在同一个 IP终端上既处理媒体数据流又处理 RTSP请求 消息, 图 1 中的第一 IP网络 1 中的 RTSP设备 A在发出的 RTSP 消息 Ml中提供接收媒体流 S1的 IP地址 A1和端口 P1。该媒体流 由第二 IP网络 2中的 RTSP对端设备 B提供。 由于媒体网关的阻 隔, 该 RTSP设备 A对于第二 IP网络 2中的 RTSP对端设备 B来 说不可直接路由到达,所以该 RTSP请求消息被发送给媒体网关上 的 IP终端 1 , IP终端 1的功能包括转发媒体流 S1以及在 IP网络 中收发 RTSP消息。 第二 IP网络 2中的 IP终端 2的功能包括接收 媒体流 S1 , 以及在第二 IP网络 2中收发 RTSP消息。 媒体网关通 过 IP终端 2在向 RTSP远端设备 B转发 RTSP请求消息 Ml前, 需要将其中的 IP地址 A1和端口 P1替换成 IP终端 T2为接收媒体 流 S1分配的 IP地址和端口。 媒体流 S1到达 IP终端 2后通过 IP
终端 1发送到达第一 IP网络 1 , 最终被转发到第一 IP网络 1中的 RTSP设备 A。
同理, 如果媒体流的接收端 IP终端 1需要获得媒体流的源 IP地址和端口, 则需要媒体网关在转发 RTSP消息时对相应的头 域或者 SDP等作替换。 其原理和前面描述的替换媒体流的目的地 址相同。 这是因为媒体流通过媒体网关转发后源地址被替换成媒 体网关上发送该媒体流的 IP地址和端口, 所以 RTSP消息中携带 的发送媒体流的 IP地址和端口也需要被替换成媒体网关上转发该 媒体流时为其分配的用于发送该媒体流的 IP地址和端口。
本实施例中, 同一个终端,例如 IP终端 2 , 处理 RTSP消息 和媒体流时 , 该终端可以为 RTSP消息和 /或媒体流分配相同的或 者不同的 IP地址和端口。 媒体网关还可以为 RTSP消息和媒体流 分别创建终端, 但是多数情况下没有必要。 在某些情况下, 例如, 对于同一个会话,媒体流和 RTSP消息通过不同的路径传递(一种 可能的情况是通过两个不同的媒体网关进行传递) , 该媒体网关 只负责收发 RTSP消息而不收发涉及的媒体流。无论 RTSP消息和 媒体流是否通过同一个终端处理, 其处理流程相同。
前面提到媒体网关上要分配 IP地址和端口等资源用于收发 媒体流。 所以, 在本步骤前隐含了一个可选步骤, 即:媒体网关控 制器通过 H.248的 ADD命令或者 MODIDY命令指示媒体网关在 新的终端或者已有终端上分配这些用于收发媒体流的资源。 媒体 网关在应答消息中将被分配的资源的 IP 地址和端口等信息通过 SDP 返回给媒体网关控制器。 媒体网关控制器可以利用这些信息 构造第二 RTSP请求消息。
步骤 s305 ,媒体网关根据指示通过终端 2向 RTSP对端设备 发送第二 RTSP请求消息。该第二 RTSP请求消息的内容可能和步 骤 s301 中的第一 RTSP消息相同, 也可能在媒体网关控制器的指 示下对步骤 s301 中的第一 RTSP消息做了更改。 媒体网关可以通 过设置终端 1到终端 2之间的拓朴关系 (例如修改成 isolate )避免
终端 2既发送媒体网关控制器指示发送的 RTSP消息,又转发终端 1接收到的 RTSP消息。
步骤 s306 , 媒体网关向媒体网关控制器发送 Modify消息的 应答消息。
步骤 s306和步骤 s305的次序可以颠倒。
步骤 s307 ,媒体网关在终端 2上接收到前述第二 RTSP请求 消息的应答消息。
步骤 s308 ,媒体网关通过终端 1向 RTSP客户转发 RTSP应 答消息。
步骤 s307和步骤 s308之间,媒体网关可以向媒体网关控制 器上报接收到的 RTSP应答消息,并且接收媒体网关控制器的指示 以确定向 RTSP设备发送的 RTSP应答消息的内容。其原理和步骤 s302、 步骤 s303、 步骤 s304、 步骤 s306相同, 这里不赘述。
媒体网关处理 RT SP请求消息和处理 RT SP应答消息可以是 两个独立的过程, 例如某个媒体网关只处理 RTSP 请求消息, 而 RTSP应答消息不通过该媒体网关传递 (通过别的传输路径), 或者 本媒体网关上的其它 IP终端传递。 将这两个过程放在图 3的同一 个流程中是为了完整说明一整个 RTSP的请求加应答的流程,但是 并不妨碍本发明只用在针对 RTSP请求消息或者只针对 RTSP应答 消息。
如果媒体网关上配置了对该 RTSP消息的处理规则,则步骤 s302、 步骤 s303、 步骤 s304、 步骤 s306为可选。 即媒体网关可以 自己完成对该 RTSP请求消息的前向转发,在被转发前该消息可以 被媒体网关更新。 该配置可以由媒体网关控制器设置或者更新。 该配置可能包括媒体流收发 IP地址和端口的替换逻辑以及 RTSP 消息中一些字段和头域等的替换逻辑等, 该配置功能在后面有详 细描述。
实施例二中的 RTSP设备和 RTSP对端设备分别是 RTSP客 户端和 RTSP服务器, 或者分别是 RTSP服务器和 RTSP客户端。
如果协议允许 RTSP客户端之间或者 RTSP服务器之间进行 RTSP 协议交互, 则 RTSP设备和 RTSP对端设备也可能同为 RTSP客户 端或者 RTSP服务器。 根据本发明实施例, 媒体网关控制器控制媒体网关协商 IP 终端收发 RTSP消息的本端 ( local )和远端 ( remote )地址后 , 在 某些场景下, 单个的 IP终端也能够实现对 RTSP消息的处理。 为 与实施例二进行区别, 将单独处理 RTSP消息的 IP终端称为第三 IP终端, 该第三终端处理的 RTSP消息为第三 RTSP消息。该第三 IP终端可以为图 1中的终端 1、终端 2或者是专门创建的终端。 下 面通过具体的应用场景进行说明。
本发明实施例三是媒体网关控制器控制媒体网关直接应答 RTSP消息的流程, 如图 2所示, 所述的第三终端具体为终端 1 , 包括以下步骤:
步骤 s201 , RTSP设备向媒体网关发送第三 RTSP消息, 如 RTSP请求消息。
步骤 s202 ,媒体网关的终端 1接收到该 RTSP请求消息,通 过 H.248事件将该 RTSP请求消息的内容上报给媒体网关控制器。 终端 1 已经通过实施例 1所述的方法指定了接收 RTSP消息的 IP 地址和端口。
步骤 s203 ,媒体网关控制器向媒体网关应答该 Notify消息。 步骤 s204 , 媒体网关控制器通过 Modify消息指示媒体网关 通过终端 1发送 RTSP应答消息。该消息中携带 RTSP应答消息的 内容, 可以是 RTSP消息本身, 也可以是对该 RTSP内容的描述。 例如, 如果 RTSP请求中要求的带宽无法满足, 则媒体网关控制器 指示媒体网关应答错误码。
步骤 s205 ,媒体网关根据指示通过终端 1发送 RTSP应答消 息。
步骤 s206 , 媒体网关向媒体网关控制器发送 Modify消息的
应答消息。
步骤 s206和步骤 s205的次序可以颠倒。如果媒体网关上配 置或者由媒体网关控制器设置了对该 RTSP消息的处理逻辑,则步 骤 s202、 步骤 s203、 步骤 s204和步骤 s206为可选, 即媒体网关 可以自己完成对该 RTSP请求消息的应答,不需要与媒体网关交互 控制信息。其中, RTSP设备是 RTSP客户端( client )或者 RTSP 服 务器 ( server ) 。
本发明实施例四中, 如果 H.248 终端设备(例如 UE 中的 RG设备) 需要支持 RTSP协议功能, 则需要媒体网关控制器控制 媒体网关收发 RTSP消息,从而使支持 H.248协议的本身包含了住 宅网关等媒体网关的用户终端设备支持收发 RTSP消息的能力。如 图 4所示, 包括以下步骤:
步骤 s401 , 媒体网关控制器通过 Modify消息指示媒体网关 通过第三 IP终端(终端 3 )发送第三 RTSP消息, 如 RTSP请求消 息。 该消息中携带 RTSP 消息的内容。 终端 3 已经通过实施例 1 所述的方法确定了该终端接收 RTSP请求消息的 IP地址和端口, 和 /或, 发送 RTSP请求消息的目的 IP地址和端口。
步骤 s402, 媒体网关根据指示通过终端 3发送媒体网关控 制器要求发送的 RTSP请求消息。
步骤 s403 , 媒体网关向媒体网关控制器发送 Modify消息的 应答消息。
步骤 s403和步骤 s404的次序可以颠倒。
步骤 s404 , 媒体网关在终端 3上接收到 RTSP应答消息。 步骤 s405 ,媒体网关通过 H.248事件将接收到的 RTSP应答 消息的内容上报给媒体网关控制器。
步骤 s406 ,媒体网关控制器向媒体网关应答该 Notify消息。 媒体网关上涉及到分配资源进行媒体流收发时,媒体网关控 制器通过在媒体网关上创建或者修改终端的方式分配资源。 媒体 网关在应答消息中返回的 IP地址和端口等资源信息被用于 RTSP
消息中描述媒体信息。
本发明实施例五中, 媒体网关可以作为媒体流的緩存
( cache ) 。 媒体网关上緩存媒体数据, 如图 1所示, 媒体网关接 收到 RTSP设备 A发送的请求获得媒体流的请求后,可以向 RTSP 设备 B 请求媒体流, 也可以将自身已经緩存的媒体数据提供给 RTSP设备 A。 在这种情况下, 媒体网关可以终结 RTSP消息, 给 RTSP设备 A发送应答消息,进而将自身緩存的媒体流数据提供给 RT SP设备 A。 RT SP设备 A请求的媒体流还可以部分由媒体网关 中的緩存提供, 部分由媒体网关向其它 RTSP设备(例如图 1中的 RTSP设备 B )请求获得后转发给 RTSP设备 A。 在该实施例的情 况下, 媒体网关可以自行对 RTSP设备 A的 RTSP请求消息进行 应答, 也可以将 RTSP设备 A发来的 RTSP请求消息的内容上报 给媒体网关控制器, 还可以进而由媒体网关控制器指示向 RTSP 设备 A发送应答消息。 媒体网关在 RTSP设备 B这一侧也同理, 媒体网关可以自己收发 RTSP消息,也可以在媒体网关控制器的指 示下上报接收到的 RTSP消息的内容和 /或发送 RTSP消息。
为了实现实施例二到实施例五中的各个流程, 需要对 H.248 协议做扩展, 扩展要完成的基本功能如下: 媒体网关通过扩展的 事件上报检测到的 RTSP消息,上报事件中携带 RTSP消息的内容; 媒体网关控制器通过扩展的信号指示媒体网关发送 RTSP消息,信 号中通过参数携带要发送的 RTSP消息的内容;媒体网关控制器通 过扩展的属性向媒体网关设置处理 RTSP 消息的规则, 例如更改 RTSP消息头域的规则, 根据这些规则, 媒体网关可以自主完成对 RTSP 消息的更新和转发, 减少和媒体网关控制器之间的消息交 互。
以下是该扩展的一个具体方案: 扩展 H.248包 RTSPfunc, 在 RTSPfunc包中扩展事件 RTSPe, 该事件的参数包括:
1、 方法(method )过滤参数 mf, 通过该参数, 媒体网关控 制器指示媒体网关需要上报的 RTSP方法列表。例如只要求检测上
报 setup方法和 teardown方法。 该参数的数据类型为枚举列表,枚 举值为 RTSP协议支持的各方法。
2、 承载层转发开关参数 tt, 通过该参数, 媒体网关控制器 指示媒体网关是否在承载层前向转发已经被上报的 RTSP消息,例 如图 1中终端 1接收到 RTSP消息后是否在承载层通过终端 2前向 转发。媒体网关控制器接收到该事件后可能会对 RTSP消息进行更 新后指示媒体网关通过终端 2 进行转发, 但是, 媒体网关内部也 可以通过拓朴关系(此时拓朴允许从终端 1 到终端 2 导通)对该 RTSP消息进行转发, 这样会有双份 RTSP消息发往目的地址。 所 以如果媒体网关控制器准备自己控制转发上报的 RTSP消息,可以 通过该参数指示媒体网关是否在承载层向前转发已经上报的 RTSP消息。 该参数的数据类型为开关变量。 取值为 on/off, 默认 值为 on。 on表示媒体网关自行前向转发。 Off表示媒体网关不前 向转发。 还可以定义参数要求媒体网关上报涉及 QoS 指标的 RTSP 消息。 例如, 定义如下参数:
3、 带宽上报参数 br, 该参数为开关变量, 取值为 on/off, 默认值为 off; 如果该开关值为 on, 如果终端接收到的 RTSP消息 中涉及到传输带宽, 则需要上报。
4、 速度改变参数 sc , 该参数为开关变量, 取值为 on/off, 默认值为 off; 如果该开关值为 on, 如果终端接收到的 RTSP消息 中 speed头域值发生变化, 则需要上报。
还可以定义其它一些参数, 当 RTSP消息中携带其它涉及到 QoS指标的信息时, 触发媒体网关的事件上报。
5、媒体流携带参数 sap, 该参数为开关变量, 取值为 on/off, 默认值为 on; 如果该开关值为 on, 如果终端接收到的 RTSP消息 中携带了媒体流描述信息, 则需要上报。
6、 指定报告内容参数 rc , 该参数描述媒体网关控制器需要
媒体网关上报的信息形式 . 例如可以用该参数指定要求媒体网关 上报整个 RTSP消息体, 也可以通过该参数指定只要求上报 RTSP 消息中被指定的部分的内容, 举例说明如下:指定要求媒体网关上 报指定内容(例如 Speed 头域等) , 指定要求媒体网关上报指定 头域中指定具体选项的内容(例如 Transport头域的 dest— addr和 src— addr字段等)。 通过该参数, 媒体网关控制器可以从媒体网关 获得所需要的内容。
该事件上才艮的参数 ( ObservedEventsDescriptor参数) 包括:
1、 RTSP消息内容。 可以定义通过该参数直接将整个 RTSP 消息作为该参数的内容上报给媒体网关控制器。 该情况下该参数 的数据类型是字串。
媒体网关可能被要求将 RTSP 消息的内容分解后上报指定 的内容, 例如上 4艮 RTSP消息的 Transport头域中的源地址和目的 地址等.还可以定义相应的参数——实现上报 RTSP消息分解后的 各个媒体网关控制器要求上报的单项信息. 参数的定义方法不唯 一, 这里不赘述。
定义信号 RTSPs, 该信号的参数包括: RTSP消息内容, 可 以定义将整个 RTSP消息作为该参数的内容下发给媒体网关 ,该参 数的数据类型是字符串。 媒体网关接收到该信号后, 将参数中携 带的 RTSP消息发送到 remote 描述符指定的地址。 其它的可行办 法是将 RTSP消息的内容分解成各项信息分别在多个参数中下发, 媒体网关根据该这些参数中携带的信息构造 RTSP消息并发送.具 体细节这里不——赘述。
定义媒体网关控制器向媒体网关设置处理 RTSP 消息的规 则可以通过如下属性:
1、 定义属性 requrl, 该属性用于媒体网关控制器向媒体网 关设置处理 RTSP消息中的" Request-URI" 部分的规则。 该属性 的数据类型为字符串。 该参数默认为空, 表示不对 "Request-URI " 进 行 转 换 。 如 果 requrl 参 数 的 值 为 "
RT SP: //example . com/fizzle/foo " , 媒体网关在设置了该参数的终端 上收到如下消息:
C->S: TEARDOWN RTSP:// bigserver.com/fizzle/foo RTSP/1.0
CSeq: 892
Session: 12345678
则媒体网关在前向转发该消息时会将发出的消息修改成
C->S: TEARDOWN RTSP:// example.com/fizzle/foo RTSP/1.0
CSeq: 892
Session: 12345678
2、 定义属性 srcaddrexp, 该属性的数据类型为字符串. 代表 需要将收到的 RTSP消息中的 Transport头域的 src— addr字段的内 容 替 换 成 的 值 . 例 如 , 该 属 性 值 为 "10.11.1.100:9000"/"10.11.1.100:9001 " 代表将接收到的 Transport 头 域 的 src— addr 字 段 的 内 容 替 换 成 "10.11丄100:9000"/"10.11.1.100:9001 "。
还可以定义类似属性用来替换 RTSP消息中 SDP中涉及的媒 体流源地址和 /或目的地址。
媒体网关收发 RTSP消息的 IP终端和收发媒体流的 IP终端可 以是相同的 IP终端, 也可以不同的 IP终端。 单播媒体流通过媒体 网关后, 媒体流源地址会变成媒体网关上发送该媒体流的源地址; 单播媒体流到达媒体网关时, 媒体流目的地址是媒体网关的地址, 在媒体网关将其在另外一侧的 IP网络中转发出去时, 目的地址也 需要被更新成目的地的地址。被媒体网关转发的 RTSP消息中可能 携带 RTSP设备自身收发媒体流的 IP地址和端口, 而一般来说媒 体网关一侧的 IP网络中的设备地址对另外一侧的 IP网络中的设备 来说是不可以直接到达的, 所以媒体网关需要将被自己转发处理 的 RTSP 消息中携带的媒体流的源地址和目的地址中受影响的部 分替换成媒体网关的 IP终端上分配的地址。
为了便于说明, 本发明中媒体流源地址表示媒体流的源 IP地
址和端口, 目的地址表示目的 IP地址和端口。
下面用一个示例描述前述地址转换过程, 结合图 5 , 具体过程 包括:
在图 5中的两个 IP网络之间的边界网关同时也是一个媒体网 关, 该媒体网关完成媒体数据流在不同 IP网络之间的传递和相关 处理, 而且转发并处理 RTSP消息。
1、 终端 1接收到 RTSP设备 A如下 RTSP消息:
C->S: SETUP RTSP:〃 example. com/foo/bar/baz.rm RTSP/2.0
CSeq: 302
Transport:
RTP/AVP;unicast;dest_addr=" :4588 " :4589",
RTP/AVP/TCP;unicast;interleaved=0-l
媒体流的目的端口是 4588和 4589 , 而媒体网关在第二 IP网 络 2侧为该媒体流分配的端口是 8000和 8001。
2、 终端 2向 RTSP消息的目的设备 B转发该 RTSP消息时发 出的是:
C->S: SETUP RTSP:〃 example. com/foo/bar/baz.rm RTSP/2.0
CSeq: 302
Transport:
RTP/AVP;unicast;dest_addr=": 8000 " :8001 ", RTP/AVP/TCP;unicast;interleaved=0-l
3、 终端 2接收到如下应答消息:
S->C: RTSP/2.0 200 OK
CSeq: 302
Date: 23 Jan 1997 15:35:06 GMT
Server: Phony Server 1.1
Session: 47112344;timeout=60
Transport:
RTP/AVP;unicast;dest_addr=": 8000 " :8001 "; src_addr="192.0.2.241 :6256 " 192.0.2.241 :6257";
ssrc=2A3F93ED
Accept-Ranges: NPT
192.0.2.241 :6256"和" 192.0.2.241 :6257"是该媒体流的源 IP 地 址和端口,而媒体网关为该媒体流在第一 ip网络 1侧分配的 ip地 址和端口是 10.11.1.100:9000 和 10.11.1.100:9001。
4、 终端 1向 RTSP设备 A转发该 RTSP消息时发出的是:
Session: 47112344;timeout=60
Transport:
RTP/AVP;unicast;dest_addr=":4588 ":4589"; src_addr="10.11.1.100:9000 " 10.11.1.100:9001 ";
ssrc=2A3F93ED
Accept-Ranges: NPT
通过对媒体流收发地址的替换, 实现了媒体网关两侧的 RTSP 设备都和媒体网关上的 IP终端交互媒体流, 而媒体网关在其中对 RTSP消息起到了变换和传递功能。 对 RTSP消息的变换和传递功 能有如下两个方法:
一种是媒体网关上报接收到的 RTSP消息给媒体网关控制器, 由媒体网关控制器将要发送的 RTSP消息的信息发给媒体网关,该 信息中携带了转换后的 IP地址和端口. 图 3的流程中的步骤 302 到步骤 306使用了该方法。
另一种是提前将转换规则下发给媒体网关, 媒体网关按照规 则替换 RT SP消息中的相关的部分, 例如媒体流 IP地址和端口, 指定的头域, 字段等。
本发明实施例还提供了一种处理实时流媒体协议的系统, 包 括: 媒体网关, 用于接收媒体网关控制器指示创建上下文以及所 述上下文内部的第一 IP终端和第二 IP终端, 在所述第一 IP终端 和第二 IP终端上设置收发实时流媒体协议 RTSP消息的远端地址; 在所述第一 IP 终端和第二 IP 终端上分配收发实时流媒体协议 RTSP消息的本端地址; 并通过所述第一 IP终端从所述第一 IP终 端所在的 IP网络接收到 RTSP消息, 所述 RTSP消息保持不变或 者进行修改后通过所述第二 IP终端发送到所述第二 IP终端所在的 IP 网络。 媒体网关控制器, 用于指示所述媒体网关创建上下文以 及所述上下文内部的第一 IP终端和第二 IP终端, 在所述第一 IP 终端和第二 IP终端上设置收发实时流媒体协议 RTSP消息的本端 地址和远端地址。
所述媒体网关具体包括: 拓朴连接设置单元, 用于接收媒体 网关控制器指示创建上下文以及所述上下文内部的第一 IP终端和 第二 IP终端, 在所述第一 IP终端和第二 IP终端上设置收发实时 流媒体协议 RTSP消息的远端地址; 在所述第一 IP终端和第二 IP 终端上分配收发实时流媒体协议 RTSP消息的本端地址; RTSP消 息收发单元,用于通过所述第一 IP终端从所述第一 IP终端所在的
IP网络接收到 RTSP消息,所述 RTSP消息保持不变或者进行修改 后通过所述第二 IP终端发送到所述第二 IP终端所在的 IP网络。
所述拓朴连接设置单元具体包括: 拓朴连接存储子单元, 用 于预先存储由媒体网关控制器预先设定的 IP终端收发 RTSP消息 的本端和远端地址;获取由媒体网关控制器设置 IP终端发送 RTSP 消息的本端和远端地址。
所述媒体网关还包括: 事件上报单元, 用于第一 IP终端从所 述第一 IP终端所在的 IP网络检测媒体网关控制器要求检测的第一
RTSP消息, 通过事件将所述第一 RTSP消息的内容上报给媒体网 关控制器; 命令接收单元, 用于根据所述媒体网关控制器下发的 命令, 从所述接收 IP终端发送应答的 RTSP消息, 或通过其他 IP 终端转发所述 RTSP消息。
所述媒体网关还包括: 消息更新单元, 用于根据媒体网关控 制器下发的扩展信号指示确定要发送的 RT SP消息的内容。
本发明实施例还提供了一种处理实时流媒体协议的系统, 包 括: 媒体网关, 用于根据媒体网关控制器的指示创建上下文以及 所述上下文内部的第三 IP终端,协商其上第三 IP终端收发实时流 媒体协议 RTSP消息的远端地址和本端地址; 并通过所述第三 IP 终端从所述第三 IP终端所在的 IP网络接收到第三 RTSP消息后, 将所述第三 RTSP消息的内容上报给媒体网关控制器。
本发明的实施例中,使边界网关具备转发和处理 RTSP消息的 能力;使支持 H.248协议的用户终端设备支持收发 RTSP消息的能 力。
通过以上的实施方式的描述, 本领域的技术人员可以清楚地 了解到本发明可以通过硬件实现, 也可以可借助软件加必要的通 用硬件平台的方式来实现基于这样的理解, 本发明的技术方案可 以以软件产品的形式体现出来, 该软件产品可以存储在一个非易 失性存储介质 (可以是 CD-ROM, U盘, 移动硬盘等) 中, 包括 若干指令用以使得一台计算机设备(可以是个人计算机, 服务器, 或者网络设备等)执行本发明各个实施例所述的方法。
总之, 以上所述仅为本发明的较佳实施例而已, 并非用于限 定本发明的保护范围。 凡在本发明的精神和原则之内, 所作的任 何修改、 等同替换、 改进等, 均应包含在本发明的保护范围之内。
Claims
1、 一种处理实时流媒体协议消息的方法, 其特征在于, 包括以 下步骤:
根据媒体网关控制器的指示创建上下文以及所述上下文内部的 第一 IP终端和第二 IP终端, 协商所述第一 IP终端收发实时流媒体 协议 RTSP消息的远端地址和本端地址, 以及第二 IP终端收发实时 流媒体协议 RTSP消息的远端地址和本端地址;
通过所述第一 IP终端从第一 IP网络接收到第一 RTSP消息后, 通过所述第二 IP终端向第二 IP网络发送第二 RTSP消息; 和 /或通过 所述第二 IP终端从第二 IP网络接收到第二 RTSP消息后, 通过所述 第一 IP终端向第一 IP网络发送第一 RTSP消息。
2、 如权利要求 1所述的方法, 其特征在于, 还包括:
在所述第一 IP终端和 /或第二 IP终端上进一步设置承载 RTSP消 息的传输层协议类型,通过设置的传输层协议进行 RTSP消息的传输。
3、 如权利要求 1所述的方法, 其特征在于,
所述收发 RTSP消息的本端地址包括: 收发 RTSP消息的本端 IP 地址和端口号;
所述收发 RTSP消息的远端地址包括: 收发 RTSP消息的远端 IP 地址和端口号。
4、 如权利要求 1 所述的方法, 其特征在于, 所述将第二 RTSP 消息由所述第二 IP终端向第二 IP网络发送, 是根据配置的对 RTSP 消息的处理逻辑或者由媒体网关控制器设置的对 RTSP消息的处理逻 辑, 通过 ¾。下方式进行:
将所述将第一 RTSP消息保持不变, 作为第二 RTSP消息通过所 述第二 IP终端发送给所述第二 IP网络;
或者将所述第一 RTSP消息进行修改后, 作为第二 RTSP消息通 过所述第二 IP终端发送到所述第二 IP网络。
5、 如权利要求 1所述的方法, 其特征在于, 将第二 RTSP消息
由所述第二 IP终端向第二 IP网络发送前包括:
将所述第一 RTSP消息的内容上报给媒体网关控制器;
所述将第二 RTSP消息由所述第二 IP终端向第二 IP网络发送为: 接收媒体网关控制器指示,通过所述第二 IP终端发送第二 RTSP 消息, 所述第二 RTSP消息由媒体网关控制器指定, 其内容和所述第 一 RTSP 消息相同, 或者其内容为所述媒体网关控制器对所述第一
RTSP消息进行了修改后的内容。
6、如权利要求 4或 5所述的方法,其特征在于,将所述第一 RTSP 消息进行修改,修改的内容包括第一 RTSP消息中包含的媒体流源地 址和 /或目的地址,则所述第二 RTSP消息中包含修改后的媒体流源地 址和 /或目的地址。
7、 如权利要求 1所述的方法, 其特征在于, 所述协商其上第一 IP终端收发实时流媒体协议 RTSP消息的远端地址和本端地址,以及 第二 IP终端收发实时流媒体协议 RTSP消息的远端地址和本端地址 的步骤包括: 接收媒体网关控制器下发的扩展的信息, 根据所述扩展 的信息为所述第一 IP终端和所述第二 IP终端分配相应的地址。
8、 一种处理实时流媒体协议消息的方法, 其特征在于, 包括以 下步骤:
根据媒体网关控制器的指示创建上下文以及所述上下文内部的 第三 IP终端, 协商其上第三 IP终端收发实时流媒体协议 RTSP消息 的远端地址和本端地址;
通过所述第三 IP终端从所述第三 IP终端所在的 IP网络接收到 第三 RTSP消息后, 将所述第三 RTSP消息的内容上报给媒体网关控 制器。
9、 如权利要求 8所述的方法, 其特征在于, 所述第三 RTSP消 息为 RTSP请求消息, 所述方法进一步包括:
根据所述媒体网关控制器的指示通过所述第三 IP终端发送 RTSP 应答消息。
10、 如权利要求 8所述的方法, 其特征在于, 所述第三 RTSP消 息为 RTSP应答消息, 通过所述第三 IP终端从所述第三 IP终端所在 的 IP网络接收到第三 RTSP消息之前还包括:
根据媒体网关控制器指示通过所述第三 IP终端发送 RTSP请求 消息。
11、 如权利要求 8所述的方法, 其特征在于, 还包括:
緩存媒体流数据, 通过所述第三 IP终端接收到媒体流请求后, 将自身緩存的媒体流数据提供给所述媒体流请求的发起设备。
12、 一种媒体网关, 其特征在于, 包括:
拓朴连接设置单元,用于根据媒体网关控制器指示创建上下文以 及所述上下文内部的第一 IP终端和第二 IP终端, 在所述第一 IP终 端和第二 IP终端上设置收发实时流媒体协议 RTSP消息的远端地址; 在所述第一 IP终端和第二 IP终端上分配收发实时流媒体协议 RTSP 消息的本端地址;
RTSP消息收发单元, 用于通过所述第一 IP终端从所述第一 IP 终端所在的 IP网络接收到 RTSP消息,所述 RTSP消息保持不变或者 进行修改后通过所述第二 IP终端发送到所述第二 IP终端所在的 IP 网络。
13、 如权利要求 12所述的媒体网关, 其特征在于, 所述拓朴连 接设置单元具体包括:
拓朴连接存储子单元,用于预先存储由媒体网关控制器预先设定 的 IP终端收发 RTSP消息的本端和远端地址; 获取由媒体网关控制 器设置 IP终端发送 RTSP消息的本端和远端地址。
14、 如权利要求 12所述的媒体网关, 其特征在于, 还包括: 事件上报单元, 用于第一 IP终端从所述第一 IP终端所在的 IP 网络检测媒体网关控制器要求检测的第一 RTSP消息, 通过事件将所 述第一 RTSP消息的内容上报给媒体网关控制器;
命令接收单元, 用于根据所述媒体网关控制器下发的命令,从所
述接收 IP终端发送应答的 RTSP消息 , 或通过其他 IP终端转发所述 RTSP消息。
15、 如权利要求 12所述的媒体网关, 其特征在于, 还包括: 消息更新单元,用于根据媒体网关控制器下发的扩展信号指示确 定要发送的 RTSP消息的内容。
16、 一种处理实时流媒体协议消息的系统, 其特征在于, 包括媒 体网关和媒体网关控制器:
所述媒体网关,用于根据媒体网关控制器指示创建上下文以及所 述上下文内部的第一 IP终端和第二 IP终端, 在所述第一 IP终端和 第二 IP终端上设置收发实时流媒体协议 RTSP消息的远端地址; 在 所述第一 IP终端和第二 IP终端上分配收发实时流媒体协议 RTSP消 息的本端地址; 并通过所述第一 IP终端从所述第一 IP终端所在的 IP 网络接收到 RTSP消息, 所述 RTSP消息保持不变或者进行修改后通 过所述第二 IP终端发送到所述第二 IP终端所在的 IP网络;
所述媒体网关控制器,用于指示所述媒体网关创建上下文以及所 述上下文内部的第一 IP终端和第二 IP终端, 在所述第一 IP终端和 第二 IP终端上设置收发实时流媒体协议 RTSP消息的本端地址和远 端地址。
17、 一种媒体网关, 其特征在于, 包括:
拓朴连接设置单元,用于根据媒体网关控制器的指示创建上下文 以及所述上下文内部的第三 IP终端, 在所述第三 IP终端上设置收发 实时流媒体协议 RTSP消息的远端地址和本端地址;
RTSP消息收发单元, 用于通过所述第三 IP终端从所述第三 IP 终端所在的 IP网络接收到第三 RTSP消息,将所述第三 RTSP消息的 内容上报给媒体网关控制器。
18、 如权利要求 17 所述的媒体网关, 其特征在于, 所述 RTSP 消息收发单元具体用于根据媒体网关控制器指示通过所述第三 IP终
端发送 RTSP请求消息或 RTSP应答消息。
19、 如权利要求 17所述的媒体网关, 其特征在于, 还包括: 媒体流数据处理单元, 用于緩存媒体流数据, 并在通过所述第三 IP终端接收到媒体流请求后,将自身緩存的媒体流数据提供给所述媒 体流请求的发起设备。
20、 一种处理实时流媒体协议消息的系统, 其特征在于, 包括媒 体网关和媒体网关控制器:
所述媒体网关,用于根据媒体网关控制器的指示创建上下文以及 所述上下文内部的第三 IP终端, 协商其上第三 IP终端收发实时流媒 体协议 RTSP消息的远端地址和本端地址; 并通过所述第三 IP终端 从所述第三 IP终端所在的 IP网络接收到第三 RTSP消息后, 将所述 第三 RTSP消息的内容上报给媒体网关控制器;
所述媒体网关控制器,用于指示所述媒体网关创建上下文以及所 述上下文内部的第三 IP终端, 在所述第三 IP终端上设置收发实时流 媒体协议 RTSP消息的本端地址和远端地址; 接收来自所述媒体网关 的所述第三 RTSP消息。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP08868017.8A EP2211507B1 (en) | 2007-12-03 | 2008-12-03 | Method, device and system for processing real time streaming protocol |
Applications Claiming Priority (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200710195883 | 2007-12-03 | ||
CN200710195883.6 | 2007-12-03 | ||
CN200810086354.7 | 2008-03-26 | ||
CN200810086354.7A CN101453349B (zh) | 2007-12-03 | 2008-03-26 | 一种处理实时流媒体协议的方法及系统 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2009082908A1 true WO2009082908A1 (fr) | 2009-07-09 |
Family
ID=40735387
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2008/073318 WO2009082908A1 (fr) | 2007-12-03 | 2008-12-03 | Procédé, dispositif et système de traitement d'un protocole de flux en temps réel |
Country Status (3)
Country | Link |
---|---|
EP (1) | EP2211507B1 (zh) |
CN (1) | CN101453349B (zh) |
WO (1) | WO2009082908A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114244908A (zh) * | 2021-11-05 | 2022-03-25 | 浙江蓝卓工业互联网信息技术有限公司 | 一种跨网域的rtsp流媒体传输方法 |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120144056A1 (en) * | 2009-08-12 | 2012-06-07 | Nederlandse Organisatie Voor Toegepast- Natuurwetenschappelijk Onderzoek Tno | Dynamic RTCP Relay |
KR102184492B1 (ko) * | 2013-11-19 | 2020-11-30 | 삼성전자주식회사 | 스트리밍 데이터 서비스를 위한 서버, 사용자 단말 장치 및 방법 |
CN106506444B (zh) * | 2016-09-21 | 2019-04-26 | 中国电子科技集团公司第三十研究所 | 一种面向lte集群系统的媒体协商系统及方法 |
CN107920045A (zh) * | 2016-10-08 | 2018-04-17 | 中兴通讯股份有限公司 | 一种会话描述协议消息生成方法和装置 |
CN107070866B (zh) * | 2016-12-30 | 2021-01-01 | 北京奇虎科技有限公司 | 一种流数据的传输方法和装置 |
CN110768810B (zh) * | 2018-07-25 | 2021-03-30 | 华为技术有限公司 | 确定报文流描述的方法、装置和系统 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1656772A (zh) * | 2002-05-21 | 2005-08-17 | 通用仪表公司 | 用于相关流协议集合的保密参数关联 |
EP1619853A1 (en) * | 2004-07-21 | 2006-01-25 | Siemens Mobile Communications S.p.A. | RTSP proxy extended to detect streaming session events and report to valued streaming applications the notified ones |
CN101022401A (zh) * | 2006-02-14 | 2007-08-22 | 中国移动通信集团公司 | 基于服务器的播出指令提供组播的方法 |
CN101022344A (zh) * | 2006-02-14 | 2007-08-22 | 中国移动通信集团公司 | 通过监听消息为终端提供组播的方法 |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101026616B (zh) * | 2006-02-18 | 2013-01-09 | 华为技术有限公司 | 基于ip多媒体子系统的交互式媒体会话建立方法 |
-
2008
- 2008-03-26 CN CN200810086354.7A patent/CN101453349B/zh active Active
- 2008-12-03 WO PCT/CN2008/073318 patent/WO2009082908A1/zh active Application Filing
- 2008-12-03 EP EP08868017.8A patent/EP2211507B1/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1656772A (zh) * | 2002-05-21 | 2005-08-17 | 通用仪表公司 | 用于相关流协议集合的保密参数关联 |
EP1619853A1 (en) * | 2004-07-21 | 2006-01-25 | Siemens Mobile Communications S.p.A. | RTSP proxy extended to detect streaming session events and report to valued streaming applications the notified ones |
CN101022401A (zh) * | 2006-02-14 | 2007-08-22 | 中国移动通信集团公司 | 基于服务器的播出指令提供组播的方法 |
CN101022344A (zh) * | 2006-02-14 | 2007-08-22 | 中国移动通信集团公司 | 通过监听消息为终端提供组播的方法 |
Non-Patent Citations (1)
Title |
---|
See also references of EP2211507A4 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114244908A (zh) * | 2021-11-05 | 2022-03-25 | 浙江蓝卓工业互联网信息技术有限公司 | 一种跨网域的rtsp流媒体传输方法 |
CN114244908B (zh) * | 2021-11-05 | 2024-08-23 | 浙江蓝卓工业互联网信息技术有限公司 | 一种跨网域的rtsp流媒体传输方法 |
Also Published As
Publication number | Publication date |
---|---|
EP2211507B1 (en) | 2013-10-23 |
CN101453349B (zh) | 2012-10-17 |
EP2211507A1 (en) | 2010-07-28 |
CN101453349A (zh) | 2009-06-10 |
EP2211507A4 (en) | 2011-03-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4746102B2 (ja) | メディア適応を備えたメディアセッションの確立 | |
EP2410713B1 (en) | Adaptive media handling | |
WO2009082908A1 (fr) | Procédé, dispositif et système de traitement d'un protocole de flux en temps réel | |
EP2989800B1 (en) | Data communication system and method | |
JP5185827B2 (ja) | 少なくとも1つのペイロードデータコネクションを少なくとも1つのマルチプレックスコネクションへ割り当てるための方法 | |
JP4958174B2 (ja) | グループ通信におけるメディア切替方法、セッション管理サーバ、端末及びプログラム | |
WO2008062621A1 (fr) | Système de communication à transmission en continu | |
US20120002665A1 (en) | Telephone Exchange Apparatus and Telephone Terminal and a Control Method Used for a Telephone System | |
US20060187912A1 (en) | Method and apparatus for server-side NAT detection | |
WO2007019777A1 (fr) | Méthode d’établissement de session et nœud de contrôle de session | |
US20090241157A1 (en) | Content distribution system, band control mediating apparatus, and band control method | |
WO2013082747A1 (zh) | 一种ip路径协商的方法、系统及装置 | |
US7920579B2 (en) | Method, system and apparatus for media gateway to transmit and receive multicast data | |
JP2005123993A (ja) | パケット通信装置及びパケット通信方法 | |
WO2016114967A1 (en) | Systems and methods for adaptive context-aware control of multimedia communication sessions | |
JP4868606B2 (ja) | ストリーミング送信制御方法 | |
WO2009121310A1 (zh) | 一种网关选择的方法、系统及设备 | |
WO2010017176A1 (en) | Systems and methods for qos provisioning and assurance for point-to-point sip sessions in diffserv-enabled mpls networks | |
JP5127729B2 (ja) | パケット中継方法及びゲートウェイ装置 | |
EP4064635B1 (en) | Method for realizing voice-over-ip communication sessions between a calling party and a called party, telecommunications network, transport forwarding path network entity or proxy call state control function entity or functionality or software defined network entity or functionality, program and computer-readable medium | |
CN101094182A (zh) | IPv4/IPv6设备的媒体流互通的方法 | |
KR100750583B1 (ko) | 스트리밍 서비스를 제공하는 네트워크 시스템 | |
WO2006116933A1 (fr) | Procede, systeme et equipement de realisation d'une intercommunication entre les domaines ip | |
Ahsan et al. | Multipath RTP (MPRTP) draft-ietf-avtcore-mprtp-03 | |
JP4070655B2 (ja) | メディア通信方法及びメディア通信システム |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 08868017 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
WWE | Wipo information: entry into national phase |
Ref document number: 2008868017 Country of ref document: EP |