
Contents SIP Overview SIP Tutorial SIP in detail Introduction to SIP SIP Call Flow Scenarios SIP Security SIP Programming SIP Applications SIP Deployment Original Slides by Alan Johnston and Henry Sinnreich, MCI (at VON’03) 2 Why packet switching? Why SIP? SIP Overview What SIP is, Multimedia Protocol Stack, Short History and Related Protocols are included. Technology evolution of PSTN 4 Session Initiation Protocol Overview Security & Privacy Application Layer Signaling Protocol SIP Authentication Challenge/Response based on shared secret - SIP Digest Used to establish, modify, and terminate Mechanism also used by HTTP multimedia sessions Used for client devices Part of Internet Multimedia Architecture Encryption using private/public keys Can use UDP, TCP, TLS, SCTP, etc. Used between servers Privacy and security Based on HTTP (Web) SIP signaling can be encrypted Similar text-based structure S/MIME (Secure/Multipurpose Internet Mail Extensions) Defined in RFC 2633 Uses URIs (Uniform Resource Indicators) SIP can be transported over Applications include (but not limited to): IPSec Defined in RFC 2401 Voice, video, gaming, instant messaging, presence, call control, etc. TLS (Transport Layer Security) Defined in RFC 2246 5 6 Internet Multimedia Protocols A Short History of SIP Internet Engineering Task Force (IETF) protocol Inventors: M. Handley, H. Schulzrinne, E. Schooler, and J. Rosenberg Became “Proposed Standard” and RFC 2543 in March RTSP 1999 in MMUSIC WG. Separate SIP WG established in September 1999. Now new SIPPING (applications) and SIMPLE (presence and instant messaging) WGs using SIP. RFC2543bis-09 I-D became RFC 3261 in June 2002 Added four new authors: G. Camarillo, A. Johnston, J. Peterson, and R. Sparks. Entire spec rewritten for clarity, but some new features Mostly backwards compatible with RFC 2543 7 8 SIP Requests and Responses Related Protocols: SDP SIP Request types are SIP Responses use a SIP carries (encapsulates) SDP messages called “methods” numerical code and a SDP specifies codecs and media termination “reason phrase” Methods in base spec: points Classes: Only one of many possible MIME attachments carried by SIP INVITE 1xx Informational SDP – Session Description Protocol ACK 2xx Final Used to describe media session. OPTIONS 3xx Redirection Carried as a message body in SIP messages. CANCEL 4xx Client Error Is a text-based protocol BYE 5xx Server Error Uses RTP/AVP Profiles for common media types REGISTER 6xx Global Failure Defined by RFC 2327 Example: 404 Not Found E.g. RFC 3551 “RTP Profile for Audio and Video Conferences with Minimal Control” 9 10 Related Protocol: RTP SIP Uniform Resource Indicators (URIs) RTP – Real-time Transport Protocol Same form as email addresses: user@domain Used to transport media packets over IP Two URI schemes: sip:[email protected] is a SIP URI RTP adds a bit-oriented header containing: Most common form introduced in RFC 2543 name of media source sips:[email protected] is a Secure SIP URI timestamp New scheme introduced in RFC 3261 codec type Requires TLS over TCP as transport for security sequence number Two types of SIP URIs: Defined by H. Schulzrinne et al, RFC 1889. Address of Record (AOR) (identifies a user) sip:[email protected] (Needs DNS SRV records to locate SIP Servers Profiles defined by RFC 1890. for mci.com domain) RTCP for exchange of participant and quality Contact (identifies a device and is usually a Fully Qualified Domain reports. Name, FQDN ) sip:[email protected] or sip:[email protected] (Which needs no resolution for routing) 11 12 SIP “Trapezoid” SIP Elements – User Agents Capable of sending DNS Server Location DNS Server Location Server Server and receiving SIP requests. DNS DNS UAC – User Agent Client UAS – User Agent Server End Devices SIP SIP Outbound Inbound Outbound Inbound SIP phone Proxy Server Proxy Server Proxy Server Proxy Server PC/laptop with SIP Client SIP SIP PDA SIP SIP mobile phone SIP SIP PSTN Gateways Media (RTP) Media (RTP) are a type of User Agent User Agent A User Agent A User Agent B User Agent B 13 14 SIP Elements – Proxy Servers SIP Elements – Other Servers DNS Server Location DNS Server Location Location Server Server Forward or “proxy” Server requests on behalf of DNS User Agents DNS Database of locations of Consult databases: SIP User Agents SIP DNS SIP Queried by Proxies in Outbound Inbound Outbound Inbound Proxy Server Proxy Server Location Server Proxy Server Proxy Server routing Types: Updated by User Agents SIP Stateless SIP by Registration SIP Transaction Stateful SIP Call Stateful SIP SIP DNS Server No media capabilities Media (RTP) Media (RTP) Ignore SDP. User Agent A User Agent B Normally bypassed once User Agent A User Agent B SRV (Service) Records dialog established, but used to locate can Record-Route to Inbound Proxy stay in path. Servers 15 16 SIP Client and Server SIP Registrar, 1 SIP Elements are either SIP server that can receive and process REGISTER requests User Agents (end devices that initiate and terminate A user has an account created which allows them to REGISTER media sessions) contacts with a particular server The account specifies a SIP “Address of Record (AOR)” Servers (that assist in session setup) Proxies Registrars Redirect servers A User Agent acts as a Client when it initiates a request (UAC) Server when it responds to a request (UAS) 17 18 SIP Registrar, 2 Proxy Server SIP Registrars store the location of SIP SIP Proxy servers route SIP messages endpoints Stateless Proxies use stateless protocols like UDP to Each SIP endpoint Registers talk to endpoints with a Registrar using it’s Address of Record and Contact address Low Proxy overhead Address of Record for John Smith in From: header Ephemeral connections, dropped as soon as message is From: John Smith <sip:[email protected] forwarded Contact: header tells Registrar where to send messages Stateful Proxies use TCP or other stateful protocols Contact: John Smith <sip:[email protected]> to set up a permanent connection SIP Proxies High Proxy overhead query SIP Registrars for routing information Incoming calls addressed to sip:[email protected] Endpoint connection must be set up, maintained and torn now routed by the Proxy to the Contact: header URL down for the duration of the session sip:[email protected] 19 20 SIP Proxy Server Stateless vs. Stateful Proxy SIP Server which acts on behalf of User Agents Stateless Proxy Receives a SIP request Forwards every request downstream and response upstream Keeps no state (does not have any notion of a transaction) Adds some headers Never performs message retransmissions Modifies some of the headers Stateless proxies scale very well Forwards request to next hop server or client can be very fast good for network cores Stateful Proxy Maintains state information for the duration of either the: Transaction (request) Transaction Stateful Dialogue (from INVITE to BYE) Dialogue Stateful Performs message retransmission 21 22 SIP Redirect Server Locating SIP Servers Receives a request and returns a redirection response Manual provisioning (3xx) DHCP SIP Option 120 Contact header in response indicates where request RFC 3361 should be retried Multicast (deprecated) Similar to database query DNS SRV method All Server types are logical NOT Physical Get local domain name automatically from DHCP server Perform SRV record query through DNS on that domain for _sip._udp.<domain name> Send SIP REGISTER message to resolved server phone is up and running without user intervention 23 24 SIP Request Methods, 1 SIP used for Peer-to-Peer Communication though it uses a Client-Server model SIP in detail Requests are called “methods” Six methods are defined in base RFC 3261: INVITE Now, we are going to study SIP in ACK detail including SIP Request, SIP OPTIONS BYE Response and SIP Header CANCEL REGISTER 26 SIP Request Methods, 2 SIP Methods - INVITE, 1 REGISTER INVITE requests the establishment of a Register contact with Registrar INVITE/ACK/BYE/CANCEL/UPDATE session Creates, negotiates and tears down a call (dialogue) Carried in Message Body (SDP) MESSAGE Type of session Creates an Instant Messaging session SUBSCRIBE IP Address Subscribe to a service (like message waiting indication) Port NOTIFY Codec Notify a change in service state (new Voicemail) 27 28 SIP Methods - INVITE, 2 SIP Methods - ACK An INVITE during an existing session ACK completes the three way session setup (dialogue) is called a re-INVITE handshake (INVITE, final response, ACK) re-INVITEs can be used to Only used for INVITE Place calls on or remove calls from hold If INVITE did not contain media information Change session parameters and codecs ACK must contain the media information The SIP UPDATE method is the proposed replacement for this technique 29 30 SIP Methods - OPTIONS SIP Methods – BYE and CANCEL OPTIONS requests the capabilities of another BYE terminates an established session User Agent User Agents stop sending media packets (RTP) Response lists supported methods, CANCEL terminates a pending session. extensions, codecs, etc. INVITE sent but no final response (non-1xx) yet User Agent responds to OPTIONS the same received. as if an INVITE (e.g. if Busy, returns 486 User Agents and Proxies stop processing INVITE Busy Here) Can be sent by a proxy or User Agent Useful for “forking proxy” Very basic presence information Parallel search using multiple registration Contacts. First successful wins, rest are cancelled. 31 32 SIP Methods - REGISTER SIP Request URI The Request-URI indicates the destination address of the Registration allows a User Agent to upload request current location and URLs to a Registrar Proxies and other servers route requests based on Registrar can upload into Location Service Request-URI. The Request-URI is modified by proxies as the address is Incoming requests can then be proxied or resolved.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages24 Page
-
File Size-