Transcript SIP Client

SIP 기술 개요 및 현황
한국전자통신연구원
표준연구센터
현욱
1
SIP Overview
 응용 계층 시그널링 프로토콜
 멀티미디어 세션 설정, 수정, 종료를 위해 사용
 하위 계층 전송 프로토콜과 독립적
– UDP, TCP, SCTP
– Secure transport: TLS over TCP, IPSec
 HTTP 기반
– 텍스트 기반 프로토콜
– URIs (Uniform Resource Indicators) 사용
• SIP-URI 사용  sip:[email protected]
 Personal Mobility 제공
– 동일한 SIP 주소, 다른 위치 (단말)
– 현재 사용자의 위치 등록, 수정, 삭제, 검색 기능
– 메시지 포킹(forking) 기능 제공
 다양한 응용에 활용 가능
– Voice, video, gaming, instant messaging, presence, call control, etc.
2
SIP Timeline
 1996
– Mark Handley’s SIP(Session Invitation Protocol)
– Henning Schulzrinne’s SCIP(Simple Conference Control
Protocol)
 1999.3 : IETF MMUSIC WG에 의해 RFC 2543 제정
 1999.9 : IETF SIP WG 설립
 2000~2002 : RFC 2543bis-01 ~ bis-09
– 2000.6 : RFC 2543bis-01
•••
– 2001.3 : RFC 2543bis-03
•••
– 2002.2 : RFC 2543bis-09
 2002.7 : RFC 3261 표준 제정
3
SIP Timeline
 2000.12 : SIMPLE WG
– SIP-based IMPP
 2001.3 : SIP WG과 SIPPING WG으로 분리
– SIPPING: SIP Proposal Investigation
 2003.7 : XCON WG
– Centralized Multimedia Conferencing
4
SIP related WGs
MMUSIC WG
SIP WG
SIPPING WG
SIMPLE WG
- SDP Extensions
- SDPng
- SIP Core Spec. Maintenance
- SIP Protocol Extensions
- SIP Requirements
- Specific SIP Application Services
- SIP for Presence and
Instant Messaging
5
SIP related WGs
1999.9
MMUSIC WG
2001.3
SIP WG
SIPPPING WG
SIMPLE WG
2000.12
6
RFCs related to SIP
 Base spec
– RFC 3261 : SIP : Session Initiation Protocol
– RFC 3263 : Locating SIP Servers
– RFC 3264 : An Offer/Answer Model with SDP
 Extended Features
–
–
–
–
–
–
RFC 2976 : The SIP INFO Method
RFC 3262 : Reliability of Provisional Responses in SIP
RFC 3265 : SIP-Specific Event Notification
RFC 3311 : The Session Initiation Protocol UPDATE Method
RFC 3315 : The Session Initiation Protocol (SIP) Refer Method
RFC 3326 : The Reason Header Field for the Session Initiation
Protocol (SIP)
– RFC 3327 : Session Initiation Protocol Extension for
–
Registering Non-Adjacent Contacts
– RFC 3428 : Session Initiation Protocol Extension for Instant
Messaging
7
SIP Signaling Flow
A
B
INVITE
Prepare MS;
Early dialog
Ringing
Establish MS,
dialog
ACK
MS in progress
Create MS, dialog
OK
MS in progress
Media Streams
BYE
Terminate MS
OK
Terminate MS;
Destroy dialog
Destroy dialog
8
SIP Redirect Model
Location
Server
Request
SIP Redirect
Server
Response
INVITE
302 Moved
ACK
INVITE
…
SIP Client
(UAC:User Agent Client)
SIP Client
(User Agent Server)
9
SIP Proxy Model(1/2)
Location
Server
Request
SIP Proxy
Server
Response
INVITE
INVITE
100 Trying
…
ACK
SIP Client
(UAC:User Agent Client)
SIP Client
(User Agent Server)
10
SIP Proxy Model (2/2)
 Forking
Location
Server
Request
SIP Proxy
Server
Response
INVITE
INVITE
…
100 Trying
INVITE
ACK
…
SIP Client
(User Agent Server)
SIP Client
(UAC:User Agent Client)
SIP Client
(User Agent Server)
11
SIP Components
 UAC (User Agent Client)
– SIP 요청 메시지를 생성하는 논리적 구성요소
– SIP transaction을 개시하며, 해당 transaction 존속기간 동안 UAC
로 동작
 UAS (User Agent Server)
– 수신한 SIP 요청 메시지에 대한 응답 메시지를 생성하는 논리적
구성요소
– 요청 메시지 수용, 거절, Redirect
 UA (User Agent) = UAC + UAS
 Registrar
– REGISTER 메시지를 통해 사용자가 등록시킨 사용자 접속주소
저장
– 특정 사용자로의 접속주소에 대한 정보 제공
12
SIP Components
 Proxy Server
– UAC와 UAS 사이에서 SIP 메시지 라우팅을 담당하는 서버
– 메시지 처리를 위해 UAC, UAS로써 동작하며, 경우에 따라 수신
메시지 수정
– Stateful Proxy/Stateless Proxy
 Redirect Server
– 요청 메시지에 대한 3xx 응답을 생성하는 UAS
– 3xx 응답을 통해 클라이언트 접속주소를 가리키는 대체 URIs 전
송
13
SIP Messages
Request Messages
(METHODS)
•
•
•
•
•
•
Response Messages
(STATUS CODE)
INVITE
ACK
BYE
CANCEL
REGISTER
OPTION
•
•
•
•
•
•
14
1xx : Informational
2xx : Success
3xx : Redirection
4xx : Client Error
5xx : Server Error
6xx : Global Error
SIP Request Messages
기
Method
능
INVITE
콜 개시, 콜 수정
ACK
INVITE 요청에 대해 서버가 응답하는 최종 응답 메시지 확인
인
BYE
콜 종료
CANCEL
사용자 탐색이나 사용자에게 알리는 (ringing) 과정을 중단시
시킴으로써 개시한 콜 취소
OPTIONS
UA나 Proxy의 능력 (capability) 요구
REGISTER
사용자의 현재 위치 등록, 검색, 삭제, 수정
15
SIP Message Syntax : Request
Start line
Message
headers
Message
body
(SDP content)
INVITE sip:[email protected] SIP/2.0
To: Bob <sip:[email protected]>
From: sip:[email protected];tag=4711
Subject : Congratulations!
Content-Length : 177
Content-Type : application/sdp
Call-ID : [email protected]
CSeq : 1 INVITE
Max-Forward : 70
Contact : sip:[email protected]:5066;transport=udp
Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bK776as
v=0
o=alice 2345566342 2346553445 IN IP4 pc33.atlanta.com
s=
c=IN IP4 pc33.atlanta.com
t=0 0
m=audio 49170 RTP/AVP 0
a=rtpmap:0 PCMU/8000
16
SIP Response Messages
상태코드
기
능
1xx (Informational)
요청 메시지를 수신하여 요청 메시지 처리가 계속되고 있음을
알림.
2xx
(Success)
그 동작이 성공적으로 수신되고, 이해되어 수용되었음을 알림.
3xx
(Redirection)
요청 메시지를 완성하기 위해 취할 동작이 더 있음을 알림.
4xx
(Client Error)
요청 메시지에 에러가 포함되어 있거나 해당 서버에서 처리할
수 없음을 알림.
5xx
(Server Error)
요청 메시지는 유효하나 서버가 수행할 수 없음을 알림.
6xx
(Global Error)
요청 메시지가 어떤 다른 서버에서도 수행할 수 없음을 알림.
17
SIP Response(1/3)











100 Trying
180 Ringing
181 Call Is Being Forwarded
182 Queued
183 Session Progress
200 OK
18
300 Multiple Choices
301 Moved Permanently
302 Moved Temporarily
305 Use Proxy
380 Alternative Service
SIP Response(2/3)
 414 Request-URI Too Long
 415 Unsupported Media Type
 416 Unsupported URI
Scheme
 420 Bad Extension
 421 Extension Required
 423 Interval Too Brief
 480 Temporarily Unavailable
 481 Call/Transaction Does
Not Exist
 482 Loop Detected
 483 Too Many Hops
 484 Address Incomplete








400 Bad Request
401 Unauthorized
402 Payment Required
403 Forbidden
404 Not Found
405 Method Not Allowed
406 Not Acceptable
407 Proxy Authentication
Required
 408 Request Timeout
 410 Gone
 413 Request Entity Too Large
19
SIP Response(3/3)

















485 Ambiguous
486 Busy Here
487 Request Terminated
488 Not Acceptable Here
491 Request Pending
493 Undecipherable
500 Server Internal Error
501 Not Implemented
502 Bad Gateway
503 Service Unavailable
504 Server Time-out
20
505 Version Not Supported .
513 Message Too Large
600 Busy Everywhere
603 Decline
604 Does Not Exist Anywhere
606 Not Acceptable
SIP Message Syntax : Response
Start line
Message
headers
Message
body
(SDP content)
SIP/2.0 200 OK
To: Bob <sip:[email protected]>;tag=428
From: sip:[email protected];tag=4711
Subject : Congratulations!
Content-Length : 121
Content-Type : application/sdp
Call-ID : [email protected]
CSeq : 1 INVITE
Max-Forward : 70
Contact : sip:[email protected]
Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bK776as
v=0
o=bob 2890844526 2890844526 IN IP4 192.0.2.4
s=
c=IN IP4 192.0.2.4
t=0 0
m=audio 5000 RTP/AVP 0
a=rtpmap:0 PCMU/8000
21
SIP Headers(1/2)






























Accept
Accept-Encoding
Accept-Language
Alert-Info
Allow
Authentication-Info
Authorization
Call-ID
Call-Info
Contact
Content-Disposition
Content-Encoding
Content-Language
Content-Length
Content-Type
CSeq
22
Date
Error-Info
Expires
From
In-Reply-To
Max-Forwards
Min-Expires
MIME-Version
Organization
Priority
Proxy-Authenticate
Proxy-Authorization
Proxy-Require
Record-Route
SIP Headers(2/2)














Reply-To
Require
Retry-After
Route
Server
Subject
Supported
Timestamp
To
Unsupported
User-Agent
Via
Warning
WWW-Authenticate
23
SIP - Extensions
 Basic SIP Specifications
– RFC 3261 : SIP (Session Initiation Protocol)
– RFC 3263 : Locating SIP Servers
– RFC 3264 : An Offer/Answer Model with the SDP
 SIP Extensions
– METHOD Extensions
– HEADER Extensions
– Security and Privacy Support
 SIP WG Activities(2004.8)
– RFC: 23, Internet Drafts : 22
 SIPPING WG Activities(2004.8)
– RFC: 12, Internet Drafts : 31
24
SDP
 Session Description Protocol (RFC2327)
– IETF MMUSIC(Multiparty Multimedia Session Control) WG
– Purpose
• On the Mbone, to describe session information of multimedia
conference
 SDP Information
– Session Description
– Time Description
– Media Description
25
SDP Format
Session Description
v = (protocol version) //SDP version (v=0)
o = (owner/creator and session identifier).
s = (session name)
i = * (session information)
u =* (URI of description)
e =* (email address)
p =* (phone number)
c =* (connection information - not required if included in all media)
b =* (bandwidth information)
z =* (time zone adjustments)
k =* (encryption key)
a =* (zero or more session attribute lines)
(*) Optional Fields
26
SDP Format
Time Description
t = (time the session is active)
r =* (zero or more repeat times)
Media Description
m = (media name and transport address)
i =* (media title)
c =* (connection information - optional if included at session-level)
b =* (bandwidth information)
k =* (encryption key)
a =* (zero or more media attribute lines)
...
27
SIP Functional Layers
User
Hook on/off
Ringing
Session creation
Transaction User
Application-specific processing
Transaction handling
Transaction Layer
Request retransmission
Transport Layer
Send/receive SIP message
Syntax & Encoding
Message parsing
TLS
UDP
TCP
Transport Protocol
SCTP
28
SIP Definitions
 Call
– A call is an informal term that refers to some communication between
peers, generally set up for the purposes of a multimedia conversation
– 각 Call들은 Call-ID 헤더로 구분
 Dialog
– A dialog is a peer-to-peer SIP relationship between two UAs that
persists for some time. A dialog is established by SIP messages, such
as a 2xx response to an INVITE request. A dialog is identified by a call
identifier, local tag, and a remote tag.
– 각 Dialog들은 Call-ID, From, To로 구분
 Transaction
– A SIP transaction occurs between a client and a server and comprises
all messages from the first request sent from the client to the server up
to a final (non-1xx) response sent from the server to the client.
– 각 Transaction들은 Call-ID, From, To, CSeq로 구분
29
UAC Behavior
 Generating the Request
 Sending the Request
 Processing Responses
30
UAS Behavior
 Method Inspection
 Header Inspection
 Content Processing
– Content-Type, Content-Language, Content-Encoding
 Applying Extensions
 Processing the Request
– INVITE, ACK, REGISTER, OPTIONS, BYE…
 Generating the Response
31
Registrar Behavior
 Register/Update/Delete
 Authentication
– Challenge : WWW-Authenticate Header
– Credential : Authorization Header
Bob
SIP Server
REGISTER F1
401 Unauthorized F2
REGISTER F3
200 OK F4
REGISTER sips:ss2.biloxi.example.com SIP/2.0
Via: SIP/2.0/TLS client.biloxi.example.com:5061;branch=z9hG4bKnashds7
Max-Forwards: 70
From: Bob <sips:[email protected]>;tag=a73kszlfl
To: Bob <sips:[email protected]>
Call-ID: [email protected]
CSeq: 1 REGISTER
Contact: <sips:[email protected]>
Content-Length: 0
32
SIP Proxy
 Call Stateful Proxy
– 콜이 종료될 때까지 관련 정보들을 유지
– 콜의 시작시점과 종료 시점 등에 대한 정보를 알 수 있어 과금등
이 용이
– Forking 가능
 Transaction Stateful Proxy
– 트랜잭션 단위로 관련 정보 유지
– Forking 가능
 Stateless Proxy
–
–
–
–
–
콜에 관련된 어떠한 정보도 유지 하지 않음
Request는 Location Server내에 유지된 주소로 전달
Response는 Via 헤더내 명기된 주소로 전달
빠른 처리 속도
Provisional Response 제공하지 않음.
33
Proxy Behavior
 Request Processing
–
–
–
–
Preprocessing Route Information
Determining Request Targets
Request Forwarding
Post-process routing information
 Response Processing
–
–
–
–
–
–
–
–
–
–
Find the appropriate response context
Update timer C for provisional response
Remove the topmost Via
Add the response to the response context
Check to see if this response should be forwarded immediately
When necessary, choose the best final response from the response
context
Aggregate authorization header field values if necessary
Optionally rewrite Record-Route header field calues
Forward the response
Generate any necessary CANCEL requests
34
SIP Vision
 VoIP (Voice/Video over IP)
– H.323, MEGACO 등과 함께 시장을 share
– SIP의 영역이 계속 확장 중
– 컨퍼런스
 IMPP (Instance Messaging & Presence Protocol)
– SIP기반 인스턴스 메신저
 홈 네트워킹
 3GPP/3GPP2
– 3GPP/3GPP2의 기본 시그널링 프로토콜로 채택
 ITU-T NGN (Next Generation Network)
– NGN의 기본시그널링 프로토콜로 채택
 OMA (Open Mobile Alliance)
– SIP기반 PTT 서비스
35
More to go…
 NAT 및 방화벽
– 여러 방법들이 제시되고 있으나 아직까지 완벽한 솔루션은 제공
되지 못하고 있음.
– UPnP/TURN/STUN/MIDCOM/ICE
 보안
– 시그널링 보안 : S/MIME, TLS
– 미디어 보안 : SRTP
 SPAM
 긴급통신
 Lawful Interception
 DTMF
– In-band
– Out-band
36
Examples & misc.
37
SIP Registration
38
SIP기반 음성 통화
39
SIP기반 음성 통화
40
IP-PSTN 통화
41
상호운용성 시험
 국내 Bake-off : ‘01.10. ’01.11.
 ION 2001 : ‘01.11.25~26
 IMTC/ETSI/TTC Winter Interop! : ‘01.12.3~7, 고베
(일본)
 10th SiPit (SIP Interoperability Testing) : ‘02.4.22 ~
26, 깐느 (프랑스)
 ION 2003 : ‘03.1.13~17, TTA
 12th SiPit : ‘03.2.24~28, 스톡홀름 (스웨덴)
 15th SIPit : ’04.08.22~27, 타이페이(대만)
 ION 2004 : ‘04.9.13~17, TTA
42
10th SIPit (Cannes, France)
43
12th SIPit (Stockholm, Sweden)
44
Q&A
45