EE4607 Session Initiation Protocol Michael Barry michael.barry@ul.ie william.kent@ul.ie
Outline of Lecture IP Telephony the need for SIP Session Initiation Protocol Addressing SIP Methods/Responses Functional entities in the SIP world SIP and Mobility
IP Telephony PSTN Circuit switched networks Voice call from point A B Move away from PSTN because Emergence of new network infrastructures IP packet switched networks replacing the PSTN circuit switched networks Modern perception of communication demands more than PSTN can deliver Internet GSM
IP Telephony IP Telephony Using IP networks for voice communication traditionally done by PSTN circuit switched networks Enables more than just voice calls Video calls Instant Messaging Email Data download and transfer Multimedia Sessions
Enabling IP Telephony To Enable IP Telephony Protocols are needed for Transport For delivery of voice/video/data packets (UDP,TCP, RTP) Supporting Protocols Security, Authentication, Accounting, QoS, Address translation etc (DNS, RSVP) Signaling Protocols to establish, manage and tear down sessions H.323, SIP
SIP - Introduction Session Initiation Protocol SIP is signalling protocol to establish, modify, manage and tear down multimedia sessions over IP networks. IETF Standard Modelled reusing other protocols by IETF Shares some of the semantics and syntax associated with HTTP and SMTP Sits comfortably among internet applications 3GPP -3 rd Generation Partnership Program 3GPP involved in creation of technical specification for 3 rd generation mobile networks has adopted SIP as the protocol of choice for IP Telephony.
SIP IP Protocol Stack IP Protocol Stack Application Telnet FTP Ping Transport Network DNS RPC SIP TCP UDP RTP RTCP ICMP IP SIP is not a transport protocol nor an application so it sits between application and transport layer. Data Link ARP PPP RARP Physical Cable Modem/Fibre Optic/Radio
SIP What SIP does SIP provides four main functions Locate a user (Presence) Translate user name into a network address Session establishment SIP can signal the intent of a user to initiate a multimedia session VoIP call, Video call, Instant Messaging Session management Invite more participants into the session Session termination Terminate the session
SIP What SIP does not SIP does not Provide packet transport functions Ensure Quality of service Define session media attributes (whether the data is voice, video, port numbers etc) SIP works with existing purpose built protocols Transport protocols TCP, UDP, RTP Quality of service protocols RSVP Media Attributes Session Description Protocol - SDP Already exist in the IP world
SIP Addressing SIP Addressing SIP uses URL s (borrowed from IETF SMTP protocol) to address users, examples: Bill@student.ul.ie MikeBarry@staff.ul.ie URL s bind to IP address using SIP registration procedure Bill@student.ul.ie 136.201.x.x SIP addresses are globally reachable SIP allow URL s to map to different IP addresses depending on location of user i.e. one address, any location. Enables SIP as a mobility solution
SIP Methods/Responses SIP Methods and Responses SIP is based on the request response model SIP requests are called methods Used to initiate session, end sessions, modify sessions. SIP reply to methods are called responses Provides an informational reply to a method i.e. trying, ringing, busy.
SIP Methods SIP Methods SIP Method INVITE ACK BYE CANCEL OPTIONS REGISTER INFO Description Invites a user to a call Used to facilitate reliable message exchange for INVITE Terminates a connection between users or declines a call Terminates a request, or search, for a user Solicits information about a server's capabilities Registers a user's current location Used for mid-session signalling
SIP Responses SIP Responses modelled on http : xyz explanatory text SIP Response Description 100 1xx Informational, example: 180 Ringing, 100 Trying 200 2xx Successful, example: 200 OK 300 3xx Redirection, example: 400 4xx Request Failure, example: 404 User Not Found 500 5xx Server Failure 600 6xx Global Failure
SIP Message Structure Actual SIP message captured from network A SIP invite message SIP header information SDP Content Includes description of media capabilities of SIP user agent, session name, session time and other session attributes.
SIP Header Fields TO: The TO field of the header indicates the logical recipient of the request. The logical recipient may or may not be the ultimate recipient of the request. FROM: The FROM field of the header contains the details of the logical sender of the request. CSEQ: The CSEQ header provides information about the session transactions. CALL-ID: The CALL-Id field contains an identifier that serves as an ID for the transactions of that particular session. MAX-FORWARDS: Specifies the maximum number of hops that the request can traverse on the way to its destination before self terminating. This is similar to the Time to Live field in IP datagrams. VIA: This records the route taken by the SIP request and is used to route a response back to the originator. CONTENT-LENGTH: This is the number of octets in the message body. A content length of 0 indicates no message body. CONTENT-TYPE: Used to specify the Internet media type in the message body. SUBJECT: This field contains a simple description of the message, analogous to an email message. This is indicative of the support for Multi-purpose Internet Mail Extension (MIME) included in the SIP protocol. CONTACT: The contact header is used to convey a URL that identifies the resource requested or the request originator.
SDP Session Description Protocol SIP has its origins in the Multi-media Session Control (MMUSIC) working group The Session Description Protocol (SDP) was also developed by MMUSIC SIP uses SDP to describe the type of session and the media attributes of the user agents participating. SIP user agents send datagrams that include SPD content to list the media capabilities (text, voice, and video) the user agent is willing to accept.
SDP Parameters Attribute Value Mandatory/Optional v= Protocol Version Number M o= Owner/Creator Identifier M s= Session Name M i= Session Information O u= Uniform Resource Identifier O e= Email address O p= Phone Number O c= Connection Information M b= Bandwidth Information O t= Time session starts/starts M R= Repeat Times O z= Time zone corrections O k= Encryption Key O a= Attribute Lines O m= Media Information M a= Media Attributes O
SIP Functional Entities (1) User Agents IP Endpoints User Agent Client Client initiates session i.e. in telephony terms originates calls User Agent Server Server accepts invitation from client to participate in session i.e. in telephony terms listens for calls User Agent Client (UAC) 1 2 3 4 5 6 7 8 9 * 8 # INVITE OK User Agent Server (UAS) 1 2 3 4 5 6 7 8 9 * 8 # IP Phone (IP endpoint) IP Phone (IP endpoint)
SIP Functional Entities (2) SIP Proxy Server Forwards SIP messages Determines the next server it should send the sip message to on the next hop, and forwards the message. It may determine the next hop by querying a Location Database or resolve the location of the next hop locally Proxy has no way of knowing whether the next server it s forwarding the message to is a Redirect Server, Registration Server or the destination (UAS). Can operate in two modes Stateless and Stateful - once the request is forwarded a stateless proxy forgets about the message and does not guarantee the delivery of the response as is the case in figure below. Location Database UAC INVITE INVITE INVITE INVITE UAS 1 2 3 4 5 6 7 8 9 * 8 # 1 2 3 4 5 6 7 8 9 * 8 # Bill@ul.ie Proxy Server Proxy Server Proxy Server MikeBarry@ul.ie
SIP Functional Entities (3) SIP Stateful Proxy Server Forwards SIP messages Operates in the same way as a Stateful proxy in that it forwards messages to other proxy servers It does however keep state for single SIP transactions. In other words it remembers a request and all responses relating to that request only. INVITE Transaction State BYE Transaction State UAC 1 2 3 4 5 6 7 8 9 * 8 # INVITE INVITE INVITE OK OK OK BYE BYE BYE OK OK OK UAS 1 2 3 4 5 6 7 8 9 * 8 # Bill@ul.ie Proxy Server Proxy Server MikeBarry@ul.ie Example: In this example the Stateful proxy remembers the invite transaction and associated responses, but once the OK is received the transaction is forgotten. Similarly the proxy remembers the BYE transaction.
1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 SIP Functional Entities (4) SIP Redirect Server Responds to requests but does not forward them to proxy Like a proxy server, the re-direct server may use a database lookup to find out next hop information but it does not use the next hop information to forward requests. The re-direct server sends the UAC the address of the next hop and then the UAC sends the request to that address. Location Database Contact Proxy Server A Redirect Server UAC Contact Proxy Server A UAS * 8 # * 8 # Bill@ul.ie Proxy Server A Proxy Server MikeBarry@ul.ie
SIP Functional Entities (5) SIP Registrar Server Keeps track of the location (IP address) of SIP users Binds a SIP URL to an IP address at current location The server acts as a registrar updating a location database Location Database Update Location Server Registration Server REGISTER MikeBarry@ul.ie 200 OK UAC Query Location Server UAS 1 2 3 4 5 6 7 8 9 * 8 # INVITE INVITE 1 2 3 4 5 6 7 8 9 * 8 # Bill@ul.ie Proxy Server MikeBarry@ul.ie
SIP Call Example Registrar Location Database REGISTRAR.UL.IE 2 3 Where is MGB@UL.IE 302 Moved Temporarily Contact: MGB@LIT.IE 1 INVITE MGB@UL.IE Register MGB@LIT.IE 200 OK 4 302 Moved Temporarily Contact: MGB@LIT.IE SIP.UL.IE Proxy/Re-direct Server Bill@UL.IE 5 ACK Proxy Server 6 INVITE MGB@LIT.IE INVITE MGB@LIT.IE MGB@LIT.IE 200 OK SIP.LIT.IE 7 200 OK 8 ACK ACK
SIP - Mobility SIP as Mobility Solution SIP provides application layer mobility Mobility of users not devices SIP binds a user identifier (URL) to a temporary IP address (SIP register) The IP address can be transient and change depending on users location The SIP URL is device independent you can use a number of devices (i.e. SIP phone, laptop, PDA etc) with one URL using SIP registration known as personal mobility.
SIP Mobility Pre Call Mobility Mobile node leaves home network and registers itself in foreign network CH 1 Home Network 2 SIP Redirect Server MN CH = Corresponding Host MN = Mobile Node 3 MN moves from home network to foreign network 4 5 MN 1 Corresponding host sends INVITE 2 Receives a 302 Moved Temporarily Moved 3 Resend SIP INVITE to new IP 4 Mobile Node sends 200 OK 5 Session Established Foreign Network
SIP - Mobility Mid Call Mobility Mobile node moves to different network during a session where it receives new IP through DHCP CH Home Network SIP Redirect Server MN MN moves from home network to foreign network CH = Corresponding Host MN = Mobile Node 3 2 1 MN Foreign Network MN MN moves to foreign network mid-call 1 The moving MN re-sends INVITE to CH with new IP address 2 CH sends 200 OK 3 Session established Foreign Network
SIP - Links http://www.sipcentre.com http://www.cs.columbia.edu/sip/papers.html http://www.ietf.org/html.charters/sipcharter.html Google Scholar Search: http://scholar.google.com type in the keywords into text box: author:schulzrinne "Session Initiation Protocol" filetype:pdf