Background technology
Nowadays, the variation that Internet popularization and application has in the world surpassed the influence that historical any one new technology produced and brought facts have proved, IPv4 is not only healthy and strong and is easy to realize, and has good interoperability.These have all affirmed fully the correctness of IPv4 agreement (IPv4protocol) initial designs.But along with Internet develops rapidly, find that IPv4 has a lot of unsurmountable problems, must finally substitute by new agreement.
The network equipment and the operation application program thereon that insert Internet sharply increase, and have brought exhausting rapidly and problem such as routing table expansion of IP address thus, and be also extremely urgent to the expansion of IP address range.At the problem of IP address, IETF (Internet engineering duty group) has proposed iso-ip Internetworking protocol ISO-IP of new generation-IPv6 agreement (IPv6 protocol), and it has not only solved the address problem of IPv4, and has improved the performance of IP agreement.
At present since the successful use of IPv4 agreement nearly 20 years, quite ripe and have suitable scale based on the application program of IPv4 and equipment, can not finish all overnight and upgrade and change.And on the other hand, that is that all right is ripe complete for the application program of IPv6 and equipment, will inevitably occur many isolated IPv6 networks like this.
Usually, the transition of agreement is very very difficult, also is like this from IPv4 to the transition of IPv6.So how finishing the transition to IPv6 from IPv4, is the primary problem that solves of development IPv6.Thus in the long duration, communication between the IPv6 node also will depend on the facility of original IPv4 network, simultaneously the IPv6 node also requisite will with the IPv4 node communication, so transition is inevitably, and transition will be distributed, progressive carrying out.According to expert's prediction, the Internet at transition initial stage will be made up of " ocean " that the equipment that a small amount of operation IPv6 protocol devices is formed little network " isolated island " and a large amount of IPv4 of operation agreements is formed.And As time goes on, the ocean of IPv4 will diminish gradually, and the island of IPv6 not only can get more and more, and increasing, and finally replacing IPv4 fully forms new Internet network of future generation.At the initial stage of transition, the problem that solve can be divided into two big classes: the first kind is exactly the problem that solves mutual communication between the island of these IPv6; Second class be exactly the island that solves IPv6 with the ocean of IPv4 between the problem of communicating by letter.
In order to carry out the research for IPv4/IPv6 transition problem and efficient seamless interlinkage problem, in the world, IETF has been set up special working group, and promptly NGTRANS working group handles this problem.Simultaneously, IETF sets up test bed 6-Bone in the world, specially the characteristic of IPv6 is studied.Occurred multiple transitional technology and interconnect scheme at present, these technology respectively have characteristics, are used to solve the communication issue of different transition periods, varying environment.
At this two classes problem a lot of schemes have been proposed, there are some quite ripe and formed RFC (Request For Comments, i.e. " Request for Comment ", comprised nearly all important written historical materials) about Internet, some are arranged also just as Internet draft (Internet draft), remain further perfect.
Within a very long time in future, two kinds of networks must coexist, we need consider now be exactly we how can be reposefully from the IPv4 network transition to the IPv6 network.Therefore how to become a new research focus to the transit mechanism of IPv6 transition and generation therefrom by IPv4.
Solve the transition problem basic fundamental at present and mainly contain three kinds: dual stack (RFC 2893 obsoleteRFC1933), tunneling technique (RFC 2893), NAT-PT (network address translation-protocol conversion) are (RFC2766).
(1) dual stack (Dual Stack)
Adopt and move IPv4 and IPv6 two cover protocol stacks on each node of this technology simultaneously.This is that the IPv6 node is kept and the most direct mode of pure IPv4 node compatibility, to as if communication ends node (comprising main frame, router).This mode provides compatible completely to IPv4 and IPv6, but for the problem of IP address depletion but without any help.And owing to need double route infrastructure, this mode has increased the complexity of network on the contrary.
(2) tunneling technique (Tunnel)
Tunneling technique provides a kind of method of transmitting the IPv6 data with existing IPv4 routing architecture: with the grouping of the IPv6 data as the non-structure meaning, be encapsulated in the IPv4 datagram, by the IPv4 Network Transmission.According to the difference of setting up mode, the tunnel can be divided into two classes: the tunnel of manual configuration and auto-configured tunnel.Tunneling technique has utilized existing IPv4 network dexterously, and method for communicating during transition has been provided to provide between the node of a kind of IPv6 of making its meaning, but it can not solve the problem of the intercommunication of IPv6 node and IPv4 node.
(3) the NAT-PT transfer gateway also will comprise protocol conversion and translation except carrying out IPv4 address and IPv6 address transition.Transfer gateway is as the intermediate equipment of communication, and the address that can change the IP header between IPv4 and IPv6 network is done corresponding semantic translation according to the agreement difference to grouping simultaneously, can transparent communication between pure IPv4 and the pure IPv6 website thereby make.But the treating capacity of its protocol conversion and translation is also very complicated, and data processing amount is bigger.
Summary of the invention
The method that the purpose of this invention is to provide a kind of Media Stream intercommunication of IPv4/IPv6 equipment by the mode that equipment room is consulted, is reasonably selected to use IPv4 or IPv6 to carry out the Streaming Media intercommunication.
For achieving the above object, the invention provides a kind of method of Media Stream intercommunication of IPv4/IPv6 equipment, comprising:
Step 1, calling terminal send session invitation message to terminal called, carry the parameter of the IP protocol version of calling terminal in this message;
After step 2, terminal called are received this invitation message, carry out the IP agreement and select to consult, determine the IP protocol version that uses;
Step 3, terminal called send response message to calling terminal, carry the parameter of consulting definite IP protocol version in this message;
After step 4, calling terminal are received the response message of terminal called, use communicating to connect of definite IP protocol version foundation of described negotiation and terminal called, carry out transmission of flow media data.
Before described step 1, can also comprise: step a1, carry out the IPv4/IPv6 negotiation of SIP signaling; This operation can be specially:
Step a11, terminal initialization are obtained the IP address, if terminal is supported the IPv6 agreement, and execution in step a12 then, otherwise, determine to use the IPv4 agreement to carry out the transmission of SIP signaling, execution in step a13 then;
Whether step a12, the sip server that detects in the network support the IPv6 agreement, if then determine to use the IPv6 agreement to carry out the transmission of SIP signaling; Otherwise, determine to use the IPv4 agreement to carry out the transmission of SIP signaling;
IPv4 or IPv6 agreement that step a13, use are determined according to Session Initiation Protocol, are registered to described sip server.
As shown from the above technical solution, the mode that the present invention consults by equipment room, reasonably select to use IPv4 or IPv6 to carry out the Streaming Media intercommunication, make during to the transition of IPv6 protocol network, to make the equipment of two kinds of agreements can better realize intercommunication at the IPv4 protocol network.
Below by drawings and Examples, technical scheme of the present invention is described in further detail.
Embodiment
Present China and even global computer network are still based on IPv4.Simultaneously, IPv6 is obtaining the increasing chance of paying attention to and dispose.Because the defective in the IPv4 design, its address resource can not satisfy the needs that global equipment increases, the IPv4 address is near running out.Therefore, the equipment in the system of the embodiment of the invention can adopt the equipment of supporting the IPv4/IPv6 dual stack, can take into account the existing IPv4 network and following IPv6 network like this.Equipment with IPv4/IPv6 dual stack can the self-adapting network situation.When IPv6 can use, preferentially use IPv6 to carry out transfer of data.
In order to realize the intercommunication of Media Stream between the terminal that makes IPv4 and IPv6, the present invention expands SDP.Have only among the other side's SDP and the local SDP and all contain the IPv6 address, just enable IPv6, otherwise just use IPv4.At the transition of IPv4 to IPv6, adopt dual stack to come the mode of transition, follow the agency service mechanism among the IPv4, by the acting server of dual stack, utilize Session Initiation Protocol to realize the intercommunication of IPv4/IPv6 equipment Media Stream.
As everyone knows, Session initiation protocol SIP (Session Initiation Protocol) be by the Internet engineering duty group IETF proposed in 1999 in IP based network, particularly in the network environment of Internet structure, realize a kind of signaling protocol that real time communication is used, though develop the initial purpose of this agreement is with helping provide the senior telephone service of crossing over the internet, be used for setting up, session between one or more participants of modification and termination IP based network, the session here (Session) comprises internet (or any other IP network) call, multimedia conferencing and multimedia issue, the member in the session can communicate by the network of multicast or clean culture contact.SIP has many characteristics, for example supports conversation description, allows the participant to reach an agreement on one group of compatible media types, supports user mobility by agency and redirect request to user's current location simultaneously.SIP does not bundle with any specific meeting control protocol.Therefore, plurality of advantages such as Session Initiation Protocol is simple by means of it, be easy to expand, be convenient to realize more and more obtain the favor of industry, and progressively become in next generation network NGN and the 3G multimedia subsystem domain one of the most active important protocol, and the client software and the intelligent multimedia terminal that occur the increasing SIP of support on the market, and server and the Softswitch realized with Session Initiation Protocol.The application of relevant SIP in video communication become the focus that those skilled in the art pay close attention to.
A typical SIP application system comprises that sip server and some user terminals (UA) constitute.In SIP media application system, comprise sip server, calling terminal (media client), terminal called (source of media terminal).
The SIP system adopts the open standard Session Initiation Protocol of IETF as signaling protocol, is responsible for the connection foundation of Media Stream, the termination that session parameter is consulted, connected.
From the angle of network service, all data communication are divided into two classes in the system: SIP signaling and Media Stream.Both have different processing modes: the SIP signaling betides between terminal and the sip server, and Media Stream betides between terminal and the terminal.The SIP signaling can be used IPv4 or IPv6 transmission.The network parameter that Media Stream is used is to provide after consulting between the terminal, must take into account the IPv4/IPv6 network condition of two terminals.
Any networked devices must possess one of following condition:
<1〉has and only have privately owned address of one or more IPv4 or publicly-owned address, can visit Internet;
<2〉have and only have one or more IPv6 address, can visit the IPv6 network;
<3〉have IPv4 and IPv6 address simultaneously, and both can both visit external network.
Sip server in the embodiment of the invention can adopt and satisfy the requirements<3 equipment, therefore, various device all would subscribe to sip server, and transmits signaling by the routing function of sip server, and then sets up Media Stream.
Utilize Session Initiation Protocol to realize the method for IPv4/IPv6 equipment Media Stream intercommunication, comprised two parts:
1) the SIP signaling is consulted, and betides between UA and the sip server.SIP signaling negotiation occurs in the initial phase of terminal, as shown in Figure 1, specifically comprises:
Step a11, terminal initialization are obtained the IP address, if terminal is supported the IPv6 agreement, and execution in step a12 then, otherwise, determine to use the IPv4 agreement to carry out the transmission of SIP signaling, execution in step a13 then;
Whether step a12, the sip server that detects in the network support the IPv6 agreement, if then determine to use the IPv6 agreement to carry out the transmission of SIP signaling; Otherwise, determine to use the IPv4 agreement to carry out the transmission of SIP signaling;
IPv4 or the IPv6 agreement determined among step a13, the use step a12 according to Session Initiation Protocol, are registered to described sip server.
2) negotiation of media streams betides between terminal and the terminal.As shown in Figure 2, specifically comprise:
Step 1, calling terminal send session invitation message to terminal called, carry the parameter of the IP protocol version of calling terminal in this message;
After step 2, terminal called are received this invitation message, carry out the IP agreement and select to consult, determine the IP protocol version that uses;
Step 3, terminal called send response message to calling terminal, carry the parameter of consulting definite IP protocol version in this message;
After step 4, calling terminal are received the response message of terminal called, use communicating to connect of definite IP protocol version foundation of described negotiation and terminal called, carry out transmission of flow media data.
Wherein the IP agreement of carrying out in 2 is selected to consult to be specially:
Possess above-mentioned condition<1〉equipment between use IPv4 to realize the Media Stream intercommunication.
Possess above-mentioned condition<2〉equipment between use IPv6 to realize the Media Stream intercommunication.
Possess above-mentioned condition<3〉equipment between the preferential IPv6 of use realize the Media Stream intercommunication.
For satisfy the requirements<3 equipment, if with satisfy the requirements<1 or<2 equipment realize the Media Stream intercommunication, then must be by the negotiation of network capabilities, adopt with satisfy the requirements<1 or<2 the identical agreement of equipment.
Satisfy the requirements<1 equipment, if with satisfy the requirements<2 equipment realize the Media Stream intercommunication, then each equipment uses the communication protocol of each self-supporting.In the Streaming Media repeating process, use media proxy server (MPS) to realize the Media Stream forwarding with IPv4/IPv6 dual stack.
MPS has IPv4 and IPv4 address, and its forwarding process is as follows:
(a) calling terminal sends session invitation message (INVITE) to media proxy server;
(b) after media proxy server received this session invitation message (INVITE), the called end of appointment obtained media stream data from this message;
(c) media proxy server sends to described calling terminal with the media stream data that gets access to.
MPS is between calling terminal and terminal called, and it is responsible for issuing the media stream data that receives from another terminal called and sends to the calling terminal that needs.MPS plays the part of dual role, and at first it is a calling terminal, can obtain video flowing there from called end; It also is a terminal called, receives the media-on-demand of other calling terminal and media stream data is transferred to calling terminal.Comprise surface function down:
Sip server not to mail to (from) sip message of MPS does scope check;
MPS lands and reaches the standard grade, and is registered to sip server;
Comprise MPS in the buddy list of downloading during the calling terminal login;
Calling terminal is after sending invitation message (INVITE) to MPS, MPS should return 200 OK immediately and initiate media session to the terminal called (perhaps MPS) that calling terminal is invited and invite;
MPS obtains the source media stream data from the terminal called of appointment;
MPS sends to media stream data the calling terminal that needs;
Embodiment below by a concrete application in video monitoring system further specifies the present invention:
After PC client (PC Client) initialization, carry out the IPv4/IPv6 negotiation of SIP signaling, land and reach the standard grade;
After web camera (IP Camera) initialization, carry out the IPv4/IPv6 negotiation of SIP signaling, land and reach the standard grade;
MPS lands and reaches the standard grade, and is registered to sip server;
In the configuration of PC Client, the user at first selects whether to use distribution services, if use distribution services only to dispose a MPS;
Comprise MPS in the buddy list of downloading during PC Client login;
Sip server not to mail to (from) sip message of MPS does scope check;
PC Client is after sending invitation message (INVITE) to MPS, and MPS should return 200 OK immediately, and initiates video to the IP Camera that PC Client invites and invite;
MPS obtains the source video flowing from the IP Camera of appointment;
MPS sends to video flowing the PC Client that needs;
If there is not PC Client to watch the video of IP Camera, then MPS stops to obtain video flowing from IP Camera.
In the present embodiment, PC Client is equivalent to calling terminal, and IP Camera is equivalent to terminal called, and concrete SDP protocol package is as follows:
For PC Client:
Environmental parameter: private network IP:192.168.0.19
Public network IP: 211.99.29.43
IPv6 address: [3ffe:81b1:1:4:211:5bff:fe48:af6c]
The public network IP of NAT: 211.99.29.61
If IPv4 and IPv6 support, and |
If IPv4 and IPv6 support, not at NAT |
In the NAT: v=0 o=lyc 20,000,001 20000001 IN IP4 192.168.0.19 s=A call c=IN IP4 211.99.29.61 c=IN IP6 [3ffe:81b1:1:4:211:5bff:fe48:af6c] t=0 0 m=audio 23410 RTP/AVP 08 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=ptime:10 a=inside-nat:192.168.0.19 20002 m=video 34210 RTP/AVP 34 96 a=rtpmap:34 H263/90000 a=rtpmap:96 MP4V-ES/90000 a=inside-nat:192.168.0.19 30002 |
Interior v=0 o=lyc 20,000,001 20000001 IN IP4 192.168.0.19 s=A call c=IN IP4 211.99.29.43 c=IN IP6 [3ffe:81b1:1:4:211:5bff:fe48:af6c] t=0 0 m=audio 23410 RTP/AVP 08 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=ptime:10 m=video 34210 RTP/AVP 34 96 a=rtpmap:34 H263/90000 a=rtpmap:96 MP4V-ES/90000 |
If only support IPv4, v=0 o=lyc 20,000,001 20000001 IN IP4 192.168.0.19 s=A call c=IN IP4 211.99.29.61 t=0 0 in NAT |
If only support IPv4, v=0 o=lyc 20,000,001 20000001 IN IP4 192.168.0.19 s=A call c=IN IP4 211.99.2 9.43 t=0 0 in NAT not |
m=audio 23410 RTP/AVP 0 8 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=ptime:10 a=inside-nat:192.168.0.19 20002 m=video 34210 RTP/AVP 34 96 a=rtpmap:34 H263/90000 a=rtpmap:96 MP4V-ES/90000 a=inside-nat:192.168.0.19 30002 |
m=audio 23410 RTP/AVP 0 8 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=ptime:10 m=video 34210 RTP/AVP 34 96 a=rtpmap:34 H26 3/90000 a=rtpmap:96 MP4V-ES/90000 |
For IP Camera:
Environmental parameter: private network IP:192.168.0.48
Public network IP: 211.99.2 9.36
IPv6 address: [3ffe:81b1:1:4:211:5bff:fe48:adf3]
The public network IP of NAT: 211.99.29.61
If support IPv6, v=0 o=ipcam 20,000,001 20000001 IN IP4 192.168.0.48 S=A call c=IN IP4 211.99.2 9.61 c=IN IP6 [3ffe:81b1:1:4:211:5bff:fe48:adf3] t=0 0 in NAT |
If support IPv6, not v=0 o=ipcam 20,000,001 20000001 IN IP4 192.168.0.48 s=A call c=IN IP4 211.99.29.36 c=IN IP6 [3ffe:81b1:1:4:211:5bff:fe48:adf3] t=0 0 in NAT |
m=audio 24440 RTP/AVP 0 8 a=rtpmap:0 PCMU/8000 a=ptime:10 a=inside-nat:192.168.0.48 20002 m=video 34440 RTP/AVP 34 96 a=rtpmap:96 MP4V-ES/90000 a=ins ide-nat:192.168.0.48 30002 |
m=audio 24440 RTP/AVP 0 8 a=rtpmap:0 PCMU/8000 a=ptime:10 m=video 34440 RTP/AVP 34 96 a=rtpmap:96 MP4V-ES/90000 |
If do not support IPv6, v=0 o=ipcam 20,000,001 2 0000001 IN IP4 192.168.0.48 s=A call c=IN IP4 211.99.2 9.61 t=0 0 m=audio 24440 RTP/AVP 08 a=rtpmap:0 PCMU/8000 a=ptime:10 a=inside-nat:192.168.0.48 20002 m=video 34440 RTP/AVP 34 96 a=rtpmap:96 MP4V-ES/9 0000 a=inside-nat:192.168.0.48 30002 in NAT |
If do not support IPv6, v=0 o=ipcam 20,000,001 20000001 IN IP4 192.168.0.48 s=A call c=IN IP4 211.99.29.36 t=0 0 m=audio 24440 RTP/AVP 08 a=rtpmap:0 PCMU/8000 a=ptime:10 m=video 34440 RTP/AVP 34 96 a=rtpmap:96 MP4V-ES/90000 in NAT not |
From the foregoing description as can be seen, owing to carry out the negotiation of equipment room, make the technical scheme of the embodiment of the invention have autgmentability, ease for use based on Session Initiation Protocol.
It should be noted that at last: above embodiment is only in order to technical scheme of the present invention to be described but not limit it, although the present invention is had been described in detail with reference to preferred embodiment, those of ordinary skill in the art is to be understood that: it still can make amendment or be equal to replacement technical scheme of the present invention, and these modifications or be equal to replacement and also can not make amended technical scheme break away from the spirit and scope of technical solution of the present invention.