Goal We want to know SIP Architecture SIP Messages Syntax Basic Call Example Session Description Protocol (SDP) SIP Extensions Interworking with PSTN

Similar documents
目 录(目录名)

RAQMON Context Setting MG PDA Applications RTP / FTP/ HTTP TCP/UDP S ignaling control plane (e.g. RS VP, NS IS) Streaming Media, Transaction, Bulk dat

SIP/ENUM Trial

ebook140-8

IP505SM_manual_cn.doc

穨control.PDF

PL600 IPPBX 用户手册_V2.0_.doc


財金資訊-80期.indd

一.NETGEAR VPN防火墙产品介绍

ebook140-9

untitled

TCP/IP TCP/IP OSI IP TCP IP IP TCP/IP TCP/IP

Important Notice SUNPLUS TECHNOLOGY CO. reserves the right to change this documentation without prior notice. Information provided by SUNPLUS TECHNOLO

Microsoft Word - template.doc

Microsoft PowerPoint - ch6 [相容模式]

IC-900W Wireless Pan & Tilt Wireless Pan & Tilt Remote Control / Night Vision FCC ID:RUJ-LR802UWG

Microsoft PowerPoint ARIS_Platform_en.ppt

工程师培训

Logitech Wireless Combo MK45 English

( Version 0.4 ) 1


IP TCP/IP PC OS µclinux MPEG4 Blackfin DSP MPEG4 IP UDP Winsock I/O DirectShow Filter DirectShow MPEG4 µclinux TCP/IP IP COM, DirectShow I

2 response personnel to speed up the rescue operations after various natural or man-made disasters. Keywords: SMS, Database, Disaster

...1 What?...2 Why?...3 How? ( ) IEEE / 23

Chn 116 Neh.d.01.nis

ch_code_infoaccess

目 彔 1. 准 备 工 作 登 彔 设 置 功 能 说 明 实 时 监 控 基 本 控 制 功 能 设 置 画 质 调 节 彔 像 与 抓 拍

PS PS GMM SM.zte.com.

Microsoft PowerPoint - ATF2015.ppt [相容模式]

Symantec™ Sygate Enterprise Protection 防护代理安装使用指南

實現架構在SIP的V2oIP與即時影音錄放

入學考試網上報名指南

Preface This guide is intended to standardize the use of the WeChat brand and ensure the brand's integrity and consistency. The guide applies to all d

「人名權威檔」資料庫欄位建置表

1. 請 先 檢 查 包 裝 內 容 物 AC750 多 模 式 無 線 分 享 器 安 裝 指 南 安 裝 指 南 CD 光 碟 BR-6208AC 電 源 供 應 器 網 路 線 2. 將 設 備 接 上 電 源, 即 可 使 用 智 慧 型 無 線 裝 置 進 行 設 定 A. 接 上 電 源

untitled


Microsoft PowerPoint - STU_EC_Ch08.ppt

A API Application Programming Interface 见 应 用 程 序 编 程 接 口 ARP Address Resolution Protocol 地 址 解 析 协 议 为 IP 地 址 到 对 应 的 硬 件 地 址 之 间 提 供 动 态 映 射 阿 里 云 内

untitled

IPv6 Ready Logo Phase II SIP符合性測試平台建置技術報告

LH_Series_Rev2014.pdf

OpenScape OpenScape OpenScape OpenScape OpenScape UC OpenScape SP OpenScape CEBP BPI OpenScape OpenScape TDM ICT OpenScape IP PBX E/A Cockpit CTI Xpre

2015年4月11日雅思阅读预测机经(新东方版)

第 1 章 概 述 1.1 计 算 机 网 络 在 信 息 时 代 中 的 作 用 1.2 计 算 机 网 络 的 发 展 过 程 *1.2.1 分 组 交 换 的 产 生 *1.2.2 因 特 网 时 代 *1.2.3 关 于 因 特 网 的 标 准 化 工 作 计 算 机 网 络 在

C3_ppt.PDF

OSI OSI 15% 20% OSI OSI ISO International Standard Organization 1984 OSI Open-data System Interface Reference Model OSI OSI OSI OSI ISO Prototype Prot

Bus Hound 5

BC04 Module_antenna__ doc

Microsoft PowerPoint - Performance Analysis of Video Streaming over LTE using.pptx

Microsoft PowerPoint - 数据通信-ch1.ppt

WebSphere Studio Application Developer IBM Portal Toolkit... 2/21 1. WebSphere Portal Portal WebSphere Application Server stopserver.bat -configfile..

PowerPoint Presentation

Microsoft Word - CX VMCO 3 easy step v1.doc

Microsoft PowerPoint - Aqua-Sim.pptx

Microsoft Word - ChineseSATII .doc

iGENUS爱琴思邮件系统技术白皮书

東莞工商總會劉百樂中學

coverage2.ppt

國 立 政 治 大 學 教 育 學 系 2016 新 生 入 學 手 冊 目 錄 表 11 國 立 政 治 大 學 教 育 學 系 博 士 班 資 格 考 試 抵 免 申 請 表 論 文 題 目 申 報 暨 指 導 教 授 表 12 國 立 政 治 大 學 碩 博 士 班 論

豐佳燕.PDF

软件测试(TA07)第一学期考试


EC51/52 GSM /GPRS MODEN

AL-M200 Series

untitled

1 目 錄 1. 簡 介 一 般 甄 試 程 序 第 一 階 段 的 準 備 第 二 階 段 的 準 備 每 間 學 校 的 面 試 方 式 各 程 序 我 的 做 法 心 得 及 筆 記 結 論..

2008 Nankai Business Review 61

VoIP Make a Rtp Call VoIP Abstract... 2 VoIP RTP...3 Socket IP...9 Config Two Voice-hub

TX-NR3030_BAS_Cs_ indd

WTO

Product Type Batteries (only) Circuit Breatkers & Load Protection Connection Devices Contactors Ethernet Switches, Stratix Switches I/O Modules; PLC N

Microsoft Word - (web)_F.1_Notes_&_Application_Form(Chi)(non-SPCCPS)_16-17.doc

Microsoft Word - Final Exam Review Packet.docx

weblogic

untitled

USPTO Academic research Corporate needs Global/International Inventors Libraries News Media/Publication Patent Attorney or Agent USPTO e (ebusiness Ce

9 Internet 10 Internet

K301Q-D VRT中英文说明书141009

2. 佔 中 對 香 港 帶 來 以 下 影 響 : 正 面 影 響 - 喚 起 市 民 對 人 權 及 ( 專 制 ) 管 治 的 關 注 和 討 論 o 香 港 市 民 總 不 能 一 味 認 命, 接 受 以 後 受 制 於 中 央, 沒 有 機 會 選 出 心 中 的 理 想 特 首 o 一

NSC-161

Product Type Batteries (only) Circuit Breakers & Load Protection Connection Devices Contactors Ethernet Switches, Stratix Switches I/O Modules; PLC Ne

IP Audio Conference Phone 2033 User Guide

背 景 资 料 对 于 在 华 经 营 的 企 业 里, 人 力 资 源 管 理 绝 不 是 一 件 轻 松 的 工 作 HR 从 业 者 除 了 要 具 备 猎 人 的 眼 光 心 理 学 家 的 耐 心 谈 判 专 家 的 口 才, 更 为 重 要 的 是, 还 需 要 具 备 专 业 的 法

计算机网络概论

Transcription:

Session Initiation Protocol (SIP) SIP, entity, interoperation

Goal We want to know SIP Architecture SIP Messages Syntax Basic Call Example Session Description Protocol (SDP) SIP Extensions Interworking with PSTN and H323 2 Question: 1 SIP message redundancy, response request header, We need get To: and From: once It is not necessary to send it many times Why? 2 If SIP agent finds the copied data is not consistent as the original one (ex: To, is it necessary to reply an error? 3 To: tag, From: tag, Call ID form a dialog ID Why not to use a unique value for dialog ID

SIP Architecture Introduction to SIP SIP Network Entities Simple Example

Introduction A powerful alternative to H323 More flexible, simpler Easier to implement Advanced features Better suited to the support of intelligent user devices A part of IETF multimedia data and control architecture SDP (Session Description Protocol), RTSP (Real-Time Streaming Protocol), SAP (Session Announcement Protocol) 4 SIP call setup, protocols, SDP (Session Description Protocol) session media codec RTSP (Real-Time Streaming Protocol) application-layer proposed standard, RFC 2205, multimedia streaming framework, TCP, UDP transport, RTP streaming data control signals SAP (Session Announcement Protocol) RFC 2974, multicast session directory announcement protocol multimedia conference, directory session setup (ex: pre-arranged conference) directory distributed, announcement,

The Popularity of SIP Originally Developed in the MMUSIC (Multiparty Multimedia Session Control) A separate SIP working group RFC 2543 The latest version: RFC 3261 SIP + MGCP/MEGACO The VoIP signaling in the future bake-off or SIPit (SIP Interoperability Tests) Various vendors come together and test their products against each other To ensure that they have implemented the specification correctly To ensure compatibility with other implementations 5 SIP IETF 1993 3, Internet conferencing, telephony,,, Application protocol IETF (Internet Engineering Task Force) MMUSIC (Multiparty Multimedia Session Control) Working group SIP, SIP, SIP working group SIP 1999 RFC 2543 RFC 3261 (2002 May), proposed standard H323 SIP Text-based encoding HTTP request-response transcation model implement MGCP/MEGACO SIP, VoIP signaling protocol 3GPP SIP All IP Network, SIP SIPit (SIP Interoperability Tests) 7 bake-off ( ) Fig 5-1,, SIP SIPit-14 Feb 2004

SIP Basic (1/2) SIP is a peer-to-peer protocol End-devices initiate sessions SIP is an application layer signaling protocol Create, modify and terminate sessions Applications can be voice, video, gaming, instant messaging, presence, call control, etc SIP uses existing IETF protocols to provide: Message formatting (HTTP 11) Name resolution and mobility (DHCP and DNS) Media (RTP) Media negotiation (Session Description Protocol SDP) Application encoding (MIME) 6 : SIP service, SIP primitives ( ), service

SIP Basic (2/2) SIP is ASCII text-based Eases implementation and debugging Uses URI style addresses and syntax Flexible transport can use UDP, TCP, TLS, or SCTP Uses SDP for describing media sessions Audio, video, realtime text Simple extensible protocol Methods Define transaction Headers Describe transaction Body SDP and other MIME content 7

SIP Architecture A signaling protocol The setup, modification, and tear-down of multimedia sessions SIP + SDP Describe the session characteristics Separate signaling and (RTP) media streams SIP Signaling IP Network RTP Media Stream SIP User SIP User 8 SIP (signaling protocol) sessions SIP contents SDP session SDP codec SIP signaling media RTP signaling media H323 media signaling SIP user PC+ handset SIP phone

SIP Network Entities Client-Server Model Clients User agent clients (UAC) Application programs sending SIP requests Servers Responds to clients requests Four types of servers 9 SIP client-server, SIP client, server, client/server proxy : SIP (client) User Agent Client (UAC) SIP request SIP Client SIP Phone SIP Server Client request response Servers, Server agent server (UAS), UAC User Agent = UAC + UAS User agent client server

Types of Servers (1/3) Proxy servers Handle requests or forward requests to other servers Can be used for call forwarding, time-of-day routing, or follow-me services 1Request Collins@workcom 2Request Collins@homenet Caller@workcom 4Response SIP Proxy 3Response Collins@homenet 10 Server : Proxy server optional SIP component Proxy server web service proxy (routing) request response Proxy client server, Proxy server initiate SIP messages Proxy sever time-of-day routing, follow-me service Collins ( : ) 2 SIP devices ( ) SIP phone Collins Collins@workcom, workcom domain name SIP devices Collins@homenet Collins Caller ( Caller@workcom ) Collins Caller Invite proxy, proxy Collins, request Collins, response proxy caller Note: trunk proxy Proxy Caller ISP, ISP proxy

Types of Servers (2/3) Redirect servers Map the destination address to zero or more new addresses 1Request Collins@workcom 2Moved temporarily Contact: Collins@homenet Caller@workcom 3ACK Redirect Server 4Request Collins@homenet 5Response Collins@homenet 11 Redirect server optional SIP component Redirect server, 1 redirect server 302 response UAC callee Caller Collins, Collins Caller redirect server, Collins Collins@workcom Redirect server, Collins SIP phone Collins@homenet, Caller Acknowledge Caller Invite request Collins, Collins response Note: redirect server call-forwarding, follow-me service Redirect server proxy redirect server request, UA trunk redirect server

Types of Servers (3/3) A user agent server (UAS) Accepts SIP requests and contacts the user The user responds an SIP response Usually, a SIP device = UAC+UAS A registrar Accepts SIP REGISTER requests Indicating that the user is at a particular address Personal mobility Typically combined with a proxy or redirect server 12 Server agent server (UAS), UAC request, UAC UAS UCS SIP Phone User agent, SIP peer-to-peer Registrar optional SIP component SIP,, Registrar Collins, PC registrar, SIP REGISTER request registrar user mobility Registrar request, UA registrar proxy, redirect server UAS UAC user agent proxy server

SIP Call Establishment It is simple, which contains a number of interim responses SIP device A SIP device B a b c d e INVITE Ringing OK ACK Conversation f g BYE OK 13 SIP INVITE, OK, ACK 3- way handshake Ringing response (provisional response) provisional response, caller B SIP device (INVITE), provisonal, INVITE, B 200 OK OK response (final response) A ACK request callee B final response caller Step e, ( A ), BYE B B, OK

Call Completion to Busy Subscriber Service SIP device A SIP device B a b c d e f g h INVITE Busy (Try at 4pm) ACK INVITE Ringing OK ACK Conversation i j BYE OK 14 SIP, Call Completion to Busy Subscriber Service A B Steps a,b,c: A B, device B Busy, A, 4pm Device A 4:00 pm A, B Steps d,e: Device A device B, Steps f, g: B, OK, Device A ACK Step h: Steps i, j :, ( A ), BYE B B, OK

SIP Advantages Attempt to keep the signaling as simple as possible Offer a great deal of flexibility Does not care what type of media is to be exchanged during a session or the type of transport to be used for the media Various pieces of information can be included within the messages Including non-standard information Enable the users to make intelligent decisions The control of the intelligent features is placed in the hands of the customer, not the network operator Eg, SUBJECT header 15, SIP,, :, SIP TCP, TLS, UDP transport layer, SIP application layer service, transport layer SIP optional,, ( ) SIP media format, media, SIP SIP INVITE SUBJECT Callee, SIP,,

Overview of SIP Messaging Syntax SIP Message Syntax SIP Request Messages Simple Example

SIP Messaging Syntax (1/2) Text-based Similar to HTTP (Hypertext Transfer Protocol) Disadvantage more bandwidth consumption SIP messages message = start-line *message-header CRLF [message-body] start-line = request-line status-line Request-line specifies the type of request Response line (status-line) indicates the success or failure of a given request 17 SIP message (text-based) HTTP binary-based SIP parsing 寛 SIP message start-line SIP Request SIP Response, SIP : request response start-line=request-line request startline=status-line response Ex: request-line = INVITE message header, header CRLF message-body * message-header [] message-body CRLF (carriage-return line-feed sequence)

SIP Messaging Syntax (2/2) Message headers Additional information of the request or response Eg, From: /To: headers for the originator and recipient Retry-after header Subject header Message body Describe the type of session The most common structure for the message body is SDP (Session Description Protocol) Could include an ISDN User Part message Examined only at the two ends 18 Message header request/response Ex: Retry-after header Subject Header entities lookup Message body session, media SIP, message body, SDP Ex: SDP G711 A-law Ex: SIP PSTN SS7, capability ISUP (ISDN User Part), SDP MIME content Ex: INVITE response HTML document, image message-body endpoints

SIP Requests Method SP Request-URI SP SIP-version CRLF Ex: INVITE sip:yoyo@s1yycom SIP/20 Request-URI The address of the destination Methods RFC 2543: INVITE, ACK, OPTIONS, BYE, CANCLE, REGISTER RFC 3261: SUPPORT, RFC 2976: INFO, RFC 3262: PRACK, RFC 3265: SUSCRIBE & NOTIFY, RFC 3311: UPDATE, RFC 3428: MESSAGE, RFC 3515:REFER 19 Request SIP, Method( SP)Request- URI( SP)SIP-version( CRLF) Method sender session (ex: INVITE: ) Request-URI Request, SIP SIP-version 20 RFC 3261 6 methods: INVITE, ACK, OPTIONS, BYE, CANCLE, REGISTER, RFC 2976 INFO, RFC 3311 UPDATE, RFC 3315 REFER INFO, application-layer information UPDATE SDP session media REFER PRACK provisional acknowledgement, receiver provisional response, SUBSCRIBE/NOTIFY event (ex: presence, monitoring of calls), - MESSAGE page mode instant messaging service

SIP Methods (1/2) INVITE Initiate a session Information of the calling and called parties The type of media Similar to IAM (initial address message) of ISUP ACK Only when receiving the final response BYE Terminate a session Can be issued by either the calling or called party 20 INVITE session, session conference call INVITE SIP,, media ISUP IAM (Initial address message) ACK INVITE, response (ex: 200 OK, 1xx response) INVITE, (altering), caller altering,, ACK, INVITE, (busy), caller ACK method ACK BYE session,, BYE

SIP Methods (2/2) OPTIONS Query a server as to its capabilities CANCEL A particular type of media Terminate a pending request Eg, an INVITE did not receive a final response REGISTER Log in and register the address with a SIP server all SIP servers multicast address (22401175) Can register with multiple servers Can have several registrations with one server 21 OPTIONS ( ) called party capabilities, media type (ex: response method, content types, extensions, codec) CANCEL session, INVITE, response, caller parallel search ( ) final response, caller CANCEL REGISTER user-agent client SIP server, (registrar) address User-agent local SIP server, 22401175 multicast address SIP severs One number service SIP server

One number Service User at Address 2 User at Address 1 Registrar/Proxy Caller Register (address 1) Register (address 2) OK OK OK INVITE INVITE CANCEL OK (for CANCEL) ACK Conversation INVITE Trying OK (for INVITE) ACK 22 One number service follow me service message flow (Address1/address2) proxy forking proxy INVITE, 200 OK, proxy CANCEL sip:collins@workcom address, Collins, workcom domain name, registrar, collins, Question: Collins,, Collins ( or ) cancel

SIP Responses SIP-Version SP Status-Code SP Reason- Phrase CRLF Request: INVITE sip:yoyo@s1yycom SIP/20 Response: SIP/20 200 ok Status-Code A three-digit number Reason-Phrase A textual description of the outcome Could be presented to the user 23 Response SIP, SIP-version( )Status- Code( )Reason-Phrase( CRLF) Status Code response (Ex: INVITE sip:yoyo@s1yycom SIP/20),, (ex: 200: ), sender Reason Phrase status code (ex: OK), SIP SIP-version 20

Status Code Provisional response 1XX Informational (ex: 181 Ringing) Final response 2XX Success (ex: 200 OK) 3XX Redirection (ex: 302 Moved temporarily) 4XX Client Error (ex: 401 Unauthorized) 5XX Server Error (ex: 505 SIP version not supported) 6XX Global Failure (ex: 604 Does not exist anywhere) All responses, except for 1XX, are considered final and Should be ACKed 24 Status code 6, : 1XX (Provisional information),, request, Ex: 181 Ringing 2XX (Success) request,, SIP 200 OK Ex: INVITE, 200 OK REFER method, 202 accepted 3XX (Redirection) request agent Ex: 302, sender response address 4XX (Client Error): request syntax, request server Ex: 401 Unauthorized sender, 5XX (Server Error): request, server Ex: 505 SIP version not supported SIP 6XX (Global Failure): request, server Ex: 604 Does not exist anywhere 2XX - 6XX, response sender, 1XX response, ACK

SIP Addressing SIP URIs (Uniform Resource Identifier) user@host Also called as URLs (Uniform Resource Locators) Two types of SIP URIs: Address of Record (AOR) (identifies a user) sip:collins@workcom Contact (identifies a device and is usually a Fully Qualified Domain Name, FQDN) sip:line2@12724454 or sip:collins@station1workcom Other example: sip:3344556789@telcomnet sip:3344556789@telcomnet;user=phone sips:bob@biloxicom 25 Uniform Resource Indicators (URIs) Uniform Resource Locators (URLs) URI SIP, SIP (host) (user), URI user@host email address, email address email mailto:collins@homenet, SIP sip:collins@homenet (ie, ),, SIP URIs : Address of Record (AOR) Ex: sip:collins@workcom, workcom domain name, DNS domain Contact Fully Qualified Domain Name (FQDN) Ex: sip:collins@station1workcom station1 : PSTN,, SIP address, sip:3344556789@telcomnet, gateway telcomnet SIP URI,, sip:3344556789@telcomnet;user=phone, user=phone user=3344556789 PSTN, user name URI : sip:alice@examplecom SIP URI,, RFC 2543 sips:bob@biloxicom is a Secure SIP URI SIP URI, RFC 3261, security, TLS (transport layer security) over TCP Registrar, Proxy, Redirect TLS Note: hop-by-hop security, IPSec Tel:54065;phone-context=dialplanbiloxicomtel SIP URI, telephone numbers Tel:+18005551212;phone-context=e164arpa e164 ENUM

Message Headers Provide further information about the message Ex: Subject: vacation Ex: Content-Type:application/sdp Table 5-2, Table 5-3 Four main categories General, Request, Response, and Entity headers 26 start-line, SIP message headers, header (CRLF) Q931 information element message header Ex: INVITE Subject vacation, Content-Type message body SDP, : message header: general, request, response, entity header Table 5-2 request header, ie, request header Table 5-3 response header

General Headers Used in both requests and responses To, From, CSeq, Call-ID, and Via are mandatory for all SIP messages Basic information To: header in a REGISTER indicates the addressof-record of the user Ex: To: Collins@workcom To: header in an INVITE indicates the called party Ex: To: Boss<sip:Manager@workcom> Ex: To: Boss<sip:Manager@station2workcom> From: header indicates the originator Ex: From: Daniel<sip:Collins@workcom>;tag=4455 27 (general header) request/response, To, From, CSeq, Call-ID, and Via SIP mandatory Max-Forwards SIP request mandatory To (callee URI) From (Caller URI) Call-ID ( session ) Contact ( SIP URI) Ex: REGISTER To:header Registrar user (address of record) Ex: INVITE To:header Ex: SIP From:header

To: Header The To header field first and foremost specifies The desired "logical" recipient of the request The address-of-record of the user or resource that is the target of this request The original recipient may or may not be the UAS processing the request, due to call forwarding or other proxy operations Request-URI identifies the UAS that is to process the request 28 To: header (From: ) (1) request logical & original, (2) request address-of-record resource Request URI request UA To: header request call forwarding, proxy Ex: To: Boss<sip:Manager@workcom> Boss addressof-record URI, proxy Manager@station2workcom request UAS, To: header URI, request ( software, ) SIP, UAS To: URI, request UAS 403 (Forbidden) request

Request-URI Request-URI identifies the UAS that is to process the request The initial Request-URI of the message SHOULD be set to the same value of the URI in the To field One notable exception is the REGISTER A UA uses the REGISTER method to bind its address-of-record to a specific contact address 29 To: header Request-URI : Request-URI request UA Request-URI SIP URI SIPS URI a general URI (RFC 2396) "tel" URI (RFC 2806) request UAS Request-URI, UAS 416 (Unsupported URI Scheme) request Request-URI request UAS, proxy 404 (Not Found) request UA REGISTER address-of-record contact (bind) UA SIP Request-URI (SHOULD) To: header URI (Request-URI ) REGISTER, Request-URI registrar, To: user address of record To: From: caller callee, specification proxy,

Contact: Header Provides a URI for use in future communication regarding a particular session Ex1: In a SIP INVITE, the Contact header might be different from the From header An third-party administrator initiates a multiparty session Ex 2: Used in response, it is useful for directing further requests directly to the called user Ex 3: It is used to indicate a more appropriate address if an INVITE issued to a given URI failed to reach the user 30 Contact INVITE transaction Contact header, : INVITE Contact: header, From: header, From: Address of record, ; session, session, Contact SIP URI multiparty session,, conference call request, proxy,, response request, proxy, response Contact: header,, request ( ACK) callee Contact: header INVITE INVITE URI ( ), receiver 302 moved temporarily Contact:, SIP URI Contact From

Request / Response Headers Request Headers Apply only to SIP requests Addition information about the request or the client Ex: Subject: vacation Ex: Priority: (emergency, urgent, normal, or nonurgent) Response Headers Further information about the response that cannot be included in the status line Ex: Unsupported Ex: Retry-After 31 Request Header header SIP request, Subject: header session Priority: header request session emergency, urgent, normal, non-urgent Response Header header SIP response, status code, Unsupported: header server Retry-After: header,

Entity Headers Indicate the type and format of information included in the message body Content-Length: the length of the message body Content-Type: media type of the message body Ex: Content-Type:application/sdp Content-Encoding: for message compression Content Disposition: how a message part should be interpreted session, icon, alert, render 32 Entity Header header SIP message body, Context-Length: header message body ( byte) Context-Type: header message body, SDP Context-Encoding: header message body Context-Disposition: header message body, session, message body session, session icon, message body sender, render, message body sender alert, message body ring tone ( audio clip ),

Examples Registration Invitation Termination of a Call

Registration Collins@station1workcom Registrar a b REGISTER sip:registrarworkcom SIP/20 Via: SIP/20/UDP station1workcom; branch=z9hg4bk123 Max-Forwards: 70 From: sip:collins@workcom; tag = 123456 To: sip:collins@workcom Call-ID: 123456@station1workcom CSeq: 1 REGISTER Contact: sip:collins@station1workcom Expires: 7200 Content-Length: 0 SIP/20 200 OK Via: SIP/20/UDP station1workcom; branch=z9hg4bk123 From: sip:collins@workcom; tag = 123456 To: sip:collins@workcom Call-ID: 123456@station1workcom CSeq: 1 REGISTER Contact: sip:collins@station1workcom Expires: 3600 Content-Length: 0 34 Registration server, Daniel Collins log in station1workcom, Collins Registrar Request-URI, proxy, Request-URI callee To: header, Registration registrar address of record INVITE, To: header caller callee proxy To: header REGISTER header: Via: header request, Via : UDP SIP UDP TCP, SCTP, TLS Via response,, port number proxy, response via, originator Via branch parameter, proxy From: header ( manager, ) From tag parameter, sender, sender ID To: header Registrar, Collins (Address of record) Note: request To: tag, dialog, response To: receiver tag, receiver ID Dialog two user agents peer-to-peer dialog Call-ID sender, SIP (ex: 123456@station1workcom), user, Registrar, Call-ID, local-id@host random number, URI CSeq (Command Sequence) transaction ( ) order ( ) 32-bit unsigned transaction request method Transaction Request 1xx response, dialog, transaction request / final response CSeq transaction (for new request) CSeq 1 request/response ACK Cancel, request CSeq ACK/Cancel transaction CSeq 31 bits of 32-bits clock, overflow (warp around) Contact Call-ID, Contact, Expires 32-bit unsigned 7200 ( sec) Collins 2 hours Registrar (3600 sec), 136 request Expire, Registrar status code 423 Interval too brief, client registration interval Content-Length payload SIP message SDP content 0 Collins,, Collins (, record)

Invitation A two-party call Subject: optional Content-Type: application/sdp Transaction: Command Sequence A dialog ID To identify a peer-to-peer relationship between two user agents Tag in From Tag in To Call-ID Daniel<sip:Collins@workcom> a Boss<sip:Manager@station2workcom> INVITE sip:manager@station2workcom SIP/20 Via: SIP/20/UDP station1workcom; branch=z9hg4bk123 Max-Forwards: 70 From: Daniel<sip:Collins@workcom>; tag=44551 Contact: sip:collins@station1workcom To: Boss<sip:Manager@station2workcom> Call-ID: 123456@station1workcom CSeq: 1 INVITE Subject: Vacation Content-Length: xxx Content-Type: application/sdp Content-Disposition: session (message body) b SIP/20 180 Ringing Via:SIP/20/UDP station1workcom;branch=z9hg4bk123 From: Daniel<sip:Collins@workcom>; tag=44551 To: Boss<sip:Manager@station2workcom>; tag=11222 Contact: sip:manager@station2workcom Call-ID: 123456@station1workcom CSeq: 1 INVITE Content-Length: 0 c SIP/20 200 OK Via: SIP/20/UDP station1workcom; branch=z9hg4bk123 From: Daniel<sip:Collins@workcom>; tag=44551 To: Boss<sip:Manager@station2workcom>; tag=11222 Contact: sip:manager@station2workcom Call-ID: 123456@station1workcom CSeq: 1 INVITE Subject: Vacation Content-Length: xxx Content-Type: application/sdp Content-Disposition: session (message body) d ACK sip:manager@station2workcom SIP/20 Via:SIP/20/UDP station1workcom;branch= z9hg4bk123 Max-Forwards: 70 From: Daniel<sip:Collins@workcom>; tag=44551 To: Boss<sip:Manager@station2workcom>; tag=11222 Call-ID: 123456@station1workcom CSeq: 1 ACK Content-Length: 0 Conversation Collins ( Daniel) two-party, Manager (Boss) LAN INVITE sip:manager@station2workcom SIP/20, proxy, INVITE station2workcom, To: header URI caller callee Max-Forwards: 70 ( ) 70 proxy proxy 1 From: header URI, display name, Daniel, Boss, URI Subject: Contact: Daniel Collins@stations1workcom Context-Type: message body SDP Context-Disposition message body session Context-length message body message body caller media SIP/20 180 Ringing, response request, Content-length=0 message body, Context-type: header To: header callee tag ( address tag), From tag, To tag, Call-ID dialog ID, peer-to-peer dialog ( ) From, To tag, dialog Note: session, 180 ring dialog dialog early 200 OK, dialog confirmed Boss, Invite, SIP/20 200 OK response request, message body called media INVITE transaction ( ) ACK, response CSeq: header 1 ACK, request

Termination of a Call Daniel<sip:Collins@workcom> Boss<sip:Manager@station2workcom> a b BYE sip:manager@workcom SIP/20 Via: SIP/20/UDP station1workcom; branch=z9hg4bk123 Max-Forwards: 70 From: Daniel<sip:Collins@workcom>; tag=44551 To: Boss<sip:Manager@station2workcom>; tag=11222 Call-ID: 123456@station1workcom CSeq: 2 BYE Content-Length: 0 SIP/20 200 OK Via: SIP/20/UDP station1workcom; branch=z9hg4bk123 From: Daniel<sip:Collins@workcom>; tag=44551 To: Boss<sip:Manager@station2workcom>; tag=11222 Call-ID: 123456@station1workcom CSeq: 2 BYE Content-Length: 0 36 BYE request session media BYE header INVITE, CSeq BYE request 200 OK

Redirect and Proxy Servers Redirect Servers Proxy Servers proxy

Redirect Servers An alternative address 302 Moved temporarily Another INVITE Same Call-ID CSeq ++ Daniel<sip:Collins@workcom> a b c INVITE sip:manager@workcom SIP/20 Via: SIP/20/UDP station1workcom; branch=z9hg4bk123 Max-Forwards: 70 From: Daniel<sip:Collins@workcom>; tag=44551 Contact: sip:collins@station1workcom To: Boss<sip:Manager@workcom> Call-ID: 123456@station1workcom CSeq: 1 INVITE Subject: Vacation Content-Length: xxx Content-Type: application/sdp Content-Disposition: session (message body) SIP/20 302 Moved Temporarily Via:SIP/20/UDP station1workcom;branch=z9hg4bk123 From: Daniel<sip:Collins@workcom>; tag=44551 To: Boss<sip:Manager@workcom>; tag=11222 Call-ID: 123456@station1workcom CSeq: 1 INVITE Contact: sip:manager@pc1homenet ACK sip:manager@workcom SIP/20 Via: SIP/20/UDP station1workcom; branch=z9hg4bk123 Max-Forwards: 70 From: Daniel<sip:Collins@workcom>; tag=44551 To: Boss<sip:Manager@workcom> Call-ID: 123456@station1workcom CSeq: 1 ACK Redirect Server Boss<sip:Manager@pc1homenet> d INVITE sip:manager@pc1homenet SIP/20 Via: SIP/20/UDP station1workcom; branch=z9hg4bk124 Max-Forwards: 70 From: Daniel<sip:Collins@workcom>; tag=44551 Contact: sip:collins@station1workcom To: Boss<sip:Manager@workcom> Call-ID: 123456@station1workcom CSeq: 2 INVITE Subject: Vacation Content-Length: xxx Content-Type: application/sdp Content-Disposition: session (message body) Redirect server, 1 UAC callee redirect server 302 response UAC callee redirect server URI, 4xx, 5xx, 6xx Error redirect server CANCEL, 200 OK Daniel two-party, Boss Boss, Manager@pc1homenet, Daniel INVITE redirect server INVITE sip:manager@workcom SIP/20 Fig 5-9 INVITE, Request-URI To: header Boss, Address of record redirect server 302 response, Contact: header UAC callee Step c Daniel ACK, transaction Step c Daniel INVITE manager@pc1homenet, CSeq 1, Call-ID ( )

Proxy Servers Sits between a user-agent client and the farend user-agent server Numerous proxies can reside in a chain between the caller and callee The proxy may change the Request-URI caller p1 p2 Via: header INVITE The path taken by a request Loop detected, 482 (status code) For a response ACK The 1 st Via: header, Checked, Removed Branch: used to distinguish between multiple responses to the same request/ to detect loop 482 p3 p4 39 Proxy server web service proxy request response, caller callee, caller proxy, callee proxy proxy callee, Request-URI, ( proxy), INVITE callee caller callee path machines Via ( ) Via transport protocol Via loop request, proxy via, a loop 482 loop detected, proxy 2 loop, via 482 caller ACK (by SIP-URI), proxy state Callee Response, Via, proxy, Via Branch

Forking Proxy Forking Proxy: Issue a single request to multiple destinations A user is registered at several locations fork requests Branch: used to distinguish between multiple responses to the same request Ex: on Via: header ;branch=z9hg4bk123 In order to handle such forking, a proxy must be stateful 40 RFC 2543, SIP request forking proxy multicast ( branch, fork request) response, branch branch optional, transaction branch forking proxy fork request proxy forking proxy, stateful, response branched request, branch number (ex: step c z9hg4bk123 step d z9hg4bk456), RFC 3261, branch ID transaction ID, loop branch z9hg4bk, magic cookie, branch RFC 3261 ( z9hg4bk RFC 2543) client, transaction, branch 2xx response ACK, CANCEL, original request branch ( CSeq )

Proxy State Transaction stateless Proxy server forwards all methods and responses without interaction Transaction stateful Maintains state for the transaction until the final response is received Transaction Control Block (TCB) 41 Proxy : stateless stateful stateless proxy,, loop, stateful proxy,, incoming request, outgoing request proxy loop Proxy server method, Transaction Control Block (TCB), transaction, final response stateful proxy server, CANCEL method acknowledgement (ex: 100 Trying, INVITE, callee, proxy fork INVITE response,, proxy CANCEL transaction)

Record-Route: and Route: Record-Route: Use Contact: the messages may not pass through the same proxy A stateful proxy might require that it remains in the signaling path Insert its address into the Record-Route: header The response includes the Record-Route: header The information contained in the Record-Route: header is used in the subsequent requests related to the same call The Route: header = the Record-Route: header in reverse order 42 stateful proxy, signaling path, request via, ( ) response originator, Contact: header,,, proxy (stateful) proxy,, Record-Route: header Proxy Record-Route:, Record-Route: headers Record-Route: (steps d, e) Response, originator requests Originator Record-Route: list of proxy request (step f) Route: header Route: list proxy ( Request URI) proxy, Route: list, list, Request-URI loose routing (lr) Record-routing: lr loose routing proxy message, Request-URI (RFC 2543) SIP record-route strict routing Route:, Record proxy (ie, proxy ) Request-URI proxy SIP Request-URI

Strict Routing and Loose Routing INVITE: U1->P1->P2->P3->P4->U2 BYE: U2->P4->P3->P2->P1->U1 43 U1 INVITE U2, P3 strict router, proxy loose routing U2 BYE U1, P3, Request-URI P3 URI, U1 URI Route

Through a Proxy (1/2) Boss<sip:Manager@pc1homenet> sip:serverworkcom Daniel<sip:Collins@station1workcom> a b c d e INVITE sip:collins@workcom SIP/20 Via: SIP/20/UDP pc1homenet; branch=z9hg4bk7890 Max-Forwards: 70 From: Boss<sip:Manager@homenet>; tag=ab12 Contact: Boss<sip:manager@pc1homenet> To: Daniel<sip:Collins@workcom> Call-ID: 123456@pc1homenet CSeq: 1 INVITE SIP/20 100 Trying Via: SIP/20/UDP pc1homenet; branch=z9hg4bk7890 From: Boss<sip:Manager@homenet>; tag=ab12 To: Daniel<sip:Collins@workcom> Call-ID: 123456@pc1homenet CSeq: 1 INVITE SIP/20 200 OK INVITE sip:collins@station1workcom SIP/20 Via: SIP/20/UDP serverworkcom; branch=z9hg4bkxyz1 Via: SIP/20/UDP pc1homenet; branch=z9hg4bk7890 Max-Forwards: 69 Record-route: <sip:serverworkcom;lr> From: Boss<sip:Manager@homenet>; tag=ab12 Contact: Boss<sip:manager@pc1workcom> To: Daniel<sip:Collins@workcom> Call-ID: 123456@pc1homenet CSeq: 1 INVITE SIP/20 200 OK Via: SIP/20/UDP serverworkcom; branch=z9hg4bkxyz1 Via: SIP/20/UDP pc1homenet; branch=z9hg4bk7890 Record-route: <sip:serverworkcom;lr> From: Boss<sip:Manager@homenet>; tag=ab12 To: Daniel<sip:Collins@workcom>; tag=xyz45 Call-ID: 123456@pc1homenet CSeq: 1 INVITE Contact: sip:collins@station1workcom 44 Daniel Boss Boss Daniel Proxy INVITE, proxy registrar, Daniel, Request-URI, INVITE Step b, INVITE Collins@station1worcom, Max-Forward:, proxy Via ( proxy/client Via ) proxy registrar, proxy URI location function, proxy INVITE URI, Daniel proxy, path proxy Via request, proxy via, a loop 482 loop detected, proxy via, request,, proxy Step c: proxy 100 Trying response, Step d: Daniel 200 OK message, path via proxy response, via via, via next hop, next hop, Record-route proxy state Note: Subject: message-body

Through a Proxy (2/2) Boss<sip:Manager@pc1homenet> sip:serverworkcom Daniel<sip:Collins@station1workcom> e f g SIP/20 200 OK Via: SIP/20/UDP pc1homenet; branch=z9hg4bk7890 Record-route: <sip:serverworkcom;lr> From: Boss<sip:Manager@homenet>; tag=ab12 To: Daniel<sip:Collins@workcom>; tag=xyz45 Call-ID: 123456@pc1homenet CSeq: 1 INVITE Contact: sip:collins@station1workcom ACK sip:collins@station1workcom SIP/20 Via: SIP/20/UDP pc1homenet; branch=z9hg4bk7891 Max-Forwards: 70 Route: <sip:serverworkcom;lr> From: Boss<sip:Manager@homenet>; tag=ab12 To: Daniel<sip:Collins@workcom>; tag=xyz45 Call-ID: 123456@pc1homenet CSeq: 1 ACK ACK sip:collins@station1workcom SIP/20 Via: SIP/20/UDP serverworkcom; branch=z9hg4bkxyz2 Via: SIP/20/UDP pc1homenet; branch=z9hg4bk7891 Max-Forwards: 69 From: Boss<sip:Manager@homenet>; tag=ab12 To: Daniel<sip:Collins@workcom>; tag=xyz45 Call-ID: 123456@pc1homenet CSeq: 1 ACK 45

Multiple Locations (1/2) Boss<sip:Manager@pc1homenet> sip:serverworkcom pc1 pc2 a b c d INVITE sip:collins@workcom SIP/20 Via: SIP/20/UDP pc1homenet; branch=z9hg4bk789 Max-Forwards: 70 From: Boss<sip:Manager@homenet>; tag=ab12 Contact: Boss<sip:manager@pc1homenet> To: Daniel<sip:Collins@workcom> Call-ID: 123456@pc1homenet CSeq: 1 INVITE SIP/20 100 Trying Via: SIP/20/UDP pc1homenet; branch=z9hg4bk789 From: Boss<sip:Manager@homenet>; tag=ab12 To: Daniel<sip:Collins@workcom> Call-ID: 123456@pc1homenet CSeq: 1 INVITE INVITE sip:collins@pc1workcom SIP/20 Via: SIP/20/UDP serverworkcom; branch=z9hg4bk123 Via: SIP/20/UDP pc1homenet; branch=z9hg4bk789 Max-Forwards: 69 Record-coute: <sip:serverworkcom;lr> From: Boss<sip:Manager@homenet>; tag=ab12 Contact: Boss<sip:manager@pc1workcom> To: Daniel<sip:Collins@workcom> Call-ID: 123456@pc1homenet CSeq: 1 INVITE INVITE sip:collins@pc2workcom SIP/20 Via: SIP/20/UDP serverworkcom; branch=z9hg4bk456 Via: SIP/20/UDP pc1homenet; branch=z9hg4bk789 Max-Forwards: 69 Record-coute: <sip:serverworkcom;lr> From: Boss<sip:Manager@homenet>; tag=ab12 Contact: Boss<sip:manager@pc1workcom> To: Daniel<sip:Collins@workcom> Call-ID: 123456@pc1homenet CSeq: 1 INVITE 46, Boss Daniel Daniel pc1, pc2 server proxy INVITE, step c, d pc1, pc2 branch number (ex: step c z9hg4bk123 step d z9hg4bk456),

Multiple Locations (2/2) Boss<sip:Manager@pc1homenet> sip:serverworkcom pc1 pc2 e f g SIP/20 200 OK Via: SIP/20/UDP pc1homenet; branch=z9hg4bk789 Record-coute: <sip:serverworkcom;lr> From: Boss<sip:Manager@homenet>; tag=ab12 To: Daniel<sip:Collins@workcom>; tag=xyz45 Call-ID: 123456@pc1homenet CSeq: 1 INVITE Contact: sip:collins@pc2workcom SIP/20 200 OK Via: SIP/20/UDP serverworkcom; branch=z9hg4bk456 Via: SIP/20/UDP pc1homenet; branch=z9hg4bk789 Record-coute: <sip:serverworkcom;lr> From: Boss<sip:Manager@homenet>; tag=ab12 To: Daniel<sip:Collins@workcom>; tag=xyz45 Call-ID: 123456@pc1homenet CSeq: 1 INVITE Contact: sip:collins@pc2workcom CANCEL sip:collins@pc1workcom SIP/20 Via: SIP/20/UDP serverworkcom; branch=z9hg4bk456 Max-Forwards: 69 Record-coute: <sip:serverworkcom;lr> From: Boss<sip:Manager@homenet>; tag=ab12 Contact: Boss<sip:manager@pc1workcom> To: Daniel<sip:Collins@workcom> Call-ID: 123456@pc1homenet CSeq: 1 CANCEL 47 Response pc2, proxy Boss pc1, proxy CANCEL pc1 Note: CANCEL hop by hop, proxy, Via: originator pc1 487 request cancelled proxy Note: Subject:

Session Description Protocol (SDP) Introduction to SIP SIP Network Entities Simple Example

The Session Description Protocol The Most Common Message Body Be session information describing the media to be exchanged between the parties SDP, RFC 2327 (initial publication) SDP simply provides a format for describing session information to potential session participants RFC 3264 (An Offer/Answer Model with SDP) SIP uses SDP in an answer/offer mode An agreement between the two parties as to the types of media they are willing to share 49 VoIP SIP message-body SDP SDP session, RFC 2327 SDP session, (ex: SIP) Note: SIP SDP RFC 3264, An Offer/Answer Model with SDP, SIP SDP SDP answer/offer codec SDP codec codec media, offer answer

The Structure of SDP Text-based Protocol The Structure of SDP Session Level Information Name of the session Originator of the session Time that the session is to be active Media Level Information Media type Port number Transport protocol Media format Session Description Session Level Information Protocol Version Originator and Session ID Session Name Session Time Media Description 1 Media Name and Transport Connection Information Media Description 2 Media Name and Transport Connection Information 50 SDP, ISO 10646 character set SDP (session name) ASCII, SDP,, v version offer/answer model SDP, session RFC 2327 SDP multiple session description SDP (Session description) session level information media level information Session level information session, protocol version, session (originator), session ID, session name, session (session time) media-level information session 0 media stream, session stream media description media description media name, media type, media format, transport protocol, port number field offer media description, modified offer media stream media type audio, video port number port transport protocol RTP/AVP AVP: audio/video profile media format G711, G726 RTP payload type

SDP Syntax A number of lines of text In each line field=value Ex: v=0 field=<value of subfield1> <value of subfield2> <value of subfield3> Ex: m=audio 45678 RTP/AVP 0 field is exactly one character (case-significant) Session-level fields Begin with version description field (v=) Media-level fields Begin with media description field (m=) 51 SDP (description field) field=value field, value endpoint,, field ; ; value (subfield), space m media v version Ex: m=audio 45678 RTP/AVP 0 media type, port number, protocol, media format field, subfield, value subfield Subfield Session-level information, v=, session-level fields ; media-level information media-level information media streams media description m=, session-level fields

Mandatory Fields (1/3) v, o, s, t, m are mandatory fields v=(protocol version) (ex: v=0 ) s=(session name) (ex: s= ) A text string for multicast conference t=(time of the session) (ex: t=0 0 ) The start time and stop time for pre-arranged multicast conference 52 v, o, s, t, m session-level information fields: v protocol s session,, multicast conference SIP,, session name space (=0x20), s= dash s=- t pre-arranged multicast conference, session SIP, SIP session, time, time t=0 0

Mandatory Fields (2/3) o=(session origin or creator) Ex: o=collins 123456 001 IN IP4 s1yycom Username (ex: collins): the originator s login id or - Session ID (ex: 123456) Make use of NTP timestamp as a unique ID Version (ex: 001) Network type (ex: IN) IN refers to Internet Address type (ex: IP4) IP4, IP6 address (ex: s1yycom) A fully-qualified domain name or the IP address 53 o session, 6 subfields Username, login ID, login, - Session ID session,, SDP NTP (Network Time Protocol) timestamp unique ID Version session, (ex: media type) session, sender, Session ID subfields Network type IN Internet Address type, IP4 IPv4 addressing, IP6 IPv6 addressing Address media network address, s1yycom )

Mandatory Fields (3/3) m=(media) Ex: m=audio 45678 RTP/AVP 15 3 0 Media type (ex: audio) Audio, video, application, data, control The transport port (ex: 45678) The transport protocol (ex: RTP/AVP) The media format, an RTP payload format (ex: 15 3 0) List the various types of media format that can be supported 54 m (media) media-level information fields: m media, media type, transport port, transport protocol, media format Media type audio ( ), video, application, data, control Transport port media stream port port connection VoIP UDP RTP, port 1024 65535 Transport protocol media RTP/AVP RTP Media format media format, transport protocol RTP, media format RTP payload type G728=15, GSM=3, G711/u-law=0

Optional Fields (1/4) Some optional fields can be applied at both session and media levels The value applied at the media level overrides that at the session level for that media instance c=(connection data) (ex: c=in IP4 s1yycom) The network and address at which media data will be received Network type (ex: IN) Address type (ex: IP4) Connection address (ex: s1yycom) At session or media level 55 Note: session-level media-level information fields, media stream, media description media stream session-level information optional fields: c connection, media Network type IN Internet Address type (ex: IPv4 ) Connection address ( media network address, s1yycom 140138137224 IP address, full qualified domain name, c session-level media-level information

Optional Fields (2/4) a=(attributes) (ex: a=sendonly) Describe additional attributes Property attribute Ex: a=sendonly / a=recvonly Value attribute Used in a shared whiteboard session Ex: a=orient:portrait / a=orient:landscape rtpmap provides additional information for dynamic payload type Ex: m=video 54678 RTP/AVP 98 a=rtpmap:98 L16/16000/2 Dynamic RTP payload type=98 16-bit linear encoded stereo (2 channels) audio sampled at 16kHz 56 a session-level media-level (ex: send only) SDP attributes, session-level medialevel information Attributes : 1 property attribute: Ex: a=sendonly send only SDP sender media stream, media stream RTP, sender RTP, RTCP Ex: a=reconly receive only 2 value attribute: Ex: whiteboard session, attribute portrait ( ) landscape ( ) media stream dynamic RTP payload type,, rtpmap : a=rtpmap:<payload type> <encoding name>/<clock rate> [/<encoding parameters>] encodling name Ex: m=video 54678 RTP/AVP 98 a=rtpmap:98 L16/16000/2 dynamic RTP/AVP payload type=98, 16-bit linear encoded stereo (2 channels) audio sampled at 16kHz

Optional Fields (2/4) i=(session information) A text description At both session and media levels It would be somewhat superfluous, since SIP already supports the Subject header u=(uri of description) Where further session information can be obtained Only at session level e=(e-mail address) Who is responsible for the session Only at the session level 57 optional fields: i session, topic( ), session information session-level media-level information SIP, SIP Subject header, information u URI, Web site, session pre-arranged conference SIP, session-level, session, URI e session email address session-level, email, email

Optional Fields (3/4) p=(phone number) Only at the session level b=(bandwidth information) In kilobits per second At session or media level r=(repeat times) For regularly scheduled session a session is to be repeated How often and how many times 58 optional fields: p session session-level,, b session, kilobits b session-level (for conference) media-level (for media stream) regularly scheduled session, r session SIP, r

Optional Fields (4/4) z=(timezone adjustments) For regularly scheduled session Standard time and daylight savings time k=(encryption key) An encryption key or a mechanism to obtain it for the purposes of encrypting and decrypting the media At session or media level 59 optional fields: regularly scheduled session, z, (daylight savings time), z SIP, z k media stream k session-level media-level information

Ordering of Fields Session Level 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) Media level Media description (m) Media info (i) Connection info (c) Optional if specified at the session level Bandwidth info (b) Encryption key (k) Attributes (a) 60

Usage of SDP with SIP Simple Example Negotiation of Media SIP

Usage of SDP with SIP SIP and SDP make a wonderful partnership for the transmission of session information SIP provides the messaging mechanism for the establishment of multimedia sessions SDP provides a structured language for describing the sessions The entity headers identifies the message body Ex: Content-Type:application/sdp 62 SIP multimedia session SDP session capabilities Question: SIP SDP? Answer: Entity header SIP message body, Context-Length, Context-Type, Context-Encoding, Context-Disposition SIP SDP

Offer/Answer Model Offer a selection of media formats Answer which the receiver is willing to accept Supported media type: returned with a transport port Unsupported media type: also be returned with a port number of zero Sender (1) Offer (2) Answer Receiver 63 SDP offer/answer Sender offer, media format Receiver sender, (accept), (reject) format answer sender SIP offer/answer: offer in INVITE, answer in 2XX ( ) offer in 2XX, answer in ACK INVITE offer

SDP Inclusion in SIP Messages (1/2) Daniel<sip:Collins@station1workcom> Boss<sip:Manager@station2workcom> a INVITE sip:manager@station2workcom SIP/20 From: Daniel<sip:Collins@station1workcom>; tag = abcd1234 To: Boss<sip:Manager@station2workcom> CSeq: 1 INVITE Content-Length: 213 Content-Type: application/sdp Content-Disposition: session b v=0 o=collins 123456 001 IN IP4 station1workcom s= c=in IP4 station1workcom t=0 0 m=audio 4444 RTP/AVP 2 a=rtpmap 2 G726-32/8000 m=audio 4666 RTP/AVP 4 a=rtpmap 4 G723/8000 m=audio 4888 RTP/AVP 15 a=rtpmap 15 G728/8000 SIP/20 200 OK 64, Collins G726, G7232, G728 Boss G728 INVITE message body, media format media format Media information: m=audio (media type) 4444 (transport port number) RTP/AVP ( RTP) 2 ( RTP payload type=2) Attribute media type : a=rtpmap: 2 ( RTP payload type=2) G726-32/8000 (media name, bit rate) Note: Collins media type, port number, 4444 port G726 media stream, 4666 port G723 media stream, Collins media stream Note: Via: headers, 180 Ring

SDP Inclusion in SIP Messages (2/2) Daniel<sip:Collins@station1workcom> Boss<sip:Manager@station2workcom> port=4888 b c d SIP/20 200 OK From: Daniel<sip:Collins@station1workcom>; tag = abcd1234 To: Boss<sip:Manager@station2workcom>; tag = xyz789 CSeq: 1 INVITE Content-Length: 163 Content-Type: application/sdp Content-Disposition: session v=0 o=collins 45678 001 IN IP4 station2workcom s= c=in IP4 station2workcom t=0 0 m=audio 0 RTP/AVP 2 m=audio 0 RTP/AVP 4 m=audio 6666 RTP/AVP 15 a=rtpmap 15 G728/8000 ACK sip:manager@station2workcom SIP/20 From: Daniel<sip:Collins@station1workcom>; tag = abcd1234 To: Boss<sip:Manager@station2workcom>; tag = xyz789 CSeq: 1 ACK Content-Length: 0 Conversation port=6666 65 Step b: 200 OK message body INVITE message body G726, G7231 media type, port number 0 reject attribute G728 media type, 6666 Boss port number, G728 media stream attribute Step c: ACK, SDP, content-length=0 Step d: RTP G728,

Alternative Ways Offer m=audio 4444 RTP/AVP 2 4 15 a=rtpmap 2 G726-32/8000 a=rtpmap 4 G723/8000 a=rtpmap 15 G728/8000 Answer m=audio 6666 RTP/AVP 15 a=rtpmap 15 G728/8000 66 Collins media type,, port number, 4444 port media type, m field : m=audio 4444 RTP/AVP 2 4 15 3 attributes media type Boss G728,

Negotiation of Media (1/3) Re-INVITE is issued when the server replies with more than one codec With the same dialog identifier (To and From tag), Call-ID and Request-URI Session version in o field is increased by 1 A mismatch 488 (Not acceptable here) or 606 (Not acceptable) A Warning header with warning code 304 (media type not available) 305 (incompatible media format) 67 media type, sender media type, INVITE, INVITE ( messages) INVITE dialog (in confirmed state) dialog identifier, Call-ID Request-URI Dialog identifier = From tag + To tag + Call ID offer media types receiver, receiver response: 488 (Not acceptable here) 606 (Not acceptable) response Warning: header, 3 warning code Warning code=304 media type not available session media types ( audio/video/app) Warning code =305 incompatible media format session media format ( G711 codec), caller INVITE

Negotiation of Media (2/3) Daniel<sip:Collins@station1workcom> a INVITE sip:manager@station2workcom SIP/20 CSeq: 1 INVITE Content-Length: 183 Content-Type: application/sdp Content-Disposition: session Boss<sip:Manager@station2workcom> b v=0 o=collins 123456 001 IN IP4 station1workcom s= c=in IP4 station1workcom t=0 0 m=audio 4444 RTP/AVP 2 4 15 a=rtpmap 2 G726-32/8000 a=rtpmap 4 G723/8000 a=rtpmap 15 G728/8000 a=inactive SIP/20 200 OK CSeq: 1 INVITE Content-Length: 157 Content-Type: application/sdp Content-Disposition: session v=0 o=collins 45678 001 IN IP4 station2workcom s= c=in IP4 station2workcom t=0 0 m=audio 6666 RTP/AVP 4 15 a=rtpmap 4 G723/8000 a=rtpmap 15 G728/8000 a=inactive 68, Collins G726, G7232, G728, Boss G723 G728 Step a: Collins offer, G726, G7232, G728, media stream, port=4444 Step b: Boss answer G726, G728, port=6666

Negotiation of Media (3/3) Daniel<sip:Collins@station1workcom> Boss<sip:Manager@station2workcom> c d ACK sip:manager@station2workcom SIP/20 From: Daniel<sip:Collins@station1workcom>; tag = abcd1234 To: Boss<sip:Manager@station2workcom>; tag = xyz789 CSeq: 1 ACK Content-Length: 0 INVITE sip:manager@station2workcom SIP/20 CSeq: 2 INVITE Content-Length: 126 Content-Type: application/sdp Content-Disposition: session v=0 o=collins 123456 002 IN IP4 station1workcom s= c=in IP4 station1workcom t=0 0 m=audio 4444 RTP/AVP 15 a=rtpmap 15 G728/8000 69 Step c: Collins ACK response 200 OK ACK message body, ACK media type Step d: Collins media types G728, INVITE CSeq 1 o field session version 1, subfield ( sender, session number=123456), session

OPTIONS Method Determine the capabilities of a potential called party Accept Header Indicate the type of information that the sender hopes to receive Allow Header Indicate the SIP methods that it can handle Supported Header Indicate the SIP extensions that it can be supported 70 OPTIONS called party capabilities, media type, methods, SIP extension, encoding (ex: gzip), encoding language (ex: en), content-type (ex: application/sdp),

Usage of the OPTIONS Method Daniel<sip:Collins@station1workcom> Boss<sip:Manager@station2workcom> a b OPTIONS sip:manager@station2workcom SIP/20 Via: SIP/20/UDP Station1workcom; branch=z9hg4bk7890123 From: Daniel<sip:Collins@workcom>; tag=lmnop123 To: Boss<sip:Manager@station2workcom> Call-ID: 123456@station1workcom Contact: Daniel<sip:Collins@station1workcom> CSeq: 1 OPTIONS Accept: application/sdp Content-Length: 0 SIP/20 200 OK Via: SIP/20/UDP Station1workcom; branch=z9hg4bk7890123 From: Daniel<sip:Collins@workcom>; tag=lmnop123 To: Boss<sip:Manager@station2workcom>; tag=xyz5678 Call-ID: 123456@station1workcom CSeq: 1 OPTIONS Allow: INVITE, ACK, CANCEL, OPTIONS, BYE Supported: newfield Content-Length: 146 Content-Type: application/sdp v=0 o=manager 45678 001 IN IP4 station2workcom s= c=in IP4 station2workcom t=0 0 m=audio 0 RTP/AVP 4 15 a=rtpmap 4 G723/8000 a=rtpmap 15 G728/8000 71 Collins Boss media type OPTIONS Accept: header sender Boss SDP Boss capabilities OPTIONS Accept: header, application/sdp Boss 200 OK SDP Boss Allow: header Boss SIP methods, REGISTER, spec Supported: header newfile SIP extension extensions, Content-type: message body codec Response Accept:, Accept-Encoding:, Accept- Language:,

SIP Extensions and Enhancements SIP INFO Method SIP Event Notification SIP for Instant Messaging SIP REFER Method Reliability of Provisional Responses SIP UPDATE Method Integration of SIP Signaling and Resource Management

SIP Extensions and Enhancements RFC 2543, March 1999 SIP has attracted enormous interest Traditional telecommunications companies, cable TV providers and ISP A large number of extensions to SIP have been proposed SIP will be enhanced considerably before it becomes an Internet standard RFC 3261 183 Session Progress Supported header 73 1999 SIP RFC 2543,, Cable TV, ISP SIP, RFC 3261 proposed standard, extension, proposed standard IETF SIP working group

183 Session Progress It has been included within the RFC 3261 To open one-way audio path from called end to calling end From the called party to calling party Enable in-band call progress information to be transmitted Tones or announcements Interworking with SS7 network ACM (Address Complete Message) Ring back tone in 183 Session Progress 74 183 Session Progress response code RFC 3261 183 Session Progress response code callee caller, caller in-band call Tones announcement SS7 caller callee IAM ( ), callee ACM message ( ring-back tone ) caller, SIP ACM message, 183 SS7

The Supported Header The Require Header (client server) A client indicates that a server must support certain extension with Require header 420 bad extension with Unsupported header The Supported header Way 1: Options (client server) Response with Supported (server client) Way 2: Request with Supported (client server) 421 extension required with Require (server client) 75 Supported header RFC 3261 RFC 2543 Require header client, servers ( proxy) extensions, Require: head server RFC 3261 Supported header field server client extension client server extension request Required Require option tags list option tag extension, RFC (but ) server 420 Bad Extension, Unsupported header Supported header : client server extension, OPTIONS request server Sever Supported header, extensions client extensions request Supported header field sever client request, server extension Supported header, 421 extension required, Require header client extension Supported, extensions

SIP INFO Method Specified in RFC 2976 For transferring information during an ongoing session Application-layer information could be transferred in the middle of a call A powerful, flexible tool to support new services The transfer of DTMF digits The transfer of account balance information Pre-paid service The transfer of mid-call signaling information generated in another network and passed to the IP network via a gateway 76 SIP INFO method RFC 2976 The Session Initiation Protocol (SIP) INFO Method session ( ), application-layer INFO,, message body, INFO Dual-Tone Multi-frequency (DTMF) digits

SIP Event Notification RFC 3265 has addressed the issue of event notification SUBSCRIBE and NOTIFY Event header Subscriber a SUBSCRIBE b c 200 OK NOTIFY Notifier Current state information d e 200 OK NOTIFY Updated state information f 200 OK 77 SIP Event method RFC 3265 Session Initiation Protocol (SIP)- Specific Event Notification RFC 3265 general ( ), event (ex: instant message, presence, monitoring of calls), - Ex 1: Instant Messaging buddy list, SUBSCRIBER Instant Messaging server Event: header buddy Server NOTIFY Ex 2: ( ), SUBSCRIBER server message body, Event: header server message body Server authentication, 200 OK server NOTIFY,, ( Ex1, buddy ), server NOTIFY, NOTIFY 200 OK SIP, Event Notification, Event: header, message body,

SIP for Instant Messaging (1/3) The IETF working group SIP for Instant Messaging and Presence Leveraging Extensions (SIMPLE) RFC 3428 Session Initiation Protocol (SIP) Extension for Instant Messaging A new SIP method MESSAGE This request carries the actual message in a message body A MESSAGE request does not establish a SIP dialog 78 IETF SIP for Instant Messaging and Presence Leveraging Extensions (SIMPLE) working group, instant messaging RFC 3428 Session Initiation Protocol (SIP) Extension for Instant Messaging Instant messaging real-time,,, session, message INVITE session SIP MESSAGE method BYE session MESSAGE, message body text/plain, message/cpim cpim common presence and instant message MESSAGE SIP dialog To: From: header tag

SIP for Instant Messaging (2/3) Boss<sip:Manager@pc1homecom> sip:serverworkcom Daniel<sip:Collins@station1workcom> a b c d MESSAGE sip:collins@workcom SIP/20 Via: SIP/20/UDP pc1homenet; branch=z9hg4bk7890 Max-Forwards: 70 From: Boss<sip:Manager@homenet> To: Daniel<sip:Collins@workcom> Call-ID: 123456@pc1homenet CSeq: 1 MESSAGE Content-Type: text/plain Content-Length: 19 Content-Disposition: render Hello How are you? SIP/20 200 OK Via: SIP/20/UDP pc1homenet; branch=z9hg4bk7890 From: Boss<sip:Manager@homenet> To: Daniel<sip:Collins@workcom> Call-ID: 123456@pc1homenet CSeq: 1 MESSAGE Content-Length: 0 MESSAGE sip:collins@workcom SIP/20 Via: SIP/20/UDP serverworkcom; branch=z9hg4bkxyz1 Via: SIP/20/UDP pc1homenet; branch=z9hg4bk7890 Max-Forwards: 69 From: Boss<sip:Manager@homenet> To: Daniel<sip:Collins@workcom> Call-ID: 123456@pc1homenet CSeq: 1 MESSAGE Content-Type: text/plain Content-Length: 19 Content-Disposition: render Hello How are you? SIP/20 200 OK Via: SIP/20/UDP serverworkcom; branch=z9hg4bkxyz1 Via: SIP/20/UDP pc1homenet; branch=z9hg4bk7890 From: Boss<sip:Manager@homenet> To: Daniel<sip:Collins@workcom> Call-ID: 123456@pc1homenet CSeq: 1 MESSAGE Content-Length: 0 79 Boss proxy MESSAGE Daniel Daniel 200 OK

SIP for Instant Messaging (3/3) Boss<sip:Manager@pc1homecom> sip:serverworkcom Daniel<sip:Collins@station1workcom> e f MESSAGE sip:manager@homenet SIP/20 Via: SIP/20/UDP serverworkcom; branch=z9hg4bkabcd Via: SIP/20/UDP station1workcom; branch=z9hg4bk123 Max-Forwards: 69 From: Daniel<sip:Collins@workcom> To: Boss<sip:Manager@homenet> Call-ID: 456789@station1workcom CSeq: 1101 MESSAGE Content-Type: text/plain Content-Length: 22 Content-Disposition: render MESSAGE sip:manager@homenet SIP/20 Via: SIP/20/UDP station1workcom; branch=z9hg4bk123 Max-Forwards: 70 From: Daniel<sip:Collins@workcom> To: Boss<sip:Manager@homenet> Call-ID: 456789@station1workcom CSeq: 1101 MESSAGE Content-Type: text/plain Content-Length: 22 Content-Disposition: render I m fine How are you? I m fine How are you? g h SIP/20 200 OK Via: SIP/20/UDP serverworkcom; branch=z9hg4bkabcd Via: SIP/20/UDP station1workcom; branch=z9hg4bk123 From: Daniel<sip:Collins@workcom> To: Boss<sip:Manager@homenet> Call-ID: 456789@station1workcom CSeq: 1101 MESSAGE Content-Length: 0 SIP/20 200 OK Via: SIP/20/UDP station1workcom; branch=z9hg4bk123 From: Daniel<sip:Collins@workcom> To: Boss<sip:Manager@homenet> Call-ID: 456789@station1workcom CSeq: 1101 MESSAGE Content-Length: 0 80 Daniel instant message, MESSAGE proxy protocol, MESSAGE MESSAGE proxy MESSAGE, Contact: header why? dialog MESSAGE, Record-Route: Route: ( SIP dialog, ) MESSAGE SIP dialog Boss 200 OK

SIP REFER Method RFC 3515 The Session Initiation Protocol (SIP) Refer Method To enable the sender of the request to instruct the receiver to contact a third party With the contact details for the third party included within the REFER request For Call Transfer applications The Refer-to: and Refer-by: Headers The dialog between Mary and Joe remains established Joe could return to the dialog after consultation with Susan 81 RFC 3515 - The Session Initiation Protocol (SIP) Refer Method REFER REFER sender, receiver Call Transfer ( ) REFER message-body Call Transfer Refer-by: header REFER, INVITE (optional), Joe Mary Susan, Susan 200 OK Mary Joe dialog, Susan, Mary Mary Joe dialog, BYE request,

Call Transfer (1/2) sip:mary@station1workcom sip:joe@station2workcom sip:susan@station3workcom a b c REFER sip:joe@station2workcom SIP/20 Via: SIP/20/UDP station1workcom; branch=z9hg4bk789 Max-Forwards: 70 From: Mary<sip:Mary@workcom>; tag=123456 To: Joe<sip:Joe@workcom>; tag=67890 Contact: Mary<Mary@station1workcom> Refer-To: Susan<sip:Susan@station3workcom> Call-ID: 123456@station1workcom CSeq: 123 REFER Content-Length: 0 SIP/20 202 Accepted Via: SIP/20/UDP station1workcom; branch=z9hg4bk789 From: Mary<sip:Mary@workcom>; tag=123456 To: Joe<sip:Joe@workcom>; tag=67890 Contact: Joe<Joe@station2workcom> Call-ID: 123456@station1workcom CSeq: 123 REFER Content-Length: 0 INVITE sip:susan@station3workcom SIP/20 Via: SIP/20/UDP station2workcom; branch=z9hg4bkxyz1 Max-Forwards: 70 From: Joe<sip:Joe@workcom>; tag=abcxyz To: Susan<sip:Susan@station3workcom> Contact: Joe<Joe@station2workcom> Call-ID: 67890@station2workcom CSeq: 567 INVITE Content-Type: application/sdp Content-Length: xx Content-Disposition: session 82 {message body} Mary Joe,, Joe Susan, Mary, Mary, Mary Call Transfer, Mary Mary Joe session Susan, Mary Susan Call Transfer Step a: Mary Susan, REFER Joe Refer- To: header Susan Step b: Joe 202 Accept Mary,, Jeo NOTIFY (Step f) Mary, Step c: Joe INVITE Susan

Call Transfer (2/2) sip:susan@station3workcom e f g sip:mary@station1workcom NOTIFY sip:mary@station1workcom SIP/20 Via: SIP/20/UDP station2workcom; branch=z9hg4bk123 Max-Forwards: 70 To: Joe<sip:Joe@workcom>; tag=67890 From: Mary<sip:Mary@workcom>; tag=123456 Contact: Joe<Joe@station2workcom> Call-ID: 123456@station1workcom CSeq: 124 NOTIFY Content-Type: message/sipfrag;version=20 Content-Length: 15 SIP/20 200 OK h SIP/20 200 OK Via: SIP/20/UDP station2workcom; branch=z9hg4bk123 To: Joe<sip:Joe@workcom>; tag=67890 From: Mary<sip:Mary@workcom>; tag=123456 Call-ID: 123456@station1workcom CSeq: 124 NOTIFY Content-Length: 0 sip:joe@station2workcom SIP/20 200 OK Via: SIP/20/UDP station2workcom; branch=z9hg4bkxyz1 From: Joe<sip:Joe@workcom>; tag=abcxyz To: Susan<sip:Susan@station3workcom>; tag=123xyz Call-ID: 67890@station2workcom CSeq: 567 INVITE Content-Type: application/sdp Content-Length: xx Content-Disposition: session {message body} ACK sip:susan@station3workcom SIP/20 Via: SIP/20/UDP station2workcom; branch=z9hg4bkxyz1 Max-Forwards: 70 From: Joe<sip:Joe@workcom>; tag=abcxyz To: Susan<sip:Susan@station3workcom>; tag=123xyz Call-ID: 67890@station2workcom CSeq: 567 ACK Content-Length: 0 83 Step e, f: Susan Joe INVITE, 200 OK Joe ACK Step g: Joe NOTIFY Mary, message body Susan 200 OK message body, Content-type: message/sipfrag: verison 20 SIP (NOTIFY) SIP (200 OK), ie, tunnel Step h: Mary 200 OK Joe Mary Joe BYE, dialog, Joe Susan session

Reliability of Provisional Responses (1/2) Provisional Responses 100 (trying), 180 (ringing), 183 (session in progress) Are not answered with an ACK If the messages is sent over UDP Unreliable Lost provisional response may cause problems when interoperating with other network 180 (ring), 183 (session progress) Q931 alerting or ISUP ACM (Address Complete Message) These external networks need these information to drive a state machine 84 100 Trying, 180 Ringing, 183 Session in Progress response provisional response SIP entities ACK caller provisional response 180, 183 Q931 alerting, ISUP ACM, (state machine) SIP extension provisional response RSeq, Rack, PRACK

Reliability of Provisional Responses (2/2) Eg, a call to an unassigned number ACM to create a one-way path to relay an announcement such as The number you have called has been changed If the provisional response is lost, the caller might left in the dark and not understand why the call did not connect RFC 3262 Reliability of Provisional Responses in SIP Response sequence (RSeq): a request header Response ACK (RAck): a response header Option tag=100rel with supported:/unsupported: Provisional Response ACK (PRACK) method 85 ISUP ACM callee caller Caller, ACM,, ***** ACM provisional response, caller, RFC 3262 Reliability of Provisional Responses in SIP headers option tag, PRACK method, end-to-end provisional response response sequence (RSeq): request header server provisional response, provisional response transaction, RSeq (ie, RSeq scope transaction) transaction, RSeq response ACK (RAck): response header caller PRACK, RAck RSeq, PRACK RSeq response Supported: header option tag, 100rel, provisional responses option tag=100rel Unsupported: header, server option tag,, RSeq, RAck extension 100rel 100% reliability Provisional Response ACK (PRACK) method caller

Provisional Response ACK (1/2) ClientA@networkcom ServerB@networkcom INVITE sip:serverb@networkcom SIP/20 Via: SIP/20/UDP ClientAnetworkcom; branch=z9hg4bk7890123 Supported: 100rel Require: 100rel From: sip:clienta@networkcom; tag=lmnop123 To: sip:serverb@networkcom Call-ID: 123456@ClientAnetworkcom CSeq: 1 INVITE?? SIP/20 180 Ringing Via: SIP/20/UDP ClientAnetworkcom; branch=z9hg4bk7890123 Require: 100rel RSeq: 567890 From: sip:clienta@networkcom; tag=lmnop123 To: sip:serverb@networkcom; tag = xyz123 Call-ID: 123456@ClientAnetworkcom CSeq: 1 INVITE SIP/20 180 Ringing Via: SIP/20/UDP ClientAnetworkcom; branch=z9hg4bk7890123 Require: 100rel Start timer T1 default=05 sec 86, Client A Server B, Sever B provisional response,, Step a: Client A INVITE Client A PRACK, INVITE Supported: 100rel Client A, Required: 100rel Step b: Sever B 180 Ringing, timer T1=05sec 180 Ringing RSeq, provisional response Require: 100rel optional tag, caller PRACK RSeq random number 567890 32 bits, 1 4,294,967,295 timer T1, 05 sec Step c: Timeout, Sever B PRACK, 180 Ringing RSeq, response,, RSeq 1 RSeq=567891 64 64 PRACK, sever

Provisional Response ACK (2/2) 87 Step d: Client A 180 Ringing, PRACK callee RAck: 3 subfields RSeq, RSeq response CSeq dialog, INVITE method final response, CSeq 2 PRACK, transaction Step e: sever B PRACK, 200 OK (for PRACK) 200 OK, INVITE PRACK, reliable, call setup delay (PRACK 200 OK ) UDP unreliable transport protocol PRACK SIP, TCP Application

The SIP UPDATE Method RFC 3311 The Session Initiation Protocol (SIP) UPDATE Method To enable the modification of session information before a final response to an INVITE is received Eg, to change the codec One important usage is when reserving network resources as part of a SIP session establishment 88 ( 200 OK) session, codec, INVITE INVITE, (confirmed state) dialog, INVITE, dialog early state Note: dialog early state caller 2xx response, confirmed state, early state dialog,, session callee 183 session progress, message body ring tone music, early state caller media, media, ring tone RFC3311 UPDATE method caller INVITE, final response, UPDATE session dialog, early confirmed state, caller callee, SDP offer UPDATE, session UPDATE response (2XX), answer network resource management,, media INVITE Allow: header, UPDATE

Integration of SIP Signaling and Resource Management (1/2) Ensuring that sufficient resources are available to handle a media stream is a very important The signaling might take a different path from the media Assume resource-reservation mechanisms are available (Chapter 8) End-to-end status End-to-end network resources are reserved as part of session establishment Segmented status A certain amount of network resources are reserved in advance for a certain type of usage Policing functions at the edge of the network 89 carrier-grade, resource media streams signaling voice, signaling? 8 : End-to-end status: session, end-to-end (, ),,,, RSVP Segmented Status: UAs an aggregate ( ) basis, (ex: voice, data, management traffic) UA ( link ), session,,, ( ), INVITE request UAs, SIP, session media

Integration of SIP Signaling and Resource Management (2/2) Way I: A rejected Internet draft Way II: RFC 3312 Integration of Resource Management and Session Initiation Protocol (SIP) By using and UPDATE method and the provisional responses By involving extensions to SDP By SIP extensions 580 precondition failure 90, 1999 Internet draft, SIP header INVITE, caller header callee, INVITE,, SIP, header, callee header,, SIP, extension rejected, rfc3312: Integration of Resource Management and SIP, provisional response, UPDATE SDP, QoS SDP ( SIP ) SDP stream,, QoS audio video QoS, UPDATE 183 session progress SDP,, PRACK/200 OK, SIP extension 580 precondition failure ( BYE CANCEL) session, codec, RFC precondition option tag, offer, SIP Require header precondition RFC Supported header precondition PRACK, UPDATE, 100rel session, session, QoS, RFC 3312 Ex1: media IP address, re-invite, SDP Ex2: codec,,

End-to-end Resource UserA@networkcom Reservation Reserving network b resources in advance of c altering the called d user a e f g h i j k l INVITE Session Description (with pre-condition attributes) PRACK UPDATE Session Description (with updated pre-condition attributes) PRACK (for 180 response) ACK Resource Reservation UserB@networkcom SIP/20 183 Session Progress Session Description (with pre-condition attributes) SIP/20 200(OK) (for PRACK) SIP/20 200 (OK) (for UPDATE) Session Description (with updated pre-condition attributes) SIP/20 180 (Ringing) (response to initial INVITE) SIP/20 200(OK) (for PRACK) SIP/20 200(OK) (for INVITE) 91, User A User B RSVP Step a: User A INVITE, session description User A (offer media), media streams, (preconditions), ex: end-to-end User A User B, Step b: User B 183 Session Progress answer, User A, ( B-to- A, B ), User B User A A-to-B (B recv) stream resource User B 183 Session Progress, B-to-A Step c: User A PRACK response (A A-to-B ) Step d: User B PRACK 200 OK Step e: User A User B Step f: User A, User A UPDATE, offer (A-to-B OK) Step g: User B 200 OK UPDATE, B-to-A Step h: User B, 180 Ringing (for INVATE) Step i, j: PRACK 200 OK (for 180 Ringing) Ringing Step k: User B, 200 OK (for INVATE) Step l: User A ACK Note: A INVITE offer, B 1xx offer, A PRACK answer

Media Level SDP Attributes Precondition-type = qos token Three status: des (desired) / curr (current) / conf (confirmed) Status type: e2e (end-to-end) / local / remote Direction tag: send (sending) / recv (receiving) / sendrecv (both) / none Strength tag: none / mandatory / optional / failure / unknown 92 SDP preconditions, media level SDP attributes: precondition-type qos, SDP : desired/current/confirm Current tag Desired Confirmed QoS,, offer (confirmed answer offer, answer ) media stream direction-tag: send/recv/senrecv/none send/recv SDP UA, media stream User A SDP User A User B, send User B SDP User A User B, recv sendrecv media stream send, recv streams, precondition,, sendrecv none status type: e2e/local/remote e2e end-to-end, end-to-end segmented, SDP UA, local, remote local, local network, remote, Strength tag, callee none, mandatory, session optional optional,,, session failure 580 pre-condition failure, SDP, a=des:qos failure e2e send unknown offer mandatory, offer ex: a=des:foo unknown e2e send

Example of e2e Resource Reservation (1/2) SDP for initial INVITE v=0 o=usera 45678 001 IN IP4 stationanetworkcom s= c=in IP4 stationaneworkcom t=0 0 m=audio 4444 RTP/AVP 0 a=curr: qos e2e none a=des: qos mandatory e2e sendrecv SDP for 183 response v=0 o=userb 12345 001 IN IP4 stationbnetworkcom s= c=in IP4 stationbneworkcom t=0 0 m=audio 6666 RTP/AVP 0 a=curr: qos e2e none a=des: qos mandatory e2e sendrecv a=conf: qos e2e recv 93 5-22, SDP SDP for initial INVITE (step a) m=audio 4444 RTP/AVP 0 A to B RTP type=0 audio, A s port # =4444 media stream attributes: a=curr: qos e2e none end-to-end QoS a=des: qos mandatory e2e sendrecv User A sending receiving QoS SDP for 183 Session Progress (step b) m=audio 6666 RTP/AVP 0 B to A RTP type=0 audio, B s port # =6666 media stream attributes: a=curr: qos e2e none end-to-end QoS a=des: qos mandatory e2e sendrecv User B sending receiving QoS a=conf: qos e2e recv User B User A A-to-B, offer User B B-to-A

Example of e2e Resource Reservation (2/2) SDP for UPDATE v=0 o=usera 45678 001 IN IP4 stationanetworkcom s= c=in IP4 stationaneworkcom t=0 0 m=audio 4444 RTP/AVP 0 a=curr: qos e2e send a=des: qos mandatory e2e sendrecv SDP for 200 response v=0 o=userb 12345 001 IN IP4 stationbnetworkcom s= c=in IP4 stationbneworkcom t=0 0 m=audio 6666 RTP/AVP 0 a=curr: qos e2e sendrecv a=des: qos mandatory e2e sendrecv 94 5-22, SDP SDP for UPDATE (step f) a=curr: qos e2e send caller caller-to-callee, send end-to-end QoS a=des: qos mandatory e2e sendrecv caller sending receiving QoS SDP for 200 OK (for UPDATE) (step g) a=curr: qos e2e sendrecv end-to-end QoS a=des: qos mandatory e2e sendrecv callee sending receiving QoS

Segmented Status Reservation Each participant deals with network access permission at its own end UserA@networkcom a b c d e f Local resource reservation INVITE v=0 0=userA 45678 001 IN IP4 stationanetworkcom s= c= IN IP4 stationanetworkcom t=0 0 m=audio 4444 RTP/AVP 0 a=curr: qos local sendrecv a=curr: qos remote none a=des: qos mandatory local sendrecv a=des: qos mandatory remote sendrecv PRACK (for 180 response) ACK UserB@networkcom Local resource reservation SIP/20 180 Ringing v=0 0=userB 12345 001 IN IP4 stationbnetworkcom s= c= IN IP4 stationbnetworkcom t=0 0 m=audio 6666 RTP/AVP 0 a=curr: qos local sendrecv a=curr: qos remote sendrecv a=des: qos mandatory local sendrecv a=des: qos mandatory remote sendrecv SIP/20 200 (OK) (for PRACK) SIP/20 200 (OK) (for INVITE) 95, User A User B segmented status (ie, aggregate) local policing Step a: User A local network, INVITE, session description: m=audio 4444 RTP/AVP 0 A-to-B RTP type=0 audio, A s port # =4444 media stream attributes: a=curr: qos local sendrecv User A, a=curr: qos remote none (User B) a=des: qos mandatory local sendrecv User A sending receiving QoS a=des: qos mandatory remote sendrecv User A sending receiving QoS Step b: User B User A,, 180 Ring ( ), session description: m=audio 6666 RTP/AVP 0 B-to-A RTP type=0 audio, B s port # =6666 media stream attributes: a=curr: qos local sendrecv User B, a=curr: qos remote sendrecv User A a=des: qos mandatory local sendrecv User B sending receiving QoS a=des: qos mandatory remote sendrecv User B User A sending receiving QoS

Usage of SIP for Features and Services Call Forwarding Consultation Hold

Usage of SIP for Features/Services (1/2) Personal Mobility (Registrar) Call-transfer application (with REFER method) One number service through forking proxy Call-completion services (by Retry-After: header) Click-to-call applications or Web service (SIP address is a URL) Existing supplementary services in traditional telephony Call waiting, call forwarding, multi-party calling, call screening 97 SIP SIP extension, : SIP registrar personal mobility REFER call transfer, Fig 5-20 forking proxy one-number service, Fig 5-7 Retry-After: header call-completion service, Fig 5-6 SIP Web URL, MIME content HTML document, image, click-to-call service CLASS services, call waiting, call forwarding, multiparty calling, call screening

Usage of SIP for Features/Services (2/2) Proxy invokes various types of advanced feature logic Policy server (call-routing, QoS) Feature server (subscriber-specific feature data, ex: screening lists, forwarding information) Authentication server Use the services of an IN SCP over INAP Use Open Service Access (OSA) 98 Proxy, Proxy Policy server call-routing, QoS, Proxy screening lists, forwarding, (other example: pre-pay call) Proxy Authentication server, proxy Intelligent network (IN) Service Control Point (SCP), IN proxy IN Application Part Open Service Access (OSA), Application Programming Interfaces (API) proxy SCP

Call Forwarding Call-forwardingon-busy Call-forwardingon-no-answer Timeout CANCEL method Call-forwarding unconditional 99 SIP call forwarding : Call-forwarding-on-busy: callee, Call-forwarding-on-no-answer: callee, Call-forwarding- unconditional service: callee, call-forwarding-on-busy User 1 User 2 User 2, User 3 User 1 INVITE, proxy User 2 User 2, 486 busy here proxy Proxy database, INVITE User 3 To: header User 2, User 3 call forwarding 486 callee,, callee response Retry-after: header, (ex: voice mail) callee callee, 600 busy everywhere User 3 200 OK, Contact: header User 3, User 1 User 3 trunk proxy,, Recordroute: header Call-forwarding-on-no-answer: proxy INVITE User 2, timer callee, proxy CANCEL User 2, INVITE User 3 Call-forwarding- unconditional service callee, proxy

Consultation Hold User A asks User B a question, and User B need to check with User C for the correct answer User B could use the REFER method to transfer the call to User C A SIP UPDATE User A User B User C a INVITE sip:user A@there SIP/20 From: sip:user B@here Call-ID: 12345 SDP Description b SIP/20 200 OK From: sip:user B@here Call-ID: 12345 SDP Description c ACK sip:user A@there SIP/20 From: sip:user B@here Call-ID: 12345 d Conversation e UPDATE sip:user A@there SIP/20 From: sip:user B@here Call-ID: 12345 Session Description a=inactive f SIP/20 200 OK From: sip:user B@here Call-ID: 12345 Session Description a=inactive g h On hold i User B calls User C, speaks, then hangs up j UPDATE sip:user A@there SIP/20 From: sip:user B@here Call-ID: 12345 Session Description a=sendrecv SIP/20 200 OK From: sip:user B@here Call-ID: 12345 Session Description a=sendrecv 100 User A B (ex: A B ), User B User A ( hold, ) User B User C (ex: B C ), User B User C, User A (ex: B A, Consultation Hold) REFER, call waiting Steps a-d: User A User B Step e: User B UPDATE, inactive UPDATE, hold, Call-ID: 123456 INVITE SDP media attribute inactive, hold, SDP media attribute sendonly Steps f, g: 200 OK, media on hold Step h: User B (INVITE - BYE) User C Step i, j: User B UPDATE, active UPDATE, Call-ID: 123456, SDP media attribute sendrecv,,

Interworking PSTN Interworking Interworking with H323 SIP IP, PSTN H323 interworking

SIP to PSTN Call Manager@workcom Proxyworkcom NGW PSTN switch a INVITE b c d e f g h i j k l m ACK n o 100 (Trying) INVITE 183 (Session Progress) Session description 200 (OK) Updated session description One-way audio 100 (Trying) 183 (Session Progress) Session description 200 (OK) Updated session description ACK Two-way audio IAM ACM One-way audio ANM Two-way audio 102 SIP PSTN : seamless interworking, SIP device PSTN PSTN SS7 ISUP gateway SIP ISUP SIP-based, media gateway signaling gateway SS7 Boss SIP phone PSTN (Collins ), NGW (Network Gateway), NGW (network gateway) To: header PSTN, IAM (initial address message) calling party number From: header SIP URI, Caller-ID IAM INVITE, ACM (Address Complete Message) 183 Session Progress), ANM (Answer Message) 200 OK parameters PSTN SIP phone, Fig 5-28 SIP 180 ring PSTN phone ring tone 183 session progress ring tone media,, PRACK

PSTN Interworking RFC 3372 - Session Initiation Protocol for Telephones (SIP-T): Context and Architectures PSTN SIP PSTN RFC 3204 - MIME media types for ISUP and QSIG Objects MIME media types For ISUP The whole issue of interworking with SS7 is fundamental to the success of VoIP in the real world 103 PSTN SIP ISUP 1 1, RFC SIP-T (Session Initiation Protocol for Telephones (SIP-T):Context and Architectures) BCP (Best Current Practice), SIP extension, SIP PSTN SIP-T SIP message body (multiparts), ISO-10646 MIME, ISUP QSIG RFC 3204 - MIME media types for ISUP and QSIG Objects QSIG is the analogous signaling protocol used between PBXs to support calls within private telephony networks SIP INFO PSTN VoIP, SS7

Interworking with H323 SIP-H323 interworking gateway H323 endpoint Interworking Gateway SIP Client H323 Signaling SIP H323 gatekeeper H323 Endpoint SIP User Agent SIP Server H323 Signaling SIP 104 SIP-H323 Interworking group standard draft draft-agrawal- SIP-h323-interworking-reqs-07txt, 2001 Feb IESG, Information RFC version 7, 2005 Jan 5 approvedannouncement sent RFC Ed Queue, RFC Editor State Interworking gateway protocols SIP, SIP registrar, proxy H323, gatekeeper

A Call from SIP to H323 (1/2) SIP Client Gateway H323 Terminal Fast connect is used a b INVITE To: Terminal@H323net c=in IP4 1234567 m=audio 8000 RTP/AVP 0 Setup faststart [logical chan info = G711 Tx, G711 RX 1234567:8000 c Alerting d e f 180 (Ringing) 200 (OK) To: Terminal@H323net c=in IP4 1236789 m=audio 2000 RTP/AVP 0 Connect faststart [logical chan info = G711 Tx, G711 RX 1236789:2000 g h ACK Two-way voice Two-way voice 105 SIP caller H323 H323 Fast Connect procedure, gatekeeper gatekeeper, RAS, SIP SDP Q931 SETUP faststart logical channel information RTP payload type=0 G711 Tx ( ), G711 Rx ( ), SIP client IP=1234567 8000 port, Rx, H323 terminal Connect logical channel, gateway 200 OK SIP client H323 terminal Altering Call Proceeding logical channel information, gateway, 200 OK SIP client IP:port, RTP payload type, media Gateway

A Call from SIP to H323 (2/2) SIP Client Gateway H323 Terminal Fast Connect is not used a b c d e f g h i j INVITE To: Terminal@H323net c=in IP4 1234567 m=audio 8000 RTP/AVP 0 200 (OK) To: Terminal@H323net Setup faststart [logical chan info = G711 TX, G711 RX 1234567:8000 Terminal Capability Set G711 TX G711 RX Connect (no faststart) Terminal Capability Set Ack Terminal Capability Set Ack Open Logical Channel Terminal Capability Set G711 TX, G711 RX Open Logical Channel Ack RX=1236789:2000 k l ACK m c=in IP4 1236789 m=audio 2000 RTP/AVP 0 Open Logical Channel Ack RX=1234567:8000 Open Logical Channel H2250 H245 SIP H323 terminal H323 Fast Connect procedure, Q931 SETUP faststart logical channel information H323 terminal, Connect H323, Connect, H254 capacity, H323 terminal gateway media Gateway 200 OK SIP client gateway H323 terminal media

A Call from H323 to SIP with Fast Connection H323 Terminal Gateway SIP Client a b Setup faststart [logical chan info = G711 TX, G711 RX 1236789:2000 INVITE To: User@SIPnet c d e f g Alerting Connect faststart [logical chan info - G711 TX G711 RX 1234567:800 c=in IP4 1236789 m=audio 2000 RTP/AVP 0 ACK 180 (Ringing) 200 (OK) To: User@SIPnet c=in IP4 1234567 m=audio 8000 RTP/AVP 0 h Two-way voice Two-way voice 107 H323 SIP H323 Fast Connect procedure, gatekeeper Q931 SETUP H225 session SIP SDP 180 Ring Alerting SIP 200 OK Connect H323 terminal H323 Fast Connect procedure, Q931 SETUP faststart logical channel information Gateway INVITE session capacity H245, UPDATE SIP client media 5-33

Summary The future for signaling in VoIP networks Simple, yet flexible Easier to implement Fit well with the media gateway control protocols SIP is the protocol of choice for the evolution of third-generation wireless networks SIP-based mobile devices will become available SIP-based network elements will be introduced within mobile networks 108