290 likes | 709 Views
Session Initiation Protocol (SIP). Speaker: Yuan-Po Shen Date: 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
E N D
Session Initiation Protocol (SIP) Speaker: Yuan-Po Shen Date: 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
What Is SIP? (cont’d) • SIP addressing (Uniform Resource Indicator) • sip:Sampo@10.21.21.197(SIP-URI) • sip:Sampo@[2001:e10:6840:21:20c:29ff:fe13:b1d] • SIP request methods • REGISTER, {INVITE, BYE, CANCEL, ACK}, OPTIONS • SIP request syntax • INVITE Sampo@10.21.21.197 SIP/2.0 • SIP response status code • 100 Trying, 200 OK, 302 Moved temporarily, 403 Forbidden
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) SIP SDP RTP
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 Can be installed on the same device
SIP Call through Proxy Server Conversation
Call Forking INVITE INVITE INVITE OK CANCEL OK Conversation
SIP - Instant Message (IM) • Defined in RFC 3428 • MESSAGE method
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
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
Exercises • 分別以IPv4透過X-Lite註冊以及使用IPv6透過Linphone註冊SIP Server: • IPv4:10.21.21.197 • IPv6: 2001:e10:6840:21:20c:29ff:fe13:b1d • 通話並且用Wireshark抓下封包觀察封包內容
http://voip.com.ncnu.edu.tw/Summer2012/sip/oi_x-lite_win32_41_63214exe.exehttp://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