Transcript 슬라이드 1
Session Initiation Protocol The department of Information & Communications Engineering Dong-uk, kim [email protected] Table of Contents • • • • • • • • Introduction Transaction Transport Registration Dialog Initiating a session Terminating a session Headers Introduction • Many Applications that require the creation and management of a session. ▫ The Session initiation Protocol Can enabling UA to discover one another General-purpose tool for creating, modifying and terminating session Works independently of underlying transport protocols SIP URIs • Two URI schemes ▫ Similar to the form of an e-mail address: user@domain • SIP URI - introduced in RFC 2543 ▫ example: sip:[email protected] • Secure SIP URI - introduced in RFC 3261 ▫ example: sips:[email protected] ▫ Requires TLS over TCP as transport for security SIP URIs (cont’d) • Several types of SIP URIs: ▫ Address of Record (AOR) (identifies a user) example: sip:[email protected] Need DNS records to locate SIP Servers for “domain.com” ▫ Fully Qualified Domain Name (FQDN) (identifies a specific device) sip:[email protected] sip:[email protected] sip:[email protected];user=phone Functionality User Location • Determination of the end system to be used for communication User Availability • Determination of the willingness of the called party to engage in communication User Capabilities • Determination of the media and media parameters to be used Session Setup • Establishment of session parameters between parties Session Management • Transfer, modifying Operation SIP Message structure INVITE sip:[email protected] SIP/2.0 <CRLF> Via: SIP/2.0/UDP 169.130.12.5 Call-ID: [email protected] From: <sip:[email protected]> To: Bob<sip:[email protected]> CSeq: 1 INVITE Max-forwards: 70 Content-Type: application/sdp Content-Length:885 Start Line Headers Blank Line <CRLF> v=0 o=xener 53655765 2353687 IN IP4 169.130.12.5 s=hello session c=IN IP4 169.130.12.5 m=audio 3456 RTP/AVP 0 3 4 5 Content Request Method Basic • • • • • • INVITE ACK BYE CANCEL OPTIONS REGISTER Extention • • • • • • • REFER PUBLISH SUBSCRIBE NOTIFY MESSAGE INFO UPDATE Response code • 1xx: Provisional ▫ request received, continuing to process the request • 2xx: Success ▫ the action was successfully received, understood, and acce pted • 3xx: Redirection ▫ further action needs to be taken in order to complete the re quest • 4xx: Client Error ▫ the request contains bad syntax or cannot be fulfilled at this server • 5xx: Server Error ▫ the server failed to fulfill an apparently valid request • 6xx: Global Failure ▫ the request cannot be fulfilled at any server Transaction • A SIP Transaction consists of ▫ A single request ▫ Zero or more provisional responses ▫ One or more final responses • i.e.> ▫ An INVITE request ▫ Final response (which is not 2xx response) The final ACK is part of the transaction Transaction Process UA UA Application Transaction User UAS UAC Stateful Proxy Stateful Proxy Proxy Core Proxy Core Application UAS UAC Stateless Proxy Transaction S C S C Trasnport S C S C TCP,UDP,TLS/IP TCP,UDP,TLS/IP Proxy Core S C TCP,UDP,TLS/IP S C S C S C S C TCP,UDP,TLS/IP TCP,UDP,TLS/IP INVITE Client Transaction • • • • Timer A ▫ ▫ At each retransmit. T1 = 500ms(default) ▫ 64 * T1 ▫ ▫ At least 32sec. In unreliable transport The duration, the server transaction can remain in the Complete state == at INV. Server trans. INVITE from TU --------Send INVITE Set Timer A , B Timer A expires --------Reset A Send INVITE Calling Recv. 3xx ~6xx --------Send ACK Timer B Timer D Recv. 1xx --------1xx to TU Recv. 1xx --------1xx to TU Managed by TU Update at recv 101 ~199 Reset to different value ▫ But At least 3 min. If Fires CANCLE / treat like 408 UAC UAS TU Transaction Transport TU Transaction Transport INVITE Recv. 2xx --------2xx to TU Proceeding Timer C ? ▫ Timer B expires Or Transport Err. ------------Inform TU Recv. 3xx ~ 6xx --------Send ACK request Set Timer D Recv. 3xx ~ 6xx --------Send ACK Set Timer D Complete Timer D expires --------- Terminated Transport Err. ------------Inform TU Recv. 2xx --------2xx to TU INVITE Server Transaction • Timer G ▫ At each retransmit. ▫ T1 = 2 * T1 ▫ T1 = 500ms(default) Recv. INVITE --------Send response Proceeding 1xx from TU --------Send response • Timer I ACK -------Set Timer I Confirmed UAC UAS TU Transaction Transport TU Transaction Transport INVITE 2xx form TU --------Send response Complete Timer G expires --------Send response G = min(2*T1, T2) == timer B Transport Err. ------------Inform TU 3xx~6xx from TU --------Send response Set Timer G & H Recv. INVITE --------Send response • Timer H ▫ 64 * T1 Recv. INVITE --------INVITE to TU Send 100, if 200ms condition Timer I expires --------- Terminated Timer H expires Or Transport Err. ------------Inform TU Non-INVITE Client Transaction • Non-INVITE transaction do not make use of ACK ▫ Simple req-res interactions Req. from TU --------Send Req. Set Timer E, F Timer E expires --------E = min(N*T1, T2) Send Req. Trying Recv. 2xx ~6xx --------Response to TU Timer E expires --------E=T2 Send Req. Recv. 1xx --------1xx to TU Proceeding Recv. 1xx --------1xx to TU UAS TU Transaction Transport TU Transaction Transport Non-INVITE Timer F expires Or Transport Err. ------------Inform TU Recv. 2xx ~ 6xx --------Response to TU Complete UAC Timer F expires Or Transport Err. ------------Inform TU Timer K expires --------- Terminated Recv. Req. --------Pass to TU Non-INVITE Server Transaction Trying Recv. Req. --------Send response Transport Err --------Inform to TU 1xx from TU --------Send response 1xx from TU --------Send response Proceeding 2xx ~ 6xx from TU -------Send response Set Timer J Complete UAC UAS TU Transaction Transport TU Transaction Transport Non-INVITE Transport Err --------Inform to TU Timer J expires --------- Terminated 2xx form TU --------Send response Transport Layer • Mandatory ▫ UDP & TCP • If Message size is larger than Path MTU – 200 1300 (at unknown path MTU) ▫ Must be sent using an RFC 2914 (such as TCP) Overview • SIP offers a discovery capability • Registration creates bindings in a location service ▫ Associates AoR ∈ Contact addresses Registration Msg. Location Server Proxy.atlanta.com Alice Softphone Registrar.biloxi.com REGISTER sip:registrar.biloxi.com SIP/2.0 Via: SIP/2.0/UDP bobspc.biloxi.com:5060; branch=z9hG4bKnashds7 Max-Forwards: 70 To: Bob <sip:[email protected]> From: Bob <sip:[email protected]>;tag=456248 Call-ID: 843817637684230@998sdasdh09 CSeq: 1826 REGISTER Contact: <sip:[email protected]> Expires: 7200 Content-Length: 0 Proxy.biloxi.com Bob’s PC Discover a Registrar • UA can use three ways to determine the address to which to send registrations ▫ Configuration With a registrar address ▫ Using AoR A UA should use the host part of the AoR as the RequestURI and address the request there, using the normal SIP server locations mechanisms ▫ Multicast Well-known (by all SIP servers) “sip.mcast.net”(224.0.1.75) Registrar Start Receive Request REGISTER sip:registrar.biloxi.com SIP/2.0 Via: SIP/2.0/UDP bobspc.biloxi.com:5060;branch=z9hG4bKnashds7 Max-Forwards: 70 To: Bob <sip:[email protected]> From: Bob <sip:[email protected]>;tag=456248 Call-ID: 843817637684230@998sdasdh09 CSeq: 1826 REGISTER Contact: <sip:[email protected]> Expires: 7200 Content-Length: 0 Contains the Contact header Y One exist /w “*” & expire Inspects the Request-URI Y Check Require-h. & Authenticate Act as a Proxy Check UAC modify right 403 Forbidden Y Call-ID agree with binding Y 400 Invalid Request Check CSeq Y Y Inspect the AoR(To header) Y Request fail Y Additional header or positive expires Remove the binding Expires interval 1) param. 2) header 3) local policy 404 Not Found Less than min-Expire 423 Interval Too Brief /w Min-expire Y 200 Ok /w bindings & expire Update or Add Bindings The Index. Which indicates a binding of the list A Fail Y 500 Server Error The AoR(“To:”) convert to Canonical form Dialog • Represents a Peer to Peer SIP relationship between two user agents ▫ Facilitates sequencing of messages between the UAs and proper routing of requests • A dialog is identified at each UA with a dialog ID which consists of ▫ Call-ID value ▫ A local tag ▫ A remote tag Creating A Dialog [email protected] Proxy Server INVITE [email protected] Cseq: a INVITE 100 Trying Add Record-Route Early Dialog Recv .101~199 Start with INVITE Dialog Recv .2xx Start with INVITE Cseq: a ACK (CANCEL) 180 Ringing Route set: Reverse order of Record-Route 200 Ok ACK Redirect Server INVITE [email protected] 302 Moved Temporarily /w Contact: [email protected] INVITE [email protected] 180 Ringing Record-Route /w params., order Add Contact header Target = Request.Contact Dialog.Call-ID = Request.Call-ID 200 Ok ACK [email protected] Requests within a Dialog [email protected] Dialog Recv .2xx Start with INVITE Proxy Server [email protected] 200 Ok 200 Ok ACK ACK RTP Route: <sip:proxy;lr> Cseq: a BYE 400 Bad request Dialog Terminated Route: <sip:proxy;lr> Cseq: a+1 BYE 200 Ok BYE 200 Ok Overview Agent (Offerer) Offer Answer Agent (Answerer) RFC 3264 ITE INV 200 INVITE 200 200 INV ITE 20 0 UAC Processing • Initial Offer MUST be in either ▫ An INVITE Answer : 2xx Msg. ▫ Final 2xx response Answer : ACK • Send INVITE Msg. ▫ UAC waits for response for the INVITE “Expire:” Transaction returns a timeout Treat as if “408” UAC Processing • 1xx Response ▫ Early dialog • 3xx Response ▫ Using Contact Addr. Depend on Response Code • 4xx ~ 6xx Response ▫ Terminating early dialog UAS Processing • “Expires:” in INVITE Request ▫ If fires 487 (Request Terminated) • Progress ▫ Can not answer the invitation immediately Provisional response To prevent cancelation ▫ UAS must send a non-100 provisional response at every min. • Redirected ▫ 300, 301, 302 ▫ “Contact : ” • Rejected ▫ 488 response should include a warning header Why the offer was rejected UAS Processing • Accepted ▫ The UAS core generates a 2xx response. ▫ INVITE contains offer msg. 2xx response should contain answer Terminating a Session • Each session is Associated with a single dialog ▫ When a BYE is received on a dialog Any session associated with the dialog should terminated A UA must not send BYE outside of a dialog Caller Callee Caller INVITE Early Dialog Recv .101~199 Start with INVITE 100 180 BYE Confirmed Dialog Callee INVITE 100 180 200 BYE ACK UAs Behavior • UAC ▫ Creates a new non-INVITE client transaction • UAS ▫ UAS receiving BYE msg. Must check if it matches an existing dialog If not, responses 481 (Call/Transaction does not exists) Summary of SIP headers Header field Where Proxy ACK BYE CAN INV OPT REG Accept R - o - o m* o Accept 2xx - - - o m* o Accept 415 - c - c c c Accept-Encoding R - o - o o o Accept-Encoding 2xx - - - o m* o Accept-Encoding 415 - c - c c c Accept-Language R - o - o o o Accept-Language 2xx - - - o m* o Accept-Language 415 - c - c c c Alert-Info R ar - - - o - - Alert-Info 180 ar - - - o - - Allow R - o - o o o Allow 2xx - o - m* m* o Allow r - o - o o o Compact Summary of SIP headers(2) Header field Where Proxy ACK BYE CAN INV OPT REG Allow 405 - m - m m m Authentication-Info 2xx - o - m m m Authorization R o o o o o o Call-ID c r m m m m m m ar i i i o o o Call-Info Contact R o - - m o o Contact 1xx - - - o - - Contact 2xx - - - m o o Contact 3xx - o - o o o Contact 485 - o - o o o Content-Disposition o o - o o o Content-Encoding o o - o o o Content-Language o o - o o o t t t t t t Content-Length d ar Compact i m e l Summary of SIP headers(3) Header field Where Proxy ACK BYE CAN INV OPT REG Compact * * - * * * c r m m m m m m a o o o o o o a - o o o o o - - - o - o m m m m m m - - - o - o m m m m m m - - - - - m o o - o o o ar - - - o o o R ar - - - o - - Proxy-Authenticate 407 ar - m - m m m Proxy-Authenticate 401 ar - o o o o o Content-Type CSeq c Date Error-Info 300-699 Expires From c In-Reply-To R Max-Forwards R Min-Expires r amr 423 MIME-Version Organization Priority f Summary of SIP headers(4) Header field Where Proxy ACK BYE CAN INV OPT REG Proxy-Authorization R dr o o - o o o Proxy-Require R ar - o - o o o Record-Route R ar o o o o o - Record-Route 2xx,18x ma - o o o o - - - - o - - - c - c c c - o o o o o c c c c c c Reply-To Require Retry-After ar 404,413, 480,486, 500,503, 600,603 adr Compact Route R Server r - o o o o o Subject R - - - o - - s Supported R - o o m* o o k Supported 2xx - o o m* m* o Summary of SIP headers(5) Header field Where Proxy Timestamp To c(1) Unsupported 420 r User-Agent ACK BYE CAN INV OPT REG o o o o o o m m m m m m - m - m m m o o o o o o Via R amr m m m m m m Via rc dr m m m m m m Warning r - o o o o o WWW-Authenticate 401 ar - m - m m m WWW-Authenticate 407 ar - o - o o o Compact ▶ In “where” ▶ In “proxy” R: in requests a: can add/concatenate if not present r: in responses m: can modify value 2xx, 4xx, etc: response code d: can delete value c: copied from request to response r: must be able to be read (cannot be encrypted) ▶ In methods c: conditional o: optional m: mandatory t: should be sent, but can be omitted m*: should be sent, but can be omitted (mandatory in stream-based transport protocol) t v IETF WGs • • • • • • • • Applications Area General Area Internet Area Operations and Management Area Real-time Applications and Infrastructure Area Routing Area Security Area Transport Area WGs WG name Activity and Key words avt RTP bliss Interoperability drinks Provisioning, orthogonal to ENUM & SPEERMINT ecrit Emergency ENUM Telephone number mapping geopriv Location convey iptel Ip telephony with “tel” URI mediactrl Media server control mmusic SDP p2psip P2psip sigtran IP, PSTN interworking simple IM & Presence, PIDF SIP SIP sipping Investigation, Event Package, 3GPP speechse MRCP, TTS speermint Session peering xcom Centrailzed conference RFC 3261 Overview RFC 3859 CPP RFC 3262 PRACK RFC 3860 CPIM RFC 2779 Requirement RFC 2778 Pres & IM model Service Architecture (SIMPLE) RFC 3861 RFC 2543 locating IM & pres. RFC 3263 Locating SIP RFC 3264 Offer / Answer RFC 4575 Conference RFC 4079 arch. of GEOPROV LO RFC 4480 RPID RFC 3265 Event-Noti. Protocol Definition (SIP/SIPPING) RFC 4479 Data Model RFC 3515 refer RFC 4481 Timed ext. RFC 3856 Presence RFC 3863 PIDF RFC 4482 CIPID RFC 3857 winfo … RFC 4119 PIDF_LO Information Format (SIMPLE/geopriv) … ( ㅡ_-)’’ No. Is RFC WG remark Rev. Status 1 RFC GEOPRIV RFC 4079 A Presence Architecture for the Distribution of GEOPRIV Location Object title - RFC A protocol that carries PIDF_LO which used [I-D-SIP-location-Conveyance] 2 RFC GEOPRIV RFC 4119 A Presence-based GEOPRIV Location Object Format - RFC Describes a Location-Object(LO) for carrying geographical information on the internet. 3 RFC IMPP RFC 2778 A Model for Presence and Instatnt Messaging - RFC A Logical model for presence and instant messaging architecture 4 RFC IMPP RFC 2779 Instatn Messaging / Presence Protocol Requirements - RFC Defines a minimal set of requirements of IMPP 5 RFC IMPP RFC 3859 Common Profile for Presence (CPP) - RFC Defines common semantics and data formats for preence 6 RFC IMPP RFC 3860 Common Profile for Instant Messaging (CPIM) - RFC Defines common semantics and data formats for IM 7 RFC IMPP RFC 3861 Address Resolution for Instant Messaging and Presence - RFC Provides a guidance for locationg the resources associated with URIs using DNS, SRV 8 RFC IMPP RFC 3863 Presence Information Data Format (PIDF) - RFC A Definition for Presence Information Data Format (PIDF) as an Extension of XML 9 RFC SIMPLE RFC 4482 CIPID: Contact Information for the PIDF - RFC Additional Contact Information to the Presentity 10 RFC SIMPLE RFC 4660 Fuctional Description of Event Notification Filtering - RFC Describes the opeations a subscriber performs in order to put filtering rules associated with a subscription 11 RFC SIMPLE RFC 4662 A SIP Event Notification Extention for Resource Lists - RFC A Subscribe mechanism for a list of resource, instade of send SUBSCRIBE to each resource 12 RFC SIMPLE RFC 4481 Timed Presence Extensions to the PIDF to Indicate Status Information for Pas and Future Time I ntervals - RFC A PIDF extension for timed status information for a time interval fully in the future or the past 13 RFC SIMPLE RFC 5263 SIP Extension for Partial Notification of Presence Information - RFC Describes the partial notification mechanism 14 RFC SIMPLE RFC 5262 PIDF Extension for Partial Prescnce - RFC A Definition for using PIDF XML for partial presence 15 RFC SIMPLE RFC 5264 Publication of Partial Presence Information - RFC A mechanism for partial presence information 16 RFC SIMPLE RFC 5196 SIP UA Capability Extension to PIDF - RFC Defines a PIDF extension to represent SIP IA capabilities 17 RFC SIMPLE RFC 4479 A Data Model for Presence - RFC A definition to PIDF for presence and instant messaging 18 RFC SIMPLE RFC 5025 Presecne Authorization Rules - RFC Authorization rules for Presence 19 RFC SIMPLE RFC 3856 A Presence Package for the SIP - RFC Presence extension for the event package 20 RFC SIMPLE RFC 4480 RPID: Rich Presence Extensions to the PIDF - RFC An extension that adds optional elements to the PIDF 21 RFC SIMPLE RFC 3857 A Watcher Information Event Templete-Package for the SIP - RFC An event templete package for event notification for management watcher information that associated a r esource 22 RFC SIMPLE RFC 3858 An XML based Format for Watcher Information - RFC A PIDF Definition for Watcher Information 23 RFC SIMPLE RFC 4825 The XML Configuration Access Protocol(XCAP) - RFC A protocol definition that can read, write, modify application in XML format on a server 24 RFC SIMPLE RFC 4826 XML Formats for Representing Resource Lists - RFC A Definition how to reprensenting resource list with XCAP 25 RFC SIMPLE RFC 4827 An XCAP Usage for Manipulating Presence Document Contents - RFC Describes a usage of the XCAP for manipulating the contents of PIDF 26 Draft SIMPLE 5 Publication Requested 27 Draft SIMPLE view-sharing Optimizing Federated Presence with View Sharing 1 Active 28 RFC SIMPLE RFC 3856 A SIP Event Package for the SIP - RFC 29 Draft SIP info-event SIP INFO Method and Package Framework 0 Active Defines a event package for session defining, negotiation and exchanging with INFO method 30 Draft SIP location-conveyance Location Conveyance for the SIP 10 Active Defines an extension to the SIP to convey geographic location information from one to another SIP entity 31 RFC SIP RFC 3515 - RFC 32 Draft SIPPING 1 Active 33 Draft SIPPING cc-framework A Call Control and Multi-party usage framework for the SIP 10 Publication Requested 34 Draft SIPPING cc-transfer Session Initiation Protocol Call Control - Transfer 11 Waiting for AD As a part of SIP Multipart call control - call transfer with REFER 35 Draft SIPPING config-framework A Framework for SIP User Agent Profile Delivery 15 AD Evaluation A Framework ro enable configuratio of SIP UA in SIP deployment 36 Draft SIPPING policy-package A SIP Event Package for Session-specific Session Policies 5 IESG Evaluation Enables UA to subacribe to session policy for a SIP session and to receive notifications, if it change 37 Draft SIPPING rtcp-summary SIP Package for Voice Quaity Reporting Event 5 IESG Evaluation A Definition to enable the collection and reporting that measure the qualituy for VoIP sessions 38 Draft SIPPING gruu-reg-event Registration Event Package Extention for SIP GRUUs 9 Last Call 39 Draft SIPPING pending-additions The SIP Pending Additions Event Package 5 RFC Ed. Queue 40 RFC SIPPING RFC 4575 A SIP Event Package for Conference State - RFC A SIP Event Package for tightly coupled conferences using the SIP 41 RFC SIPPING RFC 4235 An INVITE-Initiated Dialog Event Package for the SIP - RFC A Dialog event package for INVITE initiated dialog 42 RFC SIPPING RFC 4730 A SIP Event Package for Key Press Stimulus - RFC Describes a KPML that enables monitoring of DTMF signals and user XML docs refered to as KPML 43 RFC SIPPING RFC 3842 A Message Summary and Message Waiting Infication Event Package for the SIP - RFC interdomain-scaling-analysis Presence Interdomain Scalling Analysis for SIP/SIMPLE The SIP Refer Method presence-scaling-requirements Scaling Requirements for Presence in SIP/SIMPLE Abstract An analysis for presence and IM traffic as an informational doc. A traffic reduce method with view sharing associated I-D-interdomain-scaling-analysis The usage of the SIP for subscriptions and notifications of presence Defines REFER method, refer event package and refer-to request header A set of requirements for enabling interdomain scaling on presence Define a framework and requirements for call control and multi party usage of SIP Reg. event package (RFC3680) extention to GRUU for frequency unreachable 'contact' information Defines a event package whereby user agent can subscribe to the consent-related state of the resources [ID-sip-consent-framework] that are being added to a resource list that defines translation A SIP Event Package to carry message waiting status and message summaries form a messaging systm to UA Defines a SIP event package to support publication, subscription, and notification of additional capabilities for PoC 44 RFC SIPPING RFC 4354 A SIP Event Package and Data Format for Various Setting in Support for the PTToCellular Servic e - RFC 45 RFC SIPPING RFC 3680 A SIP Event Package for Registration - RFC A Event Package for Register event occurred state 46 RFC SPEERMINT RFC 5344 Presence and Instant Messaging Peering Use Cases - RFC Describes several user cases of peering of non-VoIP services between two or more Service Provider SIP-overload WG Rate-based Overload Control • Limit the request rate a server receives from an upstream element. ▫ Feedback: X requests per second. Loss-based Overload Control • Reduce the request rate a server receives by a percentage X. ▫ Feedback: reduce load by X%. Window-based Overload Control • Limit the number of request a server can receive without confirming a request. ▫ Feedback: send X more requests. Overload Signal-based Overload Control • De-/increase of request rate until a target overload notification rate is reached. ▫ Feedback: server overloaded (503 response without Retry–After header) Any Questions