Session Initiation Protocol (SIP) Ragnar Langseth University of Oslo April 26th 2013
Overview SIP Basic principles Components Message flow Mobility in SIP Personal Mobility Terminal Mobility Pre-call Mid-call Session Border Controller
Session Initiation Protocol (SIP) Application level protocol Establishing, modifying and terminating sessions Audio / Video conference Instant Messaging Online Games Never works alone RTP SDP Works regardless of underlying transport protocol Defined by IETF in RFC 3261, June 2002. Designed by Henning Schulzrinne and Mark Handley in 1996 Extra support added in later definitions
Components User Agent sip:alice@wonderland.com sip:bob@company.com Servers Proxy Redirect PROXY sip.wonderland.com PROXY sip.company.com Registrar Gateway Session Border Controller sip:alice@ Wonderland.com User Agents can act as servers sip:bob@ Company.com Peer to peer applications
Messages Request REGISTER INVITE ACK CANCEL BYE OPTIONS Response Transaction One request, potentially multiple responses Each transaction guaranteed success or failure Timeouts Re-transmissions Provisional (1xx) : 180 Ringing Success (2xx) : 200 OK Redirection (3xx) : 302 Moved Temporarily Client Error (4xx) : 404 Not Found Server Error (5xx) : 503 Service Unavailable Global Failure (6xx) : 600 Busy Everywhere
Messages Starting line Request method / Response code Destination SIP URI Via field The path of the message, edited in transit, ensures that every participant of the transaction can complete Contact field Contains the IP:port of interest, generally that of the sender.
Example Session 1: INVITE sip:bob@company.com 2: 100 Trying 4: 180 Ringing PROXY sip.company.com 2: INVITE sip:bob@sales.company.com 3: 180 Ringing 5: 200 OK alice@ Wonderland.com 6: 200 OK 7: ACK sip:bob@sales.company.com bob@sales. Company.com RTP DATA 8: BYE sip:alice@wonderland.com 9: 200 OK
Mobility Personal Mobility Many devices can be linked to the same sip URI Terminal Mobility A device can change its registered address Session Mobility A User Agent can transfer an ongoing session to another device.
Personal Mobility 1: INVITE sip:bob@company.com 2: 300 Multiple Choices sip.company.com 3: INVITE sip:bob@sales.company.com 4: 180 Ringing bob@sales. Company.com alice@ Wonderland.com 6: INVITE sip:bob@company.uio.no 5: 480 Temporarily Unavailable 7: 100 Trying 7: INVITE sip:bob@sales.company.uio.no 9: 180 Ringing 11: 200 OK sip.uio.no 8: 180 Ringing 10: 200 OK bob@sales. Company.uio.no 12: ACK sip:bob@sales.company.uio.no
Personal Mobility Many independent solutions Try each address sequentially until success Multi-cast an invite to all registered IP addresses Application must then be able to handle multiple accepts Return all addresses and let the user decide
Personal Mobility / Session Mobility Mid-call Hand-off 1: INVITE 2: 200 OK 3: ACK 4: INVITE 6: REFER 7: 200 OK 5: 200 OK 6: ACK 8: INVITE w/replaces alice@ Wonderland.com bob@sales. Company.com 9: BYE 10: 200 OK bob@laptop. Company.com 11: 200 OK 12: BYE 13: 200 OK Hand-off 12: ACK 14: BYE 15: 200 OK
Terminal Mobility Pre-call 1: REGISTER 2: 200 OK 3: INVITE sip:bob@company.com sip.company.com 4: 302 Moved Temporarily alice@ Wonderland.com 5: INVITE 6: 200 OK 7: ACK bob@home. homenet.com 8: BYE 9: 200 OK
Terminal Mobility Mid-call Hand-off bob@ 129.240.65.200 1. Disconnect alice@ Wonderland.com 4: re-invite 2: REGISTER 3: 200 OK sip.company.com 6. Re-connect 5: 200 OK 7: ACK bob@ 129.240.65.201
Terminal Mobility Network Discovery Disconnecting from old medium Establishing a new link Router Selection DHCP address assignment Duplicate Address Detection Authentication, Authorization & Accounting Re-INVITE transaction
Session Border Controller (SBC) Midway point Establishes two separate SIP sessions Controls a SIP session User Agents only communicate directly with an SBC Security NAT traversal Quality of Service Shorter round trip time delays when handling mobility
Conclusions Easy to deploy Mobility innately supported Varying degree of efficiency depending on implementation No additional hardware or changes to <L5 architecture required Easy to maintain / monitor / debug Designed to support IPv6 (although most implementations would need to be slightly modified) Some signaling delays, generally found to have slower hand-offs than Mobile IP in wireless networks NAT traversal can be tricky Standard is defined a little vague, not all implementations can communicate perfectly
References Handoff Delay Analysis for SIP-based Mobility in IPv6 Test-bed. Nakajima et. al. IEEE ICC, 2003. Mobility Management for VoIP Service: Mobile IP vs. SIP T.T. Kwon, M. Gerla, Sajal Das, and Subir Das. IEEE Wireless Communications, Oct. 2002, 66 75. Application-Layer Mobility Using SIP, H. Schulzrinne and E. Wedlund, Mobile Comp. and Commun. Rev., vol. 4, no. 3, July 2000. SSIP: Split a SIP session over multiple devices. Min-Xiou Chen, Chen-Jui Peng, and Ren-Hung Hwang, Comput. Stand. Interfaces 29, 5 (July 2007) http://docs.oracle.com/cd/e12529_01/wlss31/programming/overview.html (Message header figure) http://en.wikipedia.org/wiki/session_initiation_protocol http://en.wikipedia.org/wiki/sip_responses