Session Initiation Protocol (SIP)
Speaker: Yuan-Po ShenDate: 2012/07/16
What Is SIP?
• A signaling protocol – Create, modify, terminate a multimedia session
• For Voice over Internet Protocol (VoIP) communication, use port 5060
• Defined in RFC (Request For Comments) 3261• A client-server architecture– User Agent Server (UAS)– User Agent Client (UAC)– User Agent (UA) = UAS + UAC
2
What Is SIP? (cont’d)SIP addressing (Uniform Resource Indicator)
sip:[email protected](SIP-URI)sip:Sampo@[2001:e10:6840:21:20c:29ff:fe13:b1d]
SIP request methodsREGISTER, {INVITE, BYE, CANCEL, ACK}, OPTIONS
SIP request syntaxINVITE [email protected] SIP/2.0
SIP response status code 100 Trying, 200 OK, 302 Moved temporarily, 403
Forbidden
3
What Is SIP (cont’d)
• Work with – Session Description Protocol (SDP)• c = connection information, ex: c = IN IP4 163.22.21.194• m = media description, ex: m = audio 7078 RTP/AVP 0 • a = media attribute, ex: a = rtpmap:0 PCMU/8000/1
– Real-time Transport Protocol (RTP)
4
SIP SDP
RTP
SIP Call Flow (UA to UA)
5
Three Types of Server
• Proxy server– Accept requests/responses and forward them
onward
• Registrar– Provide a server with an address at which the user
can be reached for SIP sessions
• Redirect server– Response with a alternative contact address
6
Can be installed on the same device
Proxy Server
7
Registrar
8
Redirect Server
9
SIP Call through Proxy Server
10
Conversation
Call Forking
11
INVITEINVITE
INVITE
OK
OKCANCEL
Conversation
SIP - Instant Message (IM)
• Defined in RFC 3428 • MESSAGE method
12
References
• http://xms.ipv6.club.tw/xms/index.php?view=content_show&id=1015 2009 lab orientation session
• Daniel Collins, “Carrier Grade Voice over IP,” McGraw-Hill, September 2002
• “Session Initiation Protocol,” IETF RFC 3261, June 2002
13
X-Lite / Linphone
X-Lite
15
Show Menu
16
Account Setting (cont’d)
17
Account Setting (cont’d)
18
Account Setting (cont’d)
19
Register Successfully
20
Make A Call
21
Terminate A Call
22
Send Instant Message
23
Send Instant Message (cont’d)
24
Linphone
25
References
• http://www.counterpath.com/assets/files/191/X-Lite3.0_UserGuide.pdf X-Lite user guide
• http://www.linphone.org/index.php/eng/getting_started Linphone startup guide
26
Exercises
1. 分別以 IPv4透過 X-Lite註冊以及使用 IPv6透過 Linphone註冊 SIP Server:
1. IPv4:10.21.21.1972. IPv6: 2001:e10:6840:21:20c:29ff:fe13:b1d
2. 通話並且用Wireshark抓下封包觀察封包內容
27
• http://voip.com.ncnu.edu.tw/Summer2012/sip/oi_x-lite_win32_41_63214exe.exe
• http://voip.com.ncnu.edu.tw/Summer2012/sip/linphone-3.5.2-setup.exe
28