Download presentation
Presentation is loading. Please wait.
Published byConstance Greer Modified over 9 years ago
1
RTP Relay Support in Intelligent Gateway Author: Pieere Pi E-Mail: pieere@263.net
2
How does RTP Proxy work in common scenario?How does RTP Proxy work in common scenario? Scenarios in intelligent gateway and how to add RTP Proxy support.Scenarios in intelligent gateway and how to add RTP Proxy support. What improvements can be made in intelligent gateway.What improvements can be made in intelligent gateway. Subjects:
3
How does RTP Proxy work in common scenario? SIP Proxy UA1UA2 RTP Proxy INVITE 200 OK NAT
4
UA1 is behind the NAT. It sends a SIP INVITE message towards UA2 through the SIP Proxy specifying that it wishes to receive media at (private) IP address, ip1:port1. SIP Proxy instructs the RTP Proxy to reserve a pair of IP address/port, one representing each end of the connection. To UA2, the remote end of the connection is perceived to be ip1*:port1*, whereas to UA1, this is perceived to be ip2*:port2*.
5
Note 1: Due to the presence of the NAT's, the source IP address/port of the media packets from the UA's are yet unknown to the RTP Proxy. Note 2: Consecutive port binds are also created for RTCP sessions corresponding to RTP. SIP Proxy forwards the INVITE towards UA2 (perhaps through another SIP Proxy) specifying that UA2 should send media to the RTP Proxy at ip1*:port1* (by modifying the SDP).
6
UA2 responds with a 200 OK specifying that it wishes to receive media at (private) IP address, ip2:port2. When SIP Proxy receives the 200 OK, it changes these IP address and port parameters in SDP specifying UA1 should transmit media to the RTP Proxy at ip2*:port2*, and forwards the 200 OK towards UA1.
7
When UA1 receives the 200 OK, it starts transmitting media (e.g., background noise) towards the RTP Proxy. When the first of these NAT-ed RTP packets reach the RTP Proxy, the Proxy remembers the source address/port (say, ip1’:port1’) of that packet as the external representation for the media end point of UA1. Any media received from UA2 to UA1 should be sent to this address/port.
8
Similarly, when the first RTP packet is received from UA2, the RTP Proxy notes down the source IP address/port (say, ip2’:port2’), which will be used as the destination address to transmit media received from UA1 to UA2. Finally, UA1 responds with an ACK message and the call set-up is complete.
9
IP Address Summary UA1’s private IP address/port: ip1/port1 UA2’s private IP address/port: ip2/port2 UA1’s NAT-ed IP address/port: ip1’/port1’ UA2’s NAT-ed IP address/port: ip2’/port2’ UA1 perceives UA2 is at ip2*/port2* UA2 perceives UA1 is at ip1*/port1*
10
RTP Media Transport Process UA1UA2 RTP Proxy NAT RTP Relay ip2*:port2*ip1*:port1*
11
Scenarios in intelligent gateway and how to add RTP Proxy support SIP Proxy UA1UA2 RTP Proxy INVITE 200 OK NAT SIP Proxy RTP Proxy NAT INVITE 200 OK Intelligent Gateway 1Intelligent Gateway 2 Scenario A
12
Scenario A: Bridge IG Note 3: Here, I will introduce a new concept, internal and external user. Internal user is who registered from the LAN interface, and behind the NAT; external user is who registered from the WAN interface (seldom, may have a global IP address, may be behind NAT too). Sentences in red are the conditions when need to do RTP Relay in this scenario.
13
UA1 sends a SIP INVITE message towards UA2 through IG1 specifying that it wishes to receive media at IP address, ip1:port1. IG1 queries the call routing table, and finds that the call will be routed to another IG, it instructs the RTP Proxy to reserve a pair of IP address/port, one representing each end of the connection. To UA2, the remote end of the connection is perceived to be ip1_IG1*:port1_IG1*, whereas to UA1, this is perceived to be ip2_IG1*:port2_IG1*. Also the RTP Proxy notes down the source address/port of UA1 (ip1:port1).
14
IG1 forwards the INVITE towards UA2 through IG2 specifying that UA2 should send media to the RTP Proxy at ip1_IG1*:port1_IG1* (by modifying the SDP). IG2 receives the INVITE from WAN interface, it instructs the RTP Proxy to reserve a pair of IP address/port, one representing each end of the connection. To UA2, the remote end of the connection is perceived to be ip1_IG2*:port1_IG2*, whereas to UA1, this is perceived to be ip2_IG2*:port2_IG2*. Also the RTP Proxy notes down the source address/port of UA1 (ip1_IG1*:port1_IG1*).
15
UA2 responds with a 200 OK specifying that it wishes to receive media at IP address, ip2:port2. When IG2 receives the 200 OK, it changes these IP address and port parameters in SDP specifying UA1 should transmit media to the RTP Proxy at ip2_IG2*:port2_IG2*, and forwards the 200 OK towards UA1 through IG1. Also the RTP Proxy notes down the source address/port of UA2 (ip1:port1).
16
When IG1 receives the 200 OK, it changes these IP address and port parameters in SDP specifying UA1 should transmit media to the RTP Proxy at ip2_IG1*:port2_IG1*, and forwards the 200 OK towards UA1. Also the RTP Proxy notes down the source address/port of UA2 (ip2_IG2*:port2_IG2*).
17
When UA1 receives the 200 OK, it starts transmitting media (e.g., background noise) towards the RTP Proxy. When the first of these RTP packets reach the RTP Proxy on IG1, the Proxy checks whether the source of packets equals to the source address/port recorded, if not, rewrite the source address/port and relays these packets to Proxy on IG2.
18
Note 4: UA1 can be an internal user, the RTP Proxy can reach it directly, also, UA1 can be an external user, it may be behind NAT too or may have an global IP address. So, we must allow the source of first packets doesn’t equal to the source recorded. Source of RTCP session is also updated. (Just simply guess that IP of RTCP equals to RTP’s, port of RTCP port equals to RTP’s plus one). Then RTP Proxy on IG2 forwards these packets to UA2.
19
Similarly, when the first RTP packet is received from UA2, the RTP Proxy updates the source IP address/port if necessary, then relays the packets to the RTP Proxy on IG1. Finally, UA1 responds with an ACK message and the call set-up is complete.
20
IP Address Summary UA1’s private IP address/port: ip1/port1 UA2’s private IP address/port: ip2/port2 UA1 perceives UA2 is at ip2_IG1*/port2_IG1* UA2 perceives UA1 is at ip1_IG2*/port1_IG2* UA1 perceives RTP Proxy on IG2 is at ip1_IG1*/port1_IG1* UA2 perceives RTP Proxy on IG1 is at ip2_IG2*/port2_IG2*
21
RTP Media Transport Process UA1UA2 RTP Proxy Ip2_IG1*:port2_IG1*Ip1_IG2*:port1_IG2* Ip1_IG1*:port1_IG1*Ip2_IG2*:port2_IG2* RTP Relay between Proxies
22
SIP Proxy UA1UA2 RTP Proxy INVITE 200 OK NAT INVITE 200 OK Intelligent Gateway Scenario B Scenario B: Internal and External
23
If UA1 is an internal user, UA2 is an internal user too, it’s no need to do RTP Relay. If UA1 is an internal user, UA2 is an external user, call between them needs to do RTP Relay. If UA1 is an external user, UA2 is an external user too, call between them needs to do RTP Relay too, since we don’t know whether they have global IP address or not.
24
Summary: When we need to do RTP Relay Calls between internal and external user. 1.Internal call external: SIP Proxy receives INVITE from LAN interface. 2.External call internal: SIP Proxy receives INVITE from WAN interface. Calls between external and external user. SIP Proxy receives INVITE from WAN interface.
25
Call between IGs 1.IG1 receives INVITE, queries the call routing table, and finds the call will be routed to another IG. 2.IG2 receives INVITE from WAN interface. When SIP Proxy receives response 200. When SIP Proxy receives BYE or CANCEL, it tears down the RTP Relay sessions.
26
Differences between common and Intelligent Gateway scenarios In intelligent gateway scenario, SIP Proxy is on the same host with RTP Proxy and NAT.
27
What improvements can be made in intelligent gateway If external user has global IP address, it only needs one pair RTP/RTCP addresses to do RTP Relay (like IP mapping). …
28
END
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.