SIP Session Initiation Protocol



Similar documents
3.1 SESSION INITIATION PROTOCOL (SIP) OVERVIEW

SIP: Protocol Overview

Media Gateway Controller RTP

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

Multimedia & Protocols in the Internet - Introduction to SIP

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

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

Session Initiation Protocol

SIP : Session Initiation Protocol

SIP Introduction. Jan Janak

TSIN02 - Internetworking

VoIP. What s Voice over IP?

Session Initiation Protocol (SIP) Chapter 5

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

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

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

Session Initiation Protocol (SIP)

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

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

Voice over IP (SIP) Milan Milinković

internet technologies and standards

For internal circulation of BSNL only

Session Initiation Protocol (SIP)

NTP VoIP Platform: A SIP VoIP Platform and Its Services

Session Initiation Protocol and Services

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

SIP: Session Initiation Protocol

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

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

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

NGN NNI Signalling Profile

Advanced Networking Voice over IP & Other Multimedia Protocols

SIP Session Initiation Protocol Nicolas Montavont

EE4607 Session Initiation Protocol

White paper. SIP An introduction

Three-Way Calling using the Conferencing-URI

How To Write A Sip Message On A Microsoft Ipa (Sip) On A Pcode (Siph) On An Ipa Or Ipa On A Ipa 2 (Sips) On Pcode On A Webmail (

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

10 Signaling Protocols for Multimedia Communication

SIP for Voice, Video and Instant Messaging

IP-Telephony SIP & MEGACO

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

802.11: Mobility Within Same Subnet

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

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

NAT TCP SIP ALG Support

Multimedia Conferencing with SIP

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

VIDEOCONFERENCING. Video class

SIP Trunking & Peering Operation Guide

Internet Services & Protocols Multimedia Applications, Voice over IP

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

Request for Comments: August 2006

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

Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme

Internet Services & Protocols Multimedia Applications, Voice over IP

SIP Essentials Training

Session Initiation Protocol (SIP)

SPAM over Internet Telephony and how to deal with it

Formación en Tecnologías Avanzadas

AGILE SIP TRUNK IP-PBX Connection Manual (Asterisk)

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

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

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

FortiOS Handbook - VoIP Solutions: SIP VERSION 5.2.0

Introduction to VoIP Technology

ARCHITECTURES TO SUPPORT PSTN SIP VOIP INTERCONNECTION

SIP - QUICK GUIDE SESSION INITIATION PROTOCOL - INTRODUCTION

An Implementation of the Internet Call Waiting Service using SIP

How To Understand The Purpose Of A Sip Aware Firewall/Alg (Sip) With An Alg (Sip) And An Algen (S Ip) (Alg) (Siph) (Network) (Ip) (Lib

SIP ALG - Session Initiated Protocol Applications- Level Gateway

SIP Tutorial. VoIP Workshop Terena 2005 Poznan Poland. By Stephen Kingham

EDA095 Audio and Video Streaming

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

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

SIP: Ringing Timer Support for INVITE Client Transaction

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

End-2-End QoS Provisioning in UMTS networks

Special Module on Media Processing and Communication

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

3GPP TS V8.1.0 ( )

SIP A Technology Deep Dive

SIP, Session Initiation Protocol used in VoIP

Hacking Trust Relationships of SIP Gateways

Voice over IP (VoIP) Part 2

Session Initiation Protocol Gateway Call Flows and Compliance Information

Chapter 2 Voice over Internet Protocol

Mobicents 2.0 The Open Source Communication Platform. DERUELLE Jean JBoss, by Red Hat 138

VoIP and NAT/Firewalls: Issues, Traversal Techniques, and a Real-World Solution

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

Chapter 2 PSTN and VoIP Services Context

Voice over IP Consortium

Multimedia Communications Voice over IP

AN IPTEL ARCHITECTURE BASED ON THE SIP PROTOCOL

Session Initiation Protocol

IMS Conference (IMS Conference Call) Calling UE IMS Network Called UE Caller User Equipment

Transcription:

SIP Session Initiation Protocol Laurent Réveillère Enseirb Département Télécommunications reveillere@enseirb.fr Session Initiation Protocol Raisin 2007

Overview This is a funny movie! I bet Laura would love to watch it How could I tell her about it? The Internet SIP enables us to invite users to multimedia sessions 2

Functionality Provided by SIP Session establishment, modification, and termination Used to create brand new sessions Used to invite new members to an existing session Sessions are established only if The callee accepts the call Caller and callee agree on the media parameters that will be used Independence of The type of multimedia session handheld» Videoconferences, audio calls, shared whiteboards, gaming sessions, The mechanism used to describe the session» Usually SDP for RTP streams carrying audio and video» Probably another protocol for gaming sessions 3

Where to find SIP? SIP IM, Web phones, Multimedia Applications Interconnect IP PBX and IP Centrex Voice over LAN / Broadband Cable Telephony 4

SIP Philosophy Internet Standard IETF - http://www.ietf.org Based on Client- Model Clients send requests, receive responses s receive requests, send responses Reuse Internet addressing (URIs, DNS, proxies) Utilizes rich Internet features set Reuse HTTP coding Text based Makes no assumptions about underlying protocol TCP, UDP, X.25, frame relay, ATM, etc. Support of multicast 5

Where is SIP in the Protocol Zoo? Source: Henning Schulzrinne http://www.cs.columbia.edu/~hgs/internet/ 6

SIP Architecture SIP Components Location Feature Registrar User Agent Proxy Proxy User Agent SIP Network 7

SIP Architecture SIP Components Location Feature Registrar User Agent Proxy Proxy User Agent SIP Network 8

User Agent (UA) SIP entity that interacts with the user Has an interface towards the user May respond or forward invitations on user s behalf» Does not necessary maintain interaction with the user UAC (User Agent Client) Caller application that initiates and sends SIP requests UAS (User Agent ) Receives and responds to SIP requests on behalf of clients Accepts, redirects or refuses calls Both software and hardware available 9

SIP Architecture SIP Components Location Feature Registrar User Agent Proxy Proxy User Agent SIP Network 10

Registrar Accept registrar requests Usually co-located with a location or proxy server Store current location of users A user can register from different locations SIP Registrar at company.com 147.210.123.456 I am Bob.Johnson Today I will be reachable at: sip:bob@147.210.123.456 11

SIP Architecture SIP Components Location Feature Registrar User Agent Proxy Proxy User Agent SIP Network 12

Location Not really a SIP entity General term used for a database (RFC 2543) SIP servers use non-sip protocols to query, update, and retrieve records from a location server» Example: LDAP (Lightweight Directory Access Protocol) Main purpose Stores and returns information about a user» Current URI» IP address» User preferences» Usually accessed through a registrar server and/or a proxy server 13

SIP Architecture SIP Components Location Feature Registrar User Agent Proxy Proxy User Agent SIP Network 14

Proxy Acts as both a server and a client Make requests on behalf of other clients Performs routing function Determine to which hop signaling should be relayed» User agent, proxy, Interprets, rewrites or translates a request message before forwarding it Forking Tries more than one location for a user Parallel call» Trying all possible locations at the same time Sequential search» Trying each location individually until success 15

Programming SIP SIP Components Location Feature Registrar User Agent Proxy Proxy User Agent SIP Network 16

Programming SIP A SIP based system can support rapid service creations Example of services Basic call features» Call waiting, call forwarding, call blocking, etc. Click to call Call center Find me / follow me Service logic options Call Processing Language (CPL) Session Processing Language (SPL) SIP Common Gateway Interface (SIP-CGI) SIP Java Servlet (SIP-Servlet) SIP Java API for Integrated Networks (SIP-JAIN) SIP Express Router Language (SER) Microsoft SIP Processing Language (MSPL) 17

SIP Protocol Laurent Réveillère Enseirb Département Télécommunications reveillere@enseirb.fr Session Initiation Protocol Raisin 2007

Client/ Transaction Client Request Response 1 Transaction Response n 19

Requests and Responses Similarities with HTTP Text format (readability vs size) Headers Response code» Classes» Hierarchy Body of requests and responses Parameters (e.g., Session Description Protocol) Explanations (e.g., reason phrase) 20

Session Description Protocol (SDP) Format to describe a session (not a protocol) Examples: Name and purpose of the session Media parameters of the underlying audio and video streams IP addresses and port numbers Session descriptions transferred via other protocols (SIP, SAP, RTSP, HTTP ) No parameter negotiation 21

SDP Syntax A set of lines of the form Type = value Type: One character value: Format depends on type Two sections Session-level information» First line SDP version: v=0» Applies to the whole session» Examples: originator or session name Media-level information (if present)» First line media type: m» Applies to a particular media stream» Example: codec for encoding the audio stream 22

Example v=0 o=bob 2890844526 28900842807 IN IP4 131.160.1.112 s=sip seminar i=a seminar on the Session Initiation Protocol u=http://www.cs.columbia.edu/sip e=bob@university.edu c=in IP4 224.2.17.12/127 t=2873397496 2873404696 a=recvonly m=audio 49170 RTP/AVP 0 a=rtpmap:0 PCMU/8000 m=video 51372 RTP/AVP 31 a=rtpmap:31 H261/9000 m=video 53 RTP/AVP 32 a=rtpmap:32 MPV/9000 o : creator of the session and his IP addr s : name of the session i : general information about the session u : URI for more information e : e-mail address of the contact person c : multicast address of the session t : when the session is active a : not an interactive session m =<media type> <port #> <transp. prot.> <media fmt> a : information about media format Pars: clock rate, number of channels Introduction of new attributes Examples E.g., a=volume:8 Audio, media format=0 single-channel PCM encoding, 8-kHz sampling Video, media format=31 H.261, 9 khz 23

SIP Responses Range Response class 100-199 Informational (provisional) 200-299 Success 300-399 Redirection 400-499 Client error 500-599 error 600-699 Global Failure 24

Protocol Operations/Methods OPTIONS Querying capabilities» Supported methods (future extensions)» Supported SDP» Supported message body encoding REGISTER Register current location Multiple locations can be registered for a user INVITE ACK BYE CANCEL 25

Session Invitation (INVITE) Bob Laura (1)INVITE (2) 180 Ringing (3) 200 OK (4) ACK Conversation 26

Three-way Handshake (1) (1)INVITE (2) 180 Ringing (3) 200 OK (4) ACK Conversation Response delay Client still there Successful session Billing Parallel requests 27

Three-way Handshake (2) Unreliable Protocol (UDP) (1)INVITE (2)INVITE (3)INVITE Bob gives up (4)INVITE (5) 200 OK? 28

End of Session (BYE) (1)INVITE (2) 180 Ringing (3) 200 OK Abandon by the issuing participant (4) ACK Conversation (5) BYE (6) 200 OK 29

Session Cancellation (CANCEL) (1)INVITE (2) 180 Ringing (3) CANCEL (4) 200 OK (5) 487 Transaction Cancelled (6) ACK Interpretation If session not established» Cancel If session established» No effect Three-way handshake even for cancellation Usage context Parallel calls 30

Forking Proxy and Cancellation Forking Proxy comp.com 131.160.1.112 university.com (1)INVITE (2)INVITE (3)INVITE (4)INVITE (5) 200 OK (6) 200 OK (7) ACK Conversation (8) CANCEL (9) 200 OK (10) 487 Cancelled (11) ACK (12) CANCEL (13) 200 OK (14) 487 Cancelled (15) ACK 31

Format of SIP messages Request-line Header Request Status line Header Response Header-name : Header-value Header Empty Line Message body (optional) Request-line Method Request-URI (next hop) Protocol version Header-name : Header-value Header Empty Line Message body (optional) Status line Protocol version Status code Reason phrase 32

The SIP Headers Accept Content-encoding Max-forwards Route Accept-encoding Content-language MIME-version Accept-language Content-length Organization Subject Alert-info Content-type Priority Supported Allow Cseq Proxy-authenticate Timestamp Also Date Proxy-authorization To Authorization Encryption Proxy-require Unsupported Call-ID Error-info Record-route User-agent Call-info Expires Require Via Contact From Response-key Warning Content-disposition In-reply-to Retry-after WWW-authenticate 33

To Header Laura P2 131.6.2.1 university.com (1) INVITE SIP:Bob@comp.com SIP/2.0 To:SIP:Bob@comp.com (2) INVITE SIP:Bob@131.6.1.2 SIP/2.0 To:SIP:Bob@comp.com (3) INVITE SIP:Bob@university.com SIP/2.0 To:SIP:Bob@comp.com Recipient of the request Also the public address Unchanged throughout the session (not changed by proxies) Different from the Request-URI, which is The next hop in the signaling path Changed by every proxy in the path 34

Call-ID Header (1)INVITE Call-ID: 123@131.160.1.112 (2) 200 OK Call-ID: 123@131.160.1.112 (3) ACK Call-ID: 123@131.160.1.112 Game (4)INVITE Call-ID: 567@131.160.1.112 (5) 200 OK Call-ID: 567@131.160.1.112 (6) ACK Call-ID: 567@131.160.1.112 Conversation (7) BYE Call-ID: 567@131.160.1.112 (8) 200 OK Call-ID: 567@131.160.1.112 signaling relationship among 2 or more users Unique identifier of an invitation and subsequent related transactions Association mechanism of messages for servers 35

Contact Header Bob SIP proxy Laura (1)INVITE sip:laura@comp.com SIP/2.0 Contact: sip:bob@15.11.3.33 (2)INVITE sip:laura@13.16.1.11 SIP/2.0 Contact: sip:bob@15.11.3.33 (4) 200 OK Contact: sip:laura@13.16.1.11 (5) ACK (3) 200 OK Contact: sip:laura@13.16.1.11 Where the user can be reached Enabling server(s) to be skipped Conversation (6) BYE sip:laura@13.16.1.11 SIP/2.0 (7) 200 OK 36

Cseq Header (1)INVITE Cseq: 1 INVITE (2) 200 OK Cseq: 1 INVITE (3) ACK Cseq: 1 ACK (4)INVITE Cseq: 2 INVITE (5) 200 OK Cseq: 2 INVITE (6) ACK Cseq: 2 ACK (7) BYE Cseq: 3 BYE (8) 200 OK Cseq: 3 BYE Re-invite Command sequence (Cseq) An integer: request order within a session (Call-ID) Method name: to distinguish OK response from CANCEL and INVITE Request/response matching New Cseq only generated by UA for 2 methods INVITE BYE Cseq generated independently between sender receiver CANCEL s Cseq = INVITE s Cseq cancelled 37

Responses for INVITEs and CANCELs Differ Thanks to Cseq (1)INVITE Cseq: 1 INVITE (2) CANCEL Cseq: 1 CANCEL (3)200 OK Cseq: 1 CANCEL (4)487 Transaction cancelled Cseq: 1 INVITE (5) ACK Cseq: 1 ACK The response OK is either for INVITE CANCEL Method name of the Cseq enables to make the distinction 38

Via Header Laura SIP Proxy Bob (1) INVITE SIP:Bob@comp.com SIP/2.0 Via:SIP/2.0/UDP Workst 100.univ.com:5060 (2) INVITE SIP:Bob@131.6.2.9 SIP/2.0 Via:SIP/2.0/UDP 131.6.2.1:5060 Via:SIP/2.0/UDP Workst 100.univ.com:5060 (4) 200 OK Via:SIP/2.0/UDP Workst 100.univ.com:5060 (3) 200 OK Via:SIP/2.0/UDP 131.6.2.1:5060 Via:SIP/2.0/UDP Workst 100.univ.com:5060 (5) ACK SIP:Bob@comp.com SIP/2.0 Via:SIP/2.0/UDP Workst 100.univ.com:5060 Conversation (6) BYE SIP:Bob@comp.com SIP/2.0 Via:SIP/2.0/UDP Workst 100.univ.com:5060 (7) OK SIP:Bob@comp.com SIP/2.0 Via:SIP/2.0/UDP Workst 100.univ.com:5060 Workst 100.univ.com 131.6.2.1 131.6.2.9 Via headers store all proxies that handle the request They contain the signaling path Used to detect loop Also used to route the response (opposite of request route) 39

Record-Route and Route Headers (1) Laura (1)INVITE SIP:Bob@comp.com SIP/2 SIP proxy 131.6.1.99 Bob 131.6.1.2 (4) 200 OK Contact:<SIP:Bob@131.6.1.2> Record-Route:<SIP:proxy@comp.com; maddr=131.6.1.99 (5) ACK SIP:Bob@comp.com SIP/2 Route:<SIP:Bob@131.6.1.2> (7) BYE SIP:Bob@comp.com SIP/2.0 Route:<SIP:Bob@131.6.1.2> (2)INVITE SIP:Bob@131.6.1.2 SIP/2 Record-Route:<SIP:proxy@comp.com; maddr=131.6.1.99 Conversation (3) 200 OK Contact:<SIP:bob@131.6.1.2> Record-Route:<SIP:proxy@comp.com; maddr=131.6.1.99 (6) ACK SIP:Bob@131.6.1.2 SIP/2 (8) BYE SIP:Bob@comp.com SIP/2.0 Headers used by proxies Opposite of Contact header (aimed to short-circuit proxies) Proxies stay in signaling path Security: filtering incoming messages Service provision: sessionrelated service needs (e.g., duration) (10) 200 OK (9) 200 OK 40

Record-Route and Route Headers (2) Laura P1 P2 P3 Bob (1)INVITE (2)INVITE Record-Route:P1 (3)INVITE Record-Route:P1 (4)INVITE Record-Route:P3 Record-Route:P1 (8)200 OK Contact:Bob Record-Route:P3 Record-Route:P1 (7)200 OK Contact:Bob Record-Route:P3 Record-Route:P1 (6)200 OK Contact:Bob Record-Route:P3 Record-Route:P1 (5)200 OK Contact:Bob Record-Route:P3 Record-Route:P1 (9) ACK Route:P3 Route:Bob (10) ACK Route:Bob (11) ACK Conversation (12) BYE Route:P3 Route:Bob (17) 200 OK (13) BYE Route:Bob (16) 200 OK (14) BYE (15) 200 OK 41