Session Initiation Protocol



Similar documents
SIP: Protocol Overview

3.1 SESSION INITIATION PROTOCOL (SIP) OVERVIEW

For internal circulation of BSNL only

Session Initiation Protocol (SIP) 陳 懷 恩 博 士 助 理 教 授 兼 計 算 機 中 心 資 訊 網 路 組 組 長 國 立 宜 蘭 大 學 資 工 系 TEL: # 340

Session Initiation Protocol (SIP)

Media Gateway Controller RTP

SIP Messages. 180 Ringing The UA receiving the INVITE is trying to alert the user. This response MAY be used to initiate local ringback.

Konnetic Unity SIP.NET SDK

Multimedia & Protocols in the Internet - Introduction to SIP

VoIP. What s Voice over IP?

Session Initiation Protocol (SIP) Chapter 5

EE4607 Session Initiation Protocol

Voice over IP (SIP) Milan Milinković

SIP Session Initiation Protocol Nicolas Montavont

How To Send A Connection From A Proxy To A User Agent Server On A Web Browser On A Pc Or Mac Or Ipad (For A Mac) On A Network With A Webmail Web Browser (For Ipad) On An Ipad Or

Session Initiation Protocol (SIP)

NAT TCP SIP ALG Support

IP-Telephony SIP & MEGACO

SIP Session Initiation Protocol

Session Initiation Protocol and Services

Session Initiation Protocol (SIP) The Emerging System in IP Telephony

Telecommunication Services Engineering (TSE) Lab. Chapter V. SIP Technology For Value Added Services (VAS) in NGNs

Request for Comments: August 2006

Three-Way Calling using the Conferencing-URI

Voice over IP & Other Multimedia Protocols. SIP: Session Initiation Protocol. IETF service vision. Advanced Networking

internet technologies and standards

SIP : Session Initiation Protocol

Part II. Prof. Ai-Chun Pang Graduate Institute of Networking and Multimedia, Dept. of Comp. Sci. and Info. Engr., National Taiwan University

Firewall Support for SIP

SIP Introduction. Jan Janak

SIP Security. ENUM-Tag am 28. September in Frankfurt. Prof. Dr. Andreas Steffen. Agenda.

SIP Basics. CSG VoIP Workshop. Dennis Baron January 5, Dennis Baron, January 5, 2005 Page 1. np119

Internet Engineering Task Force (IETF) Request for Comments: 7088 Category: Informational February 2014 ISSN:

SIP - QUICK GUIDE SESSION INITIATION PROTOCOL - INTRODUCTION

Session Initiation Protocol (SIP)

SIP for Voice, Video and Instant Messaging

NTP VoIP Platform: A SIP VoIP Platform and Its Services

SIP and ENUM. Overview DENIC. Introduction to SIP. Addresses and Address Resolution in SIP ENUM & SIP

FortiOS Handbook - VoIP Solutions: SIP VERSION 5.2.0

BROADWORKS SIP ACCESS SIDE EXTENSIONS INTERFACE SPECIFICATIONS RELEASE Version 1

NTP VoIP Platform: A SIP VoIP Platform and Its Services 1

Denial of Services on SIP VoIP infrastructures

Multimedia Conferencing with SIP

802.11: Mobility Within Same Subnet

SIP: Ringing Timer Support for INVITE Client Transaction

VoIP with SIP. Session Initiation Protocol RFC-3261/RFC

Advanced Networking Voice over IP & Other Multimedia Protocols

End-2-End QoS Provisioning in UMTS networks

TECHNICAL SUPPORT NOTE. 3-Way Call Conferencing with Broadsoft - TA900 Series

10 Signaling Protocols for Multimedia Communication

MOHAMED EL-SHAER Teaching Assistant. Room TASK Exercises Thu., Nov. 17, 2014 CONTENT

TSIN02 - Internetworking

SIP OVER NAT. Pavel Segeč. University of Žilina, Faculty of Management Science and Informatics, Slovak Republic

Internet Services & Protocols Multimedia Applications, Voice over IP

SIP Essentials Training

Internet Services & Protocols Multimedia Applications, Voice over IP

Internet Multimedia (thanks to Henry Sinnreich, Alan Johnston, MCI WorldCom, Henning Schulzrinne) IP Communications

Formación en Tecnologías Avanzadas

ARCHITECTURES TO SUPPORT PSTN SIP VOIP INTERCONNECTION

SIP Trunking. Service Guide. Learn More: Call us at

ETSI TS V ( )

White paper. SIP An introduction

NAT Traversal in SIP. Baruch Sterman, Ph.D. Chief Scientist David Schwartz Director, Telephony Research

Technical Manual 3CX Phone System for Windows

This specification this document to get an official version of this User Network Interface Specification

Technical Communication 1201 Norphonic emergency rugged telephone on Alcatel-Lucent OmniPCX Enterprise

SIP and Mobility: IP Multimedia Subsystem in 3G Release 5

3GPP TS V8.1.0 ( )

Chapter 10 Session Initiation Protocol. Prof. Yuh-Shyan Chen Department of Computer Science and Information Engineering National Taipei University

SIP-Based VoIP Network And Its Interworking With The PSTN

Chapter 2 Voice over Internet Protocol

MODELLING OF INTELLIGENCE IN INTERNET TELEPHONE SYSTEM

Managing feature interactions between distributed SIP call control services

SIP Trunking & Peering Operation Guide

Application Notes for Configuring SIP Trunking between McLeodUSA SIP Trunking Solution and an Avaya IP Office Telephony Solution 1.

The use of IP networks, namely the LAN and WAN, to carry voice. Voice was originally carried over circuit switched networks

FOSDEM 2007 Brussels, Belgium. Daniel Pocock B.CompSc(Melbourne)

Grandstream Networks, Inc. GXP2130/2140/2160 Auto-configuration Plug and Play

IP Office Technical Tip

How to make free phone calls and influence people by the grugq

SIP RFC (3261) explained, LIGHT 3.2 (1/2011) -

The Session Initiation Protocol (SIP)

Introduction to VoIP Technology

SIP: Ringing Timer Support for INVITE Client Transaction

Performance Evaluation Framework for a SIP-based Telecommunication Call Handling System

Hacking Trust Relationships of SIP Gateways

How To Use A Microsoft Vc.Net (Networking) On A Microsatellite (Netnet) On An Ipod Or Ipod (Netcom) On Your Computer Or Ipad (Net) (Netbook) On The

SIP ALG - Session Initiated Protocol Applications- Level Gateway

Internet Working 15th lecture (last but one) Chair of Communication Systems Department of Applied Sciences University of Freiburg 2005

Session Initiation Protocol

SIP: Session Initiation Protocol. Copyright by Elliot Eichen. All rights reserved.

2.2 SIP-based Load Balancing. 3 SIP Load Balancing. 3.1 Proposed Load Balancing Solution. 2 Background Research. 2.1 HTTP-based Load Balancing

ETSI TS V8.2.0 ( ) Technical Specification

TECHNICAL CHALLENGES OF VoIP BYPASS

Session Initiation Protocol Gateway Call Flows and Compliance Information

Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme

Chapter 2 PSTN and VoIP Services Context

Transcription:

TECHNICAL OVERVIEW Session Initiation Protocol Author: James Wright, MSc This paper is a technical overview of the Session Initiation Protocol and is designed for IT professionals, managers, and architects who want a quick low-level guide to the workings and details of the protocol. SIP & IMS.NET development www.konnetic.com

p2 Session Initiation Protocol Session Initiation Protocol (SIP) was designed from the bottom up to connect people and devices whenever and wherever they are in order to engage in a (possibly lengthy) exchange of information. Existing protocols, such as HTTP and SMTP, were not purpose-built for this essential human activity, and so SIP was born to fill the gap. However, SIP borrows from these two other protocols heavily. From using HTTP s message exchange pattern, message format and encoding, to SMTP s URI scheme. In 2002 a revised version of the SIP standard was formalised into the Internet Engineering Task Force s (IEFT) standardisation process as RFC3261. Because of the open nature of the IETF standards process, the fact SIP is text based and shares many features with existing specifications, it has been readily understood, extended and implemented. Entities A SIP environment consists of a number of connected entities.: A User Agent (UA) is the entity which represents an end user in a client device. It usually operates in two modes: a User Agent Client (UAC) sends the initial request messages and processes responses; and a User Agent Server (UAS) accepts requests and sends responses. Proxy Servers are involved in routing the SIP messages to the correct endpoint. Stateful proxies sometime make use of User Agents in a logical entity called a Back-To-Back-User-Agent. Redirect Servers provide a new address or different route path to the recipient. The server may make use of a Location Server to persist location information. A Registrar acts as current repository of a client s attachment to the network. It is the User Agent that tends to reside on the end user s device. The other entities provide essential support services in many scenarios. Messages SIP messages come in two flavours: Request: sent from client to a server and define the operation sought by the client. Response: sent from server to a client and provide the status of that request. Requests A SIP request is characterised as a method much like HTTP, and is considered a verb, since it requests actions to be performed by other User Agents or servers. RFC3261 defines six methods (the first six in Table 1) with subsequent standards defining the remaining extension methods (from INFO onwards).

p3 Table 1. SIP Methods Method INVITE REGISTER BYE ACK CANCEL Used to set up a SIP session. Session parameters are negotiated. Authenticates the User Agent and provides a current location to the network. Terminates an open session. Confirms a success response to an INVITE. The third part to a three-way-handshake. Cancels an open request. BYE should be used to cancel (tear down) an existing request. OPTIONS [Extension Methods] INFO MESSAGE NOTIFY PRACK PUBLISH REFER SUBSCRIBE UPDATE Queries the capabilities of correspondents. Provides mid-call session-related information. It is rarely used. Used to transfer Instant Messages. Publishes the outcome of events. Used in combination with SUBSCRIBE requests. A Provisional Response ACKnowledgment. Confirms receipt of a provisional response. Publishes status information. Used for Instant Messaging presence services. Mechanism to pass a request to someone more appropriate to deal with it. Used to request receipt of future NOTIFY or PUBLISH requests. Modifies session parameters in mid-call. Response SIP Response messages are always sent in reply to a request. They convey status updates, confirmations, directions and error codes back to the UAC originating the request. Responses are characterised as either provisional or final; and every response must be identified by a 3-digit code. Response Types Six classes of response have been defined and are categorised using a 3-digit code. The first five are borrowed from HTTP; the sixth is new to SIP. Table 2. Response Classes Class 1xx Provisional 2xx Success 3xx Redirection Confirms receipt of request and that processing is continuing. Provisional responses to INVITEs are never ACKed. The request was received, processes and accepted. Provides location information or alternative services to try.

p4 Class 4xx Request Failure The request contained an error or cannot be processed by the server. 5xx Server Failure The server is unable to fulfil the request because of an internal error. 6xx Global Failure No service can be found to fulfil the request. Within each class, numerous response codes have been predetermined some copied from HTTP. Table 3 provides a sample of the most important responses. Table 3. Sample Response Codes # Method 100 Trying The next hop received the request. 180 Ringing Attempting to alert the user. 182 Queued Temporarily unavailable and request is in a queue (not rejected). 200 OK The request has succeeded. 301 Moved Permanently User is no longer available at the address given in the Request URI. 302 Moved Temporarily Retry the request at a new address given in the Contact header. 400 Bad Request Could not understand or process correctly the request. 401 Unauthorised The request either failed authentication or needs more information. 403 Forbidden The server is refusing to process the request. Do not retry. 404 Not Found The server cannot identify the user in its domain. 408 Request Timeout The server could not process the request in a reasonable time. 415 Unsupported Media The format is not supported by the server. 480 Temporarily Unavailable The called party is currently unavailable. 485 Ambiguous The Request URI is ambiguous. 486 Busy Here The called party is currently not willing or able to take the call. 500 Server Internal Error The server encountered an unexpected condition. 513 Message Too Large The message length exceeded a determined limit. 603 Decline The user explicitly refused to accept the request. Warning Header Field The Warning header field is used to carry additional information about the status of the response. The header defines a 3-digit code between 300 and 399, the host name and a warning text. Warning: 307 isi.edu Session parameter foo not understood

p5 Anatomy of a Message Each SIP message begins with a Start-Line, is followed by a sequence of headers, and separated from the message body by a carriage-return line-feed sequence (CRLF). Start-Line: formatted as a Request-Line for Requests or a Status-Line for Reponses. Headers: Named attributes that provide additional information about the message. Separator Line: Separator between header and body. Body: binary or textural payload. Typically Session Protocol (SDP) or a message text. The start line, each header line and the separator line is terminated by a [CRLF] sequence. Start Line The start-line conveys the type of message and protocol version. For both Request (Request-Line) and Responses (Status-Line), the start-line has three elements separated by spaces. Request-Line: Contains a method, URI and ends with the protocol version ( SIP/2.0 ). Status-Line: Starts with the protocol version, followed by a numeric status code and is completed with a short textural reason. Headers Headers follow the same generic header format as HTTP. Each consisting of a case-insensitive ASCII encoded name and colon followed by a value which is sometimes UTF8 encoded and usually case-sensitive. Each header can have one or more semi-colon separated parameters appended to the value, providing additional tags and features. header-name: header-value(;parameter-name=parameter-value)*[crlf] Each header can be separated on to different lines using a [CRLF] followed by a [TAB or SPACE] sequence (known as folding). What s more, multiple headers with the name same (e.g. Contact) can appear on separate lines, or, can be placed on the same line separated by commas. For example: Contact: <sip:alice@atlanta.com> Contact: <sip:alice1@chicago.com> Can be represented as: Contact: <sip:alice@atlanta.com>, <sip:alice1@chicago.com> Or using folding: Contact: <sip:alice@atlanta.com>, <sip:alice1@chicago.com>

p6 Body A message body describes the session (using SDP) or contains opaque text or binary body parts containing the payload related to the session (e.g. MIME or Message formats). Bodies can appear in request or response messages. Header Fields The following message breakdown is an example of an INVITE request containing an SDP message being responded to with a 200 OK response. In the example, Alice makes a call to Bob using his SIP URI, sip:bob@897s.sydney.com. Bob answers Alice with a success Response. Request Message Table 4. Request Message Example Line INVITE sip:bob@897s.sydney.com SIP/2.0 Via: SIP/2.0/UDP 124.191.8.8:11506 Max-Forwards: 70 To: Bob <sip:bob@897s.sydney.com> From: Alice <sip:alice@melbourne.com>;tag=769122 Call-ID: afh7989asdfhf@mel99.melbourne.com CSeq: 3434534 INVITE Contact: <sip:alice@mel99.melbourne.com> Content-Type: application/sdp Content-Length: 136 An INVITE method request addressed to bob at 897s.Sydney.com using SIP version 2.0 The address where Alice expects to receive responses to the request Limits the number of network hops and identifies loops. The display name and address of the original recipient. The display name and address of the original sender A globally unique identifier for the call. The To, From, and Call-ID tuple provides a unique key for a call. An incremented command sequence number and original method. Further contact information for Alice. A description of the message body (SDP). The byte count of the message length. [SEPERATOR LINE] v=0 The SDP version number. o=alice 4352354234 523542345 IN IP4 124.191.9.1 s=going to lunch c=in IP4 224.2.18.12/222 The originator of the session plus session identifier and version. A textural session name Address and network connection data. t=278956487 789456775 Session start and stop time (seconds since 1900) m=audio 49170 RTP/AVP 0 The description of the session media: type, port, protocol and formats.

p7 Request Message Table 5. Request Message Example Line SIP/2.0 200 OK Via: SIP/2.0/UDP 124.191.8.8:11506 To: Bob <sip:bob@897s.sydney.com>;tag=abgj67 From: Alice <sip:alice@melbourne.com>;tag=769122 Call-ID: afh7989asdfhf@mel99.melbourne.com The response code and reason phrase. Copied from the INVITE request. Copied from the INVITE request. A new tag parameter is added. Copied from the INVITE request. Copied from the INVITE request. CSeq: 3434534 INVITE Contact: <sip:bob@897s.sydney.com> Content-Type: application/sdp Content-Length: 132 Copied from the INVITE request. Contact information for Bob A description of the message body (SDP). The byte count of the message length. [SEPERATOR LINE] v=0 The SDP version number. o=bob 4352354234 523542345 IN IP4 124.191.10.165 s=going to lunch c=in IP4 224.120.9.98/222 The originator of the session plus session identifier and version. A textural session name Address and network connection data. t=278956487 789456775 Session start and stop time (seconds since 1900) m=audio 49170 RTP/AVP 0 The description of the session media: type, port, protocol and formats. Figure 1. Alice completes a SIP call with Bob, exchanges media packets, then Bob terminates the call.

p8 Call Flow Example Call Flow: Simple Successful SIP to SIP This section details a call flow between that same two SIP User Agents as above (see Figure 1) and could use the same message structures. The successful calls show the initial signalling, the establishment of the media session, then finally the termination of the call. Session Setup Alice s UA sends an INVITE message to Bob s SIP address (i.e. <sip:bob@897s.sydney.com>). The message contents are a Session Protocol message describing the expected media exchange. Bob s UA receives the INVITE and responds with a 100 Trying message. The UA then attempts to attract the attention of Bob, and simultaneously sends a 180 Ringing message to Alice. Bob respond and is UA sends a 200 OK message. The 200 OK contains the SDP message Bob is agreeing to. Finally, Alice s UA acknowledges receipt of the OK with an ACK request. Media streams are established directly between Alice and Bob. Session Tear Down Bob hangs up and his UA initiates a session termination by sending a BYE request to Alice. Alice s UA response with a 200 OK.

p9 Further Reading H. Schulzrinne. (2010) Henning Schulzrinne. [Online]. http://www.cs.columbia.edu/~hgs/ A. B. Johnston, SIP: Understanding the Session Initiation Protocol, 3th ed. Boston, MA, USA: Artech House, 2007. J. Rosenberg et al., SIP: Session Initiation Protocol, RFC 3261 2002. IETF. (2010) Multiparty Multimedia Session Control (mmusic). [Online]. http://datatracker.ietf.org/wg/mmusic IETF. (2010) Session Initiation Protocol (sip). [Online]. http://datatracker.ietf.org/wg/sip/ Konnetic Website. http://www.konnetic.com Other Papers In the Series IMS - Technologies and Architecture http://www.konnetic.com/documents/konneticimstechnologiesandarchitecture.pdf IMS - Services and Revenue http://www.konnetic.com/documents/konneticimsservicesandrevenue.pdf SIP - An Introduction http://www.konnetic.com/documents/konneticsipintroduction.pdf SDP - Technical Overview http://www.konnetic.com/documents/konneticsdptechnicaloverview.pdf James Wright MSc is the founder of Konnetic, a specialist in providing SIP and IMS based software to the.net (C#, VB.NET, F# and more) community.