CN102420835B - Method for realizing real-time transport protocol (RTP) media stream agent in unified communication system - Google Patents

Method for realizing real-time transport protocol (RTP) media stream agent in unified communication system Download PDF

Info

Publication number
CN102420835B
CN102420835B CN201210006675.8A CN201210006675A CN102420835B CN 102420835 B CN102420835 B CN 102420835B CN 201210006675 A CN201210006675 A CN 201210006675A CN 102420835 B CN102420835 B CN 102420835B
Authority
CN
China
Prior art keywords
transceiver
media data
data packet
rtp
network address
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
CN201210006675.8A
Other languages
Chinese (zh)
Other versions
CN102420835A (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.)
Guangdong Jiami Technology Co., Ltd.
Original Assignee
GUANGDONG JIAHE COMMUNICATION TECHNOLOGY Co Ltd
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 GUANGDONG JIAHE COMMUNICATION TECHNOLOGY Co Ltd filed Critical GUANGDONG JIAHE COMMUNICATION TECHNOLOGY Co Ltd
Priority to CN201210006675.8A priority Critical patent/CN102420835B/en
Publication of CN102420835A publication Critical patent/CN102420835A/en
Application granted granted Critical
Publication of CN102420835B publication Critical patent/CN102420835B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention provides a method for realizing a real-time transport protocol (RTP) media stream agent in a unified communication system. The method is characterized by comprising the following steps that: a media stream of a calling terminal enters a link layer of an RTP agent server, and then enters a system network layer from the link layer; and an application layer directly controls the system network layer to modify the destination of data of the RTP media stream through a control command to the system network layer, transmits the RTP media stream back to the link layer, and finally transmits the RTP media stream to a called terminal. The invention also provides a method for configuring a PREROUTING table in a network address translation (NAT) function by using IPTABLES. By the methods, the forwarding efficiency of an RTP data packet is greatly improved, and requirements on the hardware of the agent server are reduced. Under the processing capability of an X86800MHz central processing unit (CPU), an agent for at most 30 paths of RTP media streams can be realized by the conventional method, while path number can be increased to 100 by the novel method.

Description

The Proxy Method of RTP Media Stream in a kind of converged communication system
Technical field
The present invention relates to data processing field, particularly relate in a kind of converged communication system, efficiently act on behalf of the method for RTP Media Stream.
Background technology
Converged communication, Unified Communication, is called for short UC, is also often translated as Unified Communication.Converged communication refers to, the new traffic pattern of computer technology and conventional communication techniques fusion one, fusion calculation machine network and conventional communication networks, in a network platform, realize numerous application services such as phone, fax, transfer of data, audio/video conference, call center, instant messaging.In converged communication, Media Stream (voice, video flowing) adopts Real-time Transport Protocol (real time transport protocol) to transmit.RTP realizes based on UDP host-host protocol.Generally, the terminal room of converged communication can allow Media Stream straight-through, as shown in Figure 1.
When needs are recorded to call or during firewall-penetrating, need to act on behalf of RTP Media Stream, as shown in Figure 2.
RTP proxy server is that the server software of calling out Media Stream agency is provided in NTX system.When NTX call control server receives calling, and the residing network site of definite calling and called terminal is can not meet the intercommunication of media flow point point time, call control server will create a Media proxy entity by the service interface of RTP proxy server, the effect of this Media proxy entity is the media data (voice packet) that receives calling and called terminal, and is forwarded to the opposing party in calling and called terminal.
The implementation method of general RTP proxy server is in application layer, to read the UDP message bag of network layer, then in application layer, according to the object of appointment, forward, realize logic as shown in Figure 3, it is any content in media data packet that application layer is not revised RTP packet, only RTP bag have been carried out to one be redirected (forwarding), but RTP packet but need through: the repeatedly copy function of link layer → grid layer → application layer → grid layer → link layer, this performance to RTP proxy server has proposed higher requirement.
Summary of the invention
Problem to be solved by this invention is to provide a kind of Proxy Method of RTP Media Stream, to reduce the performance cost causing at application level proxy RTP packet, improves the efficiency of RTP package forward.
For addressing the above problem, the invention provides the Proxy Method of a kind of RTP Media Stream in converged communication system, the method utilizes the network layer of operating system directly to forward RTP Media Stream (UDP message bag), to reach the object that improves forward efficiency.
The present invention is achieved by the following technical solutions:
A Proxy Method for RTP Media Stream in converged communication system, it comprises the following steps:
The Media Stream of calling terminal enters the link layer of RTP proxy server, then enters grid layer from link layer;
Application layer is by the control command to grid layer, and direct control system network layer is returned to link layer after the destination of RTP media stream data is revised, and finally sends to terminal called.
As optimization, described application layer is to complete by the control to IPTABLES to the control of described grid layer, and described IPTABLES carries out relevant treatment for the packet that linux kernel network stack is received.
As mentioned above, the present invention uses the network layer of system to realize the function of transceiver, and control network layer, removes forwarding media packet, by controlling IPTABLES, realizes.IPTABLES carries out relevant treatment for the media data packet that linux kernel network stack is received, comprising NAT.These processing logics are described by some IPTABLES rules, and these rules can be defined by IPTABLES order by application layer software (such as Media proxy entity).The method that the invention provides the PREROUTING table in a kind of IPTABLES of use configuration nat feature, comprises the following steps:
S1, provide transceiver A and transceiver B, transceiver A is for receiving the media data of calling terminal, and the media data from terminal called receiving from transceiver B is sent to calling terminal; Transceiver B is used for receiving the media data of terminal called, and the media data from calling terminal receiving from transceiver A is sent to terminal called; Transceiver A and B open respectively a UDP web socket, and the network address are separately tied to the socket of opening separately, and transceiver A and transceiver B are used the UDP socket of opening separately to receive and the operation of sending out;
S2, transceiver A and B start to intercept UDP socket separately, and when a transceiver receives first RTP packet of its socket, this transceiver extracts and record the source address of this packet, and now this transceiver has been set up associated with this end network address; When two transceivers are all received a media data packet, and set up after the network address association of terminal, carried out next step;
S3, the NAT rule by iptables command set from the media data packet of calling terminal:
The media data packet that is calling terminal transceiver network address through PREROUTING chain source address is carried out to DNAT operation, the destination address of this packet is converted to the network address of terminal called transceiver;
The media that are calling terminal transceiver network address to process POSTROUTING chain object source address carry out SNAT operation, the source address of this packet are converted to the network address of Media proxy entity transceiver B;
S4, Media proxy entity be the NAT rule from the media data packet of terminal called by iptables order Lookup protocol:
NAT rule by iptables command set from the media data packet of terminal called:
The media data packet that is terminal called transceiver network address through PREROUTING chain source address is carried out to DNAT operation, the destination address of this packet is converted to the network address of calling terminal transceiver
The media data packet that is calling terminal transceiver network address through POSTROUTING chain object source address is carried out to SNAT operation, the source address of this packet is converted to the network address of Media proxy entity transceiver A
S5, end of calling, the NAT that deletes S4 and S5 setting by iptables order is regular.
Described PREROUTING chain is pre-route chain, and it is one of link setup in IPTABLES; Under default situations, IPTABLES is divided into 5 stages by the processing procedure of IP bag, each stage is called a chain, each chain can arrange different bag processing rules, PREROUTING is first chain of IPTABLES process IP bag, in this chain, IP bag is carried out to IP map function, thereby NAT rule is set.
Compared with prior art, the present invention possesses following advantage:
The copy behavior of RTP data being carried out due to RTP proxy server has reduced, and RTP packet only needs, through link layer → grid layer → link layer, greatly to have improved the forward efficiency of RTP packet, has lowered the requirement to proxy server hardware.Under the disposal ability of X86800MHz CPU, adopt the multipotency of aging method to carry out the RTP Media Stream agency on 30 tunnels, adopt new method can bring up to 100 tunnels.
Accompanying drawing explanation
Fig. 1 is Media Stream flow graph end to end between two multimedia phones of prior art;
Fig. 2 be prior art use the Media Stream flow graph between two multimedia phones when " RTP proxy server ";
Fig. 3 is the Media Stream flow graph between two multimedia phones under general " RTP proxy server " implementation method of prior art;
Fig. 4 is the Media Stream flow graph between two multimedia phones that adopt under " RTP proxy server " of the present invention implementation method;
Fig. 5 is that the information communication of Media proxy entity of the present invention and calling and called terminal is related to schematic diagram;
Fig. 6 the present invention uses the flow chart of a specific embodiment of method of the PREROUTING table in IPTABLES configuration nat feature.
Embodiment
As shown in Figure 4, suppose that the Media Stream of phone A need to send to phone B through RTP Media proxy, in the converged communication system of the embodiment of the present invention, the Proxy Method of RTP Media Stream is:
First the Media Stream of phone A enters the link layer of RTP proxy server, then enters grid layer from link layer;
Now application layer can't copy to application layer from grid layer RTP data, but by the control command to grid layer, direct control system network layer is returned to link layer after the destination of RTP media stream data is revised, and finally sends to phone B.
In above method, the network layer of use system realizes the function of transceiver, and control network layer, removes forwarding media packet, by controlling IPTABLES (IP packet filtration system), realizes.IPTABLES carries out relevant treatment for the media data packet that linux kernel network stack is received, comprising NAT.These processing logics are described by some IPTABLES rules, and these rules can be defined by IPTABLES order by application layer software (such as Media proxy entity).
The present invention has mainly used IPTABLES to configure the ROUTING table in nat feature, the function that reaches forwarding media packet with this, and concrete steps are as follows:
S1, provide a Media proxy entity, it comprises transceiver A and transceiver B, and transceiver A is for receiving the media data of calling terminal, and the media data from terminal called receiving from transceiver B is sent to calling terminal; Transceiver B is used for receiving the media data of terminal called, and the media data from calling terminal receiving from transceiver A is sent to terminal called; Transceiver A and B open respectively a UDP web socket, and the network address is separately tied to the UDP web socket of opening separately, and transceiver A and transceiver B are used the UDP socket of opening separately to receive and the operation of sending out;
S2, transceiver A and B start to intercept UDP socket separately, and when a transceiver receives first RTP packet of its socket, this transceiver extracts the also source address of record data bag, and now this transceiver has been set up associated with this end network address; When two transceivers are all received a media data packet, and set up after the network address association of terminal, carried out next step;
S3, Media proxy entity be the NAT rule from the media data packet of calling terminal by IPTABLES order Lookup protocol:
The media data packet that is calling terminal transceiver network address through PREROUTING chain source address is carried out to DNAT operation (DNAT operation is the object network address transmission rule that IP bag is set), the destination address of media data packet (destination address before changing is the address of Media proxy entity) is converted to the network address of terminal called transceiver, described PREROUTING chain is pre-route chain, and it is one of link setup in IPTABLES; Under default situations, IPTABLES is divided into 5 stages by the processing procedure of IP bag, each stage is called a chain, each chain can arrange different bag processing rules, PREROUTING is first chain of IPTABLES process IP bag, and NAT rule (bag being carried out to IP map function) can be set in this chain;
The media data packet that is calling terminal transceiver network address through POSTROUTING chain object source address is carried out to SNAT operation (SNAT operation is the source network address transformation rule that IP bag is set), the source address of media data packet (changing the front network address into calling terminal) is converted to the network address of Media proxy entity transceiver B;
S4, Media proxy entity be the NAT rule from the media data packet of terminal called by IPTABLES order Lookup protocol:
The media data packet that is terminal called transceiver network address through PREROUTING chain source address is carried out to DNAT operation, the destination address of media data packet (changing the front network address into Media proxy entity) is converted to the network address of calling terminal transceiver;
The media data packet that is calling terminal transceiver network address through POSTROUTING chain object source address is carried out to SNAT operation, the source address of media data packet (changing the front network address into terminal called) is converted to the network address of Media proxy entity transceiver A;
S5, end of calling, the NAT that deletes S3 and S4 setting by IPTABLES order is regular.
As shown in Figure 5, the flow chart of its concrete Application Example acting on behalf of repeating process that is RTP Media Stream of the present invention, comprises the following steps:
The transceiver A of Media proxy entity and transceiver B open respectively a UDP socket for receiving and sending;
Calling terminal sends RTP data, and source address is the calling terminal network address, and destination address is Media proxy entity;
The receiver of transceiver A has been received first RTP data, and source address is the calling terminal network address, and destination address is Media proxy physical network address, and now Media proxy entity has been known the network address of calling terminal;
Terminal called sends RTP data, and source address is the terminal called network address, and destination address is Media proxy entity;
The receiver of transceiver B has been received first RTP data, and source address is the terminal called network address, and destination address is Media proxy physical network address.Now Media proxy entity has been known the network address of terminal called;
The media data packet that Media proxy entity is sent calling terminal by IPTABLES has been carried out two operations: carry out DNAT operation the destination address of media data packet is converted to terminal called, carry out SNAT operation the source address of media data packet is converted to Media proxy entity, then the transmitter by transceiver B sends;
The media data packet that Media proxy entity is sent terminal called by IPTABLES has been carried out two operations: carry out DNAT operation the destination address of media data packet is converted to calling terminal, carry out SNAT operation the source address of media data packet is converted to Media proxy entity, then the transmitter by transceiver A sends.

Claims (1)

1. a method of using the PREROUTING table in IPTABLES configuration nat feature, is characterized in that, comprises the following steps:
S1, provide transceiver A and transceiver B, transceiver A is for receiving the media data of calling terminal, and the media data from terminal called receiving from transceiver B is sent to calling terminal; Transceiver B is used for receiving the media data of terminal called, and the media data from calling terminal receiving from transceiver A is sent to terminal called; Transceiver A and B open respectively a UDP socket, and the network address is separately tied to the UDP socket of opening separately, and transceiver A and transceiver B are used the UDP socket of opening separately to receive and the operation of sending out;
S2, transceiver A and B start to intercept UDP socket separately, when a transceiver receives first media data packet of its UDP socket, this transceiver extracts and records the source address of this media data packet, now this transceiver with send the calling terminal of this media data packet or the network address of terminal called has been set up associated; When two transceivers are all received a media data packet, and set up after the network address association of terminal, carried out next step;
S3, the NAT rule by IPTABLES command set from the media data packet of calling terminal:
The media data packet that is calling terminal transceiver network address through PREROUTING chain source address is carried out to DNAT operation, the destination address of this media data packet is converted to the network address of terminal called transceiver;
The media data packet that is calling terminal transceiver network address through POSTROUTING chain object source address is carried out to SNAT operation, the source address of this media data packet is converted to the network address of Media proxy entity transceiver B;
S4, Media proxy entity be the NAT rule from the media data packet of terminal called by IPTABLES order Lookup protocol:
NAT rule by IPTABLES command set from the media data packet of terminal called:
The media data packet that is terminal called transceiver network address through PREROUTING chain source address is carried out to DNAT operation, the destination address of media data packet is converted to the network address of calling terminal transceiver;
The media data packet that is calling terminal transceiver network address through POSTROUTING chain object source address is carried out to SNAT operation, the source address of media data packet is converted to the network address of Media proxy entity transceiver A;
S5, end of calling, the NAT that deletes S4 and S5 setting by IPTABLES order is regular.
CN201210006675.8A 2012-01-10 2012-01-10 Method for realizing real-time transport protocol (RTP) media stream agent in unified communication system Active CN102420835B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210006675.8A CN102420835B (en) 2012-01-10 2012-01-10 Method for realizing real-time transport protocol (RTP) media stream agent in unified communication system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210006675.8A CN102420835B (en) 2012-01-10 2012-01-10 Method for realizing real-time transport protocol (RTP) media stream agent in unified communication system

Publications (2)

Publication Number Publication Date
CN102420835A CN102420835A (en) 2012-04-18
CN102420835B true CN102420835B (en) 2014-07-16

Family

ID=45945070

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210006675.8A Active CN102420835B (en) 2012-01-10 2012-01-10 Method for realizing real-time transport protocol (RTP) media stream agent in unified communication system

Country Status (1)

Country Link
CN (1) CN102420835B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103491065B (en) * 2012-06-14 2018-08-14 南京中兴软件有限责任公司 A kind of Transparent Proxy and its implementation
CN103780779B (en) * 2012-10-19 2016-10-05 华为技术有限公司 The exchange method of Media Stream and the network equipment
CN104639564A (en) * 2015-03-03 2015-05-20 北京极科极客科技有限公司 Proxy method of UDP (user datagram protocol)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100596106C (en) * 2007-04-05 2010-03-24 中山大学 Telecommunication for switching node from IPv4 network to IPv6 network
CN101902506A (en) * 2010-06-21 2010-12-01 中兴通讯股份有限公司 SIP call-based traversal network address translation method and system
CN101938488A (en) * 2010-09-14 2011-01-05 深圳市融创天下科技发展有限公司 Playing method, device, system, proxy server and mobile terminal of streaming media
CN102075536A (en) * 2011-01-13 2011-05-25 湖南超视物联智能网络科技有限公司 Background video agent service method for supporting hand-held monitoring

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8208412B2 (en) * 2006-12-29 2012-06-26 Broadview Networks, Inc. Method and system for network address translation (NAT) traversal of real time protocol (RTP) media

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100596106C (en) * 2007-04-05 2010-03-24 中山大学 Telecommunication for switching node from IPv4 network to IPv6 network
CN101902506A (en) * 2010-06-21 2010-12-01 中兴通讯股份有限公司 SIP call-based traversal network address translation method and system
CN101938488A (en) * 2010-09-14 2011-01-05 深圳市融创天下科技发展有限公司 Playing method, device, system, proxy server and mobile terminal of streaming media
CN102075536A (en) * 2011-01-13 2011-05-25 湖南超视物联智能网络科技有限公司 Background video agent service method for supporting hand-held monitoring

Also Published As

Publication number Publication date
CN102420835A (en) 2012-04-18

Similar Documents

Publication Publication Date Title
US10999215B2 (en) Software-defined network-based method and system for implementing content distribution network
CN103188300B (en) The methods, devices and systems of VOIP phone are realized in cloud computing environment
CN102546382B (en) Method and system for realizing multicast in Internet protocol version 4 over Internet protocol version 6 (IPv4overIPv6) tunnel
JP2007049415A (en) Voice data conversion apparatus, network system, and control method and program
US20130007291A1 (en) MEDIA INTERWORKING IN IPv4 AND IPv6 SYSTEMS
CN103348657B (en) Flow media playing method, equipment and system
CN110022456A (en) The method and apparatus for inviting terminals joining the conference
WO2015127793A1 (en) Recording method, voice exchanging device, recording server, and recording system
CN105873011B (en) The transmission of group service data, control method, device and equipment
CN104954724A (en) Video call switching method, intelligent television terminal, mobile terminal and system
CN101304387B (en) Method for implementing tunnel conversion of bi-layer tunnel protocol
CN102420835B (en) Method for realizing real-time transport protocol (RTP) media stream agent in unified communication system
CN105516176A (en) Call center system, communication connection method and device of call center system
CN103684970A (en) Transmission method and thin terminals for media data streams
CN104767720A (en) OpenFlow message tracking and filtering method in software defined network
CN110943910A (en) WebSocket-based interphone implementation method
CN107689945A (en) Media changer devices control method, device and WMG
CN110730203A (en) P2P communication method and device
WO2015184780A1 (en) Method, device, and system for processing information
CN100542354C (en) Terminal configuration method and terminal configuration system
CN114666846A (en) Communication method and gateway equipment
CN104871494A (en) Apparatus adapted for connecting a home network with a service provider network
CN109479071A (en) A kind of processing method and related network device of the networking telephone
US9191518B2 (en) Routing system for transferring data packets of a call
CN102710501B (en) A kind of mobile terminal and the Bandwidth Dynamic method of adjustment under tunnel communication pattern thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20190712

Address after: 519000. A District 1, 15A, conference center, 1 Software Road, Tang Wan Town, Zhuhai hi tech Zone, Guangdong, 1

Patentee after: Guangdong Jiami Technology Co., Ltd.

Address before: 519000 Unit 1-4, 5th Floor, 4th Floor, Production and Processing Center, No. 1 Software Park Road, Zhuhai City, Guangdong Province

Patentee before: Guangdong Jiahe Communication Technology Co., Ltd.

TR01 Transfer of patent right