+ All Categories
Home > Documents > RTP Relay Support in Intelligent Gateway Author: Pieere Pi E-Mail: [email protected].

RTP Relay Support in Intelligent Gateway Author: Pieere Pi E-Mail: [email protected].

Date post: 24-Dec-2015
Category:
Upload: constance-greer
View: 220 times
Download: 4 times
Share this document with a friend
Popular Tags:
28
RTP Relay Support in Intelligent Gateway Author: Pieere Pi E-Mail: [email protected]
Transcript
Page 1: RTP Relay Support in Intelligent Gateway Author: Pieere Pi E-Mail: pieere@263.net.

RTP Relay Support in Intelligent Gateway

Author: Pieere PiE-Mail: [email protected]

Page 2: RTP Relay Support in Intelligent Gateway Author: Pieere Pi E-Mail: pieere@263.net.

• How does RTP Proxy work in common scenario?

• Scenarios in intelligent gateway and how to add RTP Proxy support.

• What improvements can be made in intelligent gateway.

Subjects:

Page 3: RTP Relay Support in Intelligent Gateway Author: Pieere Pi E-Mail: pieere@263.net.

How does RTP Proxy work in common scenario?

SIP Proxy

UA1 UA2

RTP Proxy

INVITE INVITE

200 OK200 OK

NAT NAT

Page 4: RTP Relay Support in Intelligent Gateway Author: Pieere Pi E-Mail: pieere@263.net.

• 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*.

Page 5: RTP Relay Support in Intelligent Gateway Author: Pieere Pi E-Mail: pieere@263.net.

• 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).

Page 6: RTP Relay Support in Intelligent Gateway Author: Pieere Pi E-Mail: pieere@263.net.

• 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.

Page 7: RTP Relay Support in Intelligent Gateway Author: Pieere Pi E-Mail: pieere@263.net.

• 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.

Page 8: RTP Relay Support in Intelligent Gateway Author: Pieere Pi E-Mail: pieere@263.net.

• 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.

Page 9: RTP Relay Support in Intelligent Gateway Author: Pieere Pi E-Mail: pieere@263.net.

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*

Page 10: RTP Relay Support in Intelligent Gateway Author: Pieere Pi E-Mail: pieere@263.net.

RTP Media Transport Process

UA1 UA2

RTP Proxy

NAT NAT

RTP Relay

ip2*:port2* ip1*:port1*

Page 11: RTP Relay Support in Intelligent Gateway Author: Pieere Pi E-Mail: pieere@263.net.

Scenarios in intelligent gateway and how to add RTP Proxy support

SIP ProxyUA1 UA2

RTP Proxy

INVITE INVITE

200 OK200 OK

NAT

SIP Proxy

RTP Proxy

NAT

INVITE

200 OK

Intelligent Gateway 1 Intelligent Gateway 2

Scenario A

Page 12: RTP Relay Support in Intelligent Gateway Author: Pieere Pi E-Mail: pieere@263.net.

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.

Page 13: RTP Relay Support in Intelligent Gateway Author: Pieere Pi E-Mail: pieere@263.net.

• 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).

Page 14: RTP Relay Support in Intelligent Gateway Author: Pieere Pi E-Mail: pieere@263.net.

• 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*).

Page 15: RTP Relay Support in Intelligent Gateway Author: Pieere Pi E-Mail: pieere@263.net.

• 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).

Page 16: RTP Relay Support in Intelligent Gateway Author: Pieere Pi E-Mail: pieere@263.net.

• 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*).

Page 17: RTP Relay Support in Intelligent Gateway Author: Pieere Pi E-Mail: pieere@263.net.

• 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.

Page 18: RTP Relay Support in Intelligent Gateway Author: Pieere Pi E-Mail: pieere@263.net.

• 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.

Page 19: RTP Relay Support in Intelligent Gateway Author: Pieere Pi E-Mail: pieere@263.net.

• 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.

Page 20: RTP Relay Support in Intelligent Gateway Author: Pieere Pi E-Mail: pieere@263.net.

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*

Page 21: RTP Relay Support in Intelligent Gateway Author: Pieere Pi E-Mail: pieere@263.net.

RTP Media Transport Process

UA1 UA2

RTP Proxy RTP Proxy

Ip2_IG1*:port2_IG1* Ip1_IG2*:port1_IG2*

Ip1_IG1*:port1_IG1* Ip2_IG2*:port2_IG2*

RTP Relay between Proxies

Page 22: RTP Relay Support in Intelligent Gateway Author: Pieere Pi E-Mail: pieere@263.net.

SIP ProxyUA1 UA2

RTP Proxy

INVITE

200 OK

NAT

INVITE

200 OK

Intelligent Gateway

Scenario B

Scenario B: Internal and External

Page 23: RTP Relay Support in Intelligent Gateway Author: Pieere Pi E-Mail: pieere@263.net.

• 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.

Page 24: RTP Relay Support in Intelligent Gateway Author: Pieere Pi E-Mail: pieere@263.net.

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.

Page 25: RTP Relay Support in Intelligent Gateway Author: Pieere Pi E-Mail: pieere@263.net.

• 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.

Page 26: RTP Relay Support in Intelligent Gateway Author: Pieere Pi E-Mail: pieere@263.net.

Differences between common and Intelligent Gateway scenarios

• In intelligent gateway scenario, SIP Proxy is on the same host with RTP Proxy and NAT.

Page 27: RTP Relay Support in Intelligent Gateway Author: Pieere Pi E-Mail: pieere@263.net.

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).

• …

Page 28: RTP Relay Support in Intelligent Gateway Author: Pieere Pi E-Mail: pieere@263.net.

END


Recommended