Session Initiation Protocol SIP Chapter 5 Introduction n






















































































- Slides: 86
Session Initiation Protocol (SIP) Chapter 5
Introduction n A powerful alternative to H. 323 More flexible, simpler Easier to implement n n Advanced features Better suited to the support of intelligent user devices A part of IETF multimedia data and control architecture SDP, RTSP (Real-Time Streaming Protocol), SAP (Session Announcement Protocol) Internet Telephony 2
The Popularity of SIP n Originally Developed in the MMUSIC n n SIP + MGCP/MEGACO n n A separate SIP working group RFC 3261 Many developers The Vo. IP signaling in the future “back-off” or SIPit (SIP Interoperability Tests) n n Test products against each other Organized by SIP Forum Internet Telephony 3
n n n The 18 th SIPit event in Tokyo, Japan took place April 17 -21, 2006, and will be hosted by JPNIC The 17 th SIPit event in Stockholm, Sweden took place 2005 -09 -11 to 2005 -09 -16 and was hosted by Hotsip The 16 th SIPit event in Banff, Canada took place 200504 -04 to 2005 -04 -08 and was hosted by Jasomi Networks The 15 th SIPit event in Taiwan took place 2004 -08 -23 to 2004 -08 -27 and was hosted by CCL/ITRI The 14 th SIPit event in Cannes, France took place 2004 -02 -08 to 2004 -02 -13 and was hosted by ETSI Internet Telephony 4
SIP Architecture n A signaling protocol n n SIP + SDP n n The setup, modification, and tear-down of multimedia sessions Describe the session characteristics Separate signaling and media streams Internet Telephony 5
SIP Network Entities n Clients n n n Servers n n n User agent clients Application programs sending SIP requests Responds to clients’ requests Clients and servers may be in the same platform Proxy n Acts as both clients and servers Internet Telephony 6
n Four types of servers n Proxy servers n n Handle requests or forward requests to other servers Can be used for call forwarding Internet Telephony 7
n Redirect servers n n Map the destination address to zero or more new addresses Do not initiate any SIP requests Internet Telephony 8
n A user agent server n n n Accept SIP requests and contacts the user The user responds → an SIP response A SIP device E. g. , an SIP-enabled telephone A registrar n Accepts SIP REGISTER requests n n Indicating the user is at a particular address Typically combined with a proxy or redirect server Internet Telephony 9
SIP Call Establishment n It is simple n A number of interim responses Internet Telephony 10
SIP Advantages n n n Attempt to keep the signaling as simple as possible Offer a great deal of flexibility Various pieces of information can be included within the messages n n n Including non-standard information Enable the users to make intelligent decisions The user has control of call handling n No need to subscribe call features Internet Telephony 11
n Call Completion to Busy Subscriber service Internet Telephony 12
Overview of SIP Messaging Syntax n Text-based n n SIP messages n n Similar to HTTP message = start-line *message-header CRLF [message-body] start-line = request-line | status-line Request-line specifies the type of request The response line n The success or failure of a given request Internet Telephony 13
n Message headers n n Additional information of the request or response E. g. , n n The originator and recipient Retry-after header Subject header Message body n Describe the type of session n The media format n n n SDP, Session Description Protocol Could include an ISDN User Part message Examined only at the two ends Internet Telephony 14
SIP Requests n n method SP request-URI SP SIP-version CRLF request-URI n n The address of the destination Methods n INVITE, ACK, OPTIONS, BYE, CANCLE, REGISTER n n extensions: INFO, REFER, UPDATE, … INVITE n n n Initiate a session Information of the calling and called parties The type of media ~IAM (initial address message) of ISUP ACK only the final response Internet Telephony 15
n BYE n n n Terminate a session Can be issued by either the calling or called party Options n Query a server as to its capabilities n n n A particular type of media The response if sent an INVITE CANCEL n n Terminate a pending request E. g. , an INVITE did not receive a final response Internet Telephony 16
n REGISTER n n n Log in and register the address with a SIP server “all SIP servers” – multicast address (224. 0. 1. 75) Can register with multiple servers Can have several registrations with one server INFO n n RFC 2976 Transfer information during an ongoing session n DTMF digits account balance information midcall signaling information generated in another network Internet Telephony 17
SIP Responses n SIP version SP status code SP reason-phrase CRLF n reason-phrase n n n A textual description of the outcome Could be presented to the user status code n n n n A three-digit number 1 XX Informational 2 XX Success (only code 200 is defined) 3 XX Redirection 4 XX Request Failure 5 XX Server Failure 6 XX Global Failure All responses, except for 1 XX, are considered final n Should be ACKed Internet Telephony 18
“One number” service Internet Telephony 19
SIP Addressing n SIP URLs (Uniform Resource Locators) n n user@host E. g. , n n sip: collins@home. net sip: 3344556789@telco. net n Supplement the URL n sip: 3344556789@telco. net; user=phone sip: user: password@host: port; uri-parameters? headers n Internet Telephony 20
Message Headers n Provide further information about the message n n ~information elements E. g. , n To: header in an INVITE n n From: header n n The called party The caling party Four main categories n n n General, request, response, and entity headers A list in Table 5 -2 Mapping in Table 5 -3 Internet Telephony 21
General Headers n n Used in both requests and responses Basic information n n E. g. , To: , From: , Call-ID: , … Contact: n n A URL for future communication May be different from the From: header n Requests passed through proxies Internet Telephony 22
n Request Headers n n n Apply only to SIP requests Addition information about the request or the client E. g. , n n Subject: Priority: , urgency of the request Authorization: , authentication of the request originator Response Headers n n Further information about the response E. g. , n n Unsupported: , features Retry-After Internet Telephony 23
n Entity Header n n Session information presented to the user Session description, SDP n n n n The RTP payload type, an address and port Content-Length, the length of the message body Content-Type, the media type of the message Content-Encoding, for message compression Content Disposition, Content-Language, Allow, used in a Request to indicate the set of methods supported Expires, the date and time Internet Telephony 24
Example of SIP Message Sequences n Registration n n Via: Call-ID: n n Content-Length: n n Avoid ambiguity Expires: n n n Zero, no msg body Cseg: n n host-specific TTL 0, unreg Contact: n * Internet Telephony 25
Invitation n A two-party call n Subject: n n optional Content-Type: n application/sdp Internet Telephony 26
Internet Telephony 27
Termination of a Call n Cseq: n Has changed Internet Telephony 28
Redirect Servers n An alternative address n n 302, Moved temporarily Another INVITE n n Same Call-ID Cseq ++ Internet Telephony 29
Proxy Servers n n n Entity headers are omitted Changes the Req-URI Via: n n n The path Loop detected, 482 For a response n n n The 1 st Via: header Checked removed Internet Telephony 30
Internet Telephony 31
Proxy state n n Can be either stateless or stateful Record-Route: n The messages and responses may not pass through the same proxy n n A Proxy might require that it remains in the signaling path n n n Use Contact: In particular, for a stateful proxy Insert its address into the Record-Route: header The response includes the Record-Route: header The Record-Route: header is used in the subsequent requests The Route: header = the Record-Route: header in reverse order, excluding the first proxy Each proxy remove the next from the Route: header Internet Telephony 32
Forking Proxy n n “fork” requests A user is registered at several locations n ; branch=xxx Internet Telephony 33
Internet Telephony 34
The Session Description Protocol n The message body n n SDP, RFC 2327 The Structure of SDP n Session Level Info n n Name The originator The time Media Level Info n n Media type Port number Transport protocol Media format Internet Telephony 35
n SDP session description structure Internet Telephony 36
SDP Syntax n n A number of lines of text In each line n n n field=value Session-level fields first Media-level fields n Begin with media description field (m=) Internet Telephony 37
Mandatory Fields n n v=(protocol version) o=(session origin or creator and session id) s=(session name), a text string t=(time of the session) n n n t=<start time> <stop time> NTP time values in seconds m=(media) n n n m=<media> <port> <transport> <fmt list> Media type The transport protocol The media format, an RTP payload format Internet Telephony 38
Optional Fileds n i=(session information) n n n u=(URI of description) n n n Where further session information can be obtained Only at session level e=(e-mail address) n n n A text description At both session and media levels Who is responsible for the session Only at the session level p=(phone number) n Only at the session level Internet Telephony 39
n c=(connection information) n n n b=(bandwidth information) n n n Connection type, network type, and connection address At session or media level In kilobits per second At session or media level r=<repeat interval> <active duration> <list of offsets from start- time> n n For regularly scheduled session How often and how many times Internet Telephony 40
n z=(timezone adjustments) n n k=(encryption key) n n z=<adjustment time> <offset>. . For regularly scheduled session Standard time and Daylight Savings Time k=<method>: <encryption key> An encryption key or a mechanism to obtain it At session or media level a=(attributes) n Describe additional attributes Internet Telephony 41
Ordering of Fields n Session Level n n n n Protocol version (v) Origin (o) Session name (s) Session information (i) URI (u) E-mail address (e) Phone number (p) Connection info (c) Bandwidth info (b) Time description (t) Repeat info (r) Time zone adjustments (z) Encryption key (k) Attributes (a) n Media level n n n Media description (m) Media info (i) Connection info (c) n n Optional if specified at the session level Bandwidth info (b) Encryption key (k) Attributes (a) Internet Telephony 42
Subfields n n Field = <value of subfield 1> <value of subfield 2> <value of subfield 3> … Origin (o) n n Username, the originator’s login id or “-” session ID n n version, a version number for this particular session network type n n n A text string; IN refers to Internet address type n n A unique ID Make use of NTP timestamp IP 4, IP 6 Address, a fully-qualified domain name or the IP address o=mhandley 2890844526 2890842807 IN IP 4 126. 16. 64. 4 43 Internet Telephony
n Connection Data n n The network and address at which media data are to be received Network type, address type, connection address c=IN IP 4 224. 2. 17. 12/127 Media Information n Media type n n n Port, 1024 -65535 Format n n n Audio, video, application, data, or control List the various types of media RTP/AVP payload types m= audio 45678 RTP/AVP 15 3 0 n G. 728, GSM, G. 711 Internet Telephony 44
n Attributes n Property attribute n n n value attribute n n a=sendonly a=recvonly a=orient: landscape rtpmap attribute n n The use of dynamic payload type a=rtpmap: <payload type> <encoding name>/<clock rate> [/<encoding parameters>]. m=video 54678 RTP/AVP 98 a=rtpmap 98 L 16/16000/2 Internet Telephony 45
Usage of SDP with SIP n n SIP for the establishment of multimedia sessions SDP – a structured language for describing the sessions n The entity header Internet Telephony 46
Negotiation of Media n Fig 5 -15 n n If a mismatch n n G. 728 is selected 488 or 606 Not Acceptable A Warning header INVITE with multiple media streams n n Unsupported should also be returned With a port number of zero Internet Telephony 47
Internet Telephony 48
n Offer/answer Internet Telephony 49
Internet Telephony 50
n OPTIONS Method n Determine the capabilities of a potential called party Internet Telephony 51
SIP Extensions and Enhancements n RFC 2543, March 1999 n n obsoleted by RFCs 3261, 3262, 3263, 3265 Will be enhanced considerably before it becomes an Internet standard 183 – session progress (RFC 3261) Supported: header (RFC 3261) n n Require: Supported: Internet Telephony 52
183 Session-Progress Message n The addition of a new response n n Status code 183 To open a one-way media path n n From the called party to calling party convey information about the progress of the call that is not otherwise classified n n n ACM (address complete message) of SS 7 For SIP – PSTN – SIP connections When a temporary media stream is needed Note that alerting signal can be n n Tones or announcements Status code 180 (ringing) The temporary media stream will be terminated n As soon as the called user answers Internet Telephony 53
The SIP Supported Header n The Require header n n UACs tell UASs about options that the UAC expects the UAS to support require: 100 rel may receiver 420 (Bad Extension) The Supported header n n enumerates all the extensions supported by the UAC or UAS Included in both requests and responses n n n BYE, CANCEL, INVITE, OPTIONS and REGISTER Should not be included in the ACK 421, extension required n The UAS needs a particular extension to process the request Internet Telephony 54
Internet Telephony 55
SIP INFO Method n A new SIP method – RFC 2976 n n The transfer of information in the middle of a call DTMF digits, account-balance information, mid-call signaling information (from PSTN) A powerful, flexible tool to support new services e. g. , the user’s prepaid account balance Internet Telephony 56
SIP Event Notification n SIP-specific event notification n SUBSCRIBE n n n be informed of some event(s) RFC 3265 subscribe to certain event Event: header NOTIFY n n inform the user 200 (OK) response Internet Telephony 57
Internet Telephony 58
SIP for Instant Messaging n SIMPLE - SIP for Instant Messaging and Presence Leveraging Extensions n n n The exchange of content between a set of participants in near real time n n a working group RFC 3994, 3856 IMs are usually grouped together into brief live comversations MESSAGE request, RFC 3994 n a message body in the form text/plain, or message/cpim (common presence and instant message) using XML Internet Telephony 59
n n Doesn’t establish a SIP dialog Can be associated with an existing SIP dialog Contact: header is forbidden No Record-Route: or Route: header Internet Telephony 60
Internet Telephony 61
REFER Method n n RFC 3515 Instruct the receiver to contact a third party Refer-to: Can be interpreted as an implicit SUBSCRIBE n n 202 (accepted) n n n The sender will be notified the result An extension A SIP message is tunneled within a SIP message Refer-by: Internet Telephony 62
Internet Telephony 63
Internet Telephony 64
Reliability of Provisional Responses n n n If the messages is sent over UDP n n 100 (trying), 180 (ringing), 183 (session in progress) Are not answered with an ACK Unreliable Lost provisional response may cause problems when interoperating with other network n n n 180, 183 → Q 931 alerting or ISUP ACM To drive a state machine E. g. , a call to an unassigned number n ACM to create a one-way path Internet Telephony 65
n RSeq n n n Rack n n Prov Resp ACK the option tag n n Response ACK PRACK n n Response seq +1, when retxm 100 rel Should not n n Apply to 100 hop-by-hop Internet Telephony 66
Internet Telephony 67
UPDATE Method n n RFC 3311 Change the media format in the early state n n re-INVITE cannot be used; it changes the state Can be used to reserve network resources Internet Telephony 68
Integration of SIP and Resource Mang n n n RFC 3312 The signaling might take a different path from the media Assume resource-reservation mechanisms available (Chapter 8) n n n On a per-session basis On an aggregate basis A new SIP header in the INVITE n n n Resources reservation is needed The user should not yet be alerted But unrecognized header is ignored Internet Telephony 69
n Integration of Resource Management and SIP for IP Telephony n n n A new method, PRECONDITION-MET The far-end phone will not ring until Also specifies extensions to SDP Can define any number of preconditions in SDP without revise SIP every time The response is sent using reliable signaling Once the resource is reserved n n An UPDATE request is sent If failed, could select a lower-bandwidth codec Internet Telephony 70
Internet Telephony 71
n The preconditions/requirements in the SDP n Three status n n Resource reservation n n end-to-end (e 2 e), local, and remote Purpose n n desired, current, and confirmed send, recv, and sendrecv Strength n mandatory, optional, none and failure Internet Telephony 72
n Examples n n n n m=audio 4444 RTP/RTCP 0 a=curr: qos e 2 e none a=des: qos mandatory e 2 e sendrecv a=curr: qos e 2 e sendrecv a=des: qos mandatory e 2 e sendrecv Internet Telephony 73
Internet Telephony 74
Usage of SIP for Features/Services n n Personal mobility by registration Can carry MIME (Multi-Purpose Internet Mail Extension) content n n SIP address is a URL n n Click-to-call applications Supplementary Custom Local Area Signaling Service (CLASS) services n n Text, HTML documents, an image, etc. Call waiting, call forwarding, multi-party calling, call screening Proxy-controlled: Qo. S, IN SCP, INAP, OSA Internet Telephony 75
Call Forwarding n n On busy 486, busy here Internet Telephony 76
Consultation Hold n A SIP UPDATE Internet Telephony 77
Interworking n PSTN Interworking n n n A SIP URL A network gateway Fig. 5 -27 n n Fig. 5 -28 n n SIP to PSTN call PSTN to SIP call PSTN – SIP – PSTN n n MIME media types For ISUP and QSIG Internet Telephony 78
Internet Telephony 79
Internet Telephony 80
Interworking with H. 323 n n An Internet draft SIP-H. 323 interworking gateway Internet Telephony 81
Internet Telephony 82
Internet Telephony 83
Internet Telephony 84
Internet Telephony 85
Summary n The future for signaling in Vo. IP networks n n n Simple, yet flexible Easier to implement Fit well with the media gateway control protocols Internet Telephony 86