Internet Voice, Video and Telepresence Harvard University, CSCI E-139 Lecture #5 Instructor: Len Evenchik len_evenchik@harvard.edu sip:len.evenchik@harvard.edu AT&T Dimension PBX, 1980 Lecture Agenda Welcome Course Logistics Q&A and Topics from Last Week SIP Systems and Protocols (part 3) SIP Interoperability (www.sipit.net) Telephone Support and SIP Trunking E.164 and Enum One Minute Wrap-Up (please complete online) (c) 2013 Len Evenchik (evenchik@fas.harvard.edu) Page 1
Course Logistics Course Logistics Lectures are now password protected. Information on the course project has been posted on the course website. Project Proposals are due on March 11 th. There are three parts to the project: Written report (10 to 15 pages) One page project summary (or a few slides) and a recorded video. This will be shared with your classmates. In-class project presentation and discussion (via video) Homework #1 is being graded and will be returned next week. Please complete a One-Minute Wrap Up each week! (c) 2013 Len Evenchik (evenchik@fas.harvard.edu) Page 2
Q&A and Topics from Last Week Finding a SIP Proxy Server via DNS (c) 2013 Len Evenchik (evenchik@fas.harvard.edu) Page 3
SIP Proxy Servers Many different Public and Private SIP Networks Private SIP Proxy Server Public SIP Proxy MIT SIP Proxy Server Private Network Cloud Firewall Internet MIT Network Cloud Alice Bryan Carlos Justin Doug Operator Finding a SIP Proxy Server Finding a SIP proxy server for a specific domain is comparable to finding a mail server for a specific domain. For example, a SIP call to bill@siplearn.com must be sent to the proxy server for siplearn.com domain, even though the user does not know the name (or address) of the proxy server. DNS provides this needed address information. SRV records configured by the administrator of the domain are used by proxy servers (or some standalone clients) to locate the target domain s SIP proxy server. NAPTR records can be used used to add flexibility by specifying the specific protocol to be used with the SRV (c) 2013 Len Evenchik (evenchik@fas.harvard.edu) Page 4
DNS SRV Query cmd% dig _sip._udp.siplearn.com SRV ;; QUESTION SECTION: ;_sip._udp.siplearn.com. IN SRV ;; ANSWER SECTION: _sip._udp.siplearn.com. 3600 IN SRV 1 1 5060 asterisk.siplearn.com. *** Then Another DNS lookup cmd% dig asterisk.siplearn.com ;; QUESTION SECTION: ;plasterisk.siplearn.com. IN A ;; ANSWER SECTION: asterisk.siplearn.com. 3600 IN A 99.139.xx.xx cmd% dig -t NAPTR mit.edu ;; QUESTION SECTION: ;mit.edu. IN NAPTR DNS NAPTR Query NO NAPTR record found Same result for harvard.edu cisco.com iptel.org etc cmd% dig -t NAPTR ingate.com ;; QUESTION SECTION: ;ingate.com. IN NAPTR ;; ANSWER SECTION: ingate.com. 3600 IN NAPTR 30 50 "s" "SIP+D2U" "" _sip._udp.ingate.com. ingate.com. 3600 IN NAPTR 20 50 "s" "SIP+D2T" "" _sip._tcp.ingate.com. (c) 2013 Len Evenchik (evenchik@fas.harvard.edu) Page 5
SIP Call Flow and DNS DNS MIT Proxy Server Internet Proxy Server Location Server Registrar Server Harvard.edu The Operator at MIT Invites len@harvard.edu Len (in a telepresence room) SIP Via Routing (c) 2013 Len Evenchik (evenchik@fas.harvard.edu) Page 6
SIP Proxy Servers Many different Public and Private SIP Networks Private SIP Proxy Server Public SIP Proxy Campus SIP Proxy Server Private Network Cloud Firewall Internet MIT Network Cloud Alice Bryan Carlos Justin Doug Operator SIP Trapezoid Atlanta.com Proxy biloxi.com Proxy Alice s softphone Bob s SIP phone INVITE F1 100 Trying F3 180 Ringing F8 200 OK F11 INVITE F2 INVITE F4 100 Trying F5 180 Ringing F6 180 Ringing F7 200 OK F9 200 OK F10 ACK F12 Media Sessions (RTP) BYE F13 200 OK F14 (source RFC 3261) (c) 2013 Len Evenchik (evenchik@fas.harvard.edu) Page 7
SIP Via Headers The Via headers are used to track the flow of SIP Requests through the network. This means SIP Proxies and other SIP devices, not routers or switches. A SIP Proxy that forwards a request adds its FQDN in a Via header. A branch parameter is included in the header to help match requests to responses. The Response can use this information so it follows the same path as the Request. This is not required. As the Response flows back to the originator, Via headers are removed. This information can be used for debugging. If you are a programmer you can think of this as a stack. SIP INVITE Message (F1) INVITE sip:bob@biloxi.com SIP/2.0 Via: SIP/2.0/UDP pc33.atlanta.com; branch=z9hg4bk776asdhds Max-Forwards: 70 To: Bob <sip:bob@biloxi.com> From: Alice <sip:alice@atlanta.com>;tag=1928301774 Call-ID: a84b4c76e66710@pc33.atlanta.com CSeq: 314159 INVITE Contact: <sip:alice@pc33.atlanta.com> Content-Type: application/sdp Content-Length: 142 (Alice's SDP not shown) (source RFC 3261) (c) 2013 Len Evenchik (evenchik@fas.harvard.edu) Page 8
SIP INVITE Message (F4) INVITE sip:bob@biloxi.com SIP/2.0 Via: SIP/2.0/UDP server10.biloxi.com ;branch=z9hg4bknashds8;received=193.4.22.3 Via: SIP/2.0/UDP bigbox3.site3.atlanta.com ;branch=z9hg4bk77ef4c2312983.1;received=192.0.2.2 Via: SIP/2.0/UDP pc33.atlanta.com ;branch=z9hg4bk776asdhds ;received=192.0.2.1 Max-Forwards: 70 To: Bob <sip:bob@biloxi.com> From: Alice <sip:alice@atlanta.com>;tag=1928301774 Call-ID: a84b4c76e66710@pc33.atlanta.com CSeq: 314159 INVITE Contact: <sip:alice@pc33.atlanta.com> Content-Type: application/sdp Content-Length: 142 (Alice's SDP not shown) (source RFC 3261) Call Forking (c) 2013 Len Evenchik (evenchik@fas.harvard.edu) Page 9
Call Forking Public SIP Proxy Server SIP Proxy Server (includes Registrar and other services) Company Network Cloud Bill is in a room with a telepresence system Internet Firewall Bill s mobile Bill s desktop Wei is calling Bill SIP Trapezoid with Forking Atlanta.com Proxy biloxi.com Proxy Wei s softphone Bill s SIP phones Multiple INVITEs INVITE F1 INVITE F2 100 Trying F3 Telepresence room Bill s mobile 100 Trying F5 Bill s desktop ACK F12 Media Sessions (RTP) BYE F13 (source RFC 3261) 200 OK F14 (c) 2013 Len Evenchik (evenchik@fas.harvard.edu) Page 10
SIP Signaling and Media Planes Signaling-plane versus Media-plane A fairly common approach in protocol design is to talk about a control plane and a data plane. Sometimes three different planes are described: a management plane, a control plane and a data plane. When working with SIP, we will typically talk about separate signaling planes and media planes. There is a simple mapping of this to the SIP trapezoid (c) 2013 Len Evenchik (evenchik@fas.harvard.edu) Page 11
SIP Trapezoid Atlanta.com Proxy biloxi.com Proxy Alice s softphone Bob s SIP phone INVITE F1 100 Trying F3 180 Ringing F8 200 OK F11 INVITE F2 INVITE F4 100 Trying F5 180 Ringing F6 180 Ringing F7 200 OK F9 200 OK F10 ACK F12 Media Sessions (RTP) BYE F13 200 OK F14 (source RFC 3261) SIP B2BUA Back-to-Back User Agent (c) 2013 Len Evenchik (evenchik@fas.harvard.edu) Page 12
B2BUA RFC 3261 talks about a Back-to-Back User Agent (B2BUA) as the logical concatenation of a User Agent Server (UAS) and User Agent Client (UAC). The industry talks about the B2BUA as being many different things depending on the vendor and the context for the discussion. It is helpful to think about SIP having a separate signaling-plane and media-plane when comparing a Proxy and a B2BUA. It is also helpful to consider the different types of operation that can happen within the media-plane. Asterisk acts as a B2BUA in some situations A taxonomy for this is defined in an ID http://tools.ietf.org/id/draft-kaplan-dispatch-b2bua-taxonomy-00.txt SIP Proxy versus B2BUA Private SIP Proxy Server Public SIP Proxy PROXY or B2BUA? Private Network Cloud Firewall Internet Private Network Cloud Alice Bryan Carlos Justin Doug Operator (c) 2013 Len Evenchik (evenchik@fas.harvard.edu) Page 13
SIP Testing and Interoperability www.sipit.net (c) 2013 Len Evenchik (evenchik@fas.harvard.edu) Page 14
SIP Transport Support (From www.sipit.net) Implementations using each transport for SIP messages: UDP 97% TCP 100% TLS 84% (24% server-auth-only) SCTP 8% DTLS 5% 55% of the implementations present supported IPv6. The data here is from SIPit 30, February 2013-58 attendees from 24 companies - 38 distinct implementations. SIP DNS Support (From www.sipit.net) For DNS we had support for: Full RFC3263 : 76% SRV only : 11% A/AAAA records only : 11% no DNS support : 0%: (source SIPit 30 held in February 2013) (c) 2013 Len Evenchik (evenchik@fas.harvard.edu) Page 15
SIP Feature Support (From www.sipit.net) Support for various items in the endpoints: 39% diversion 35% 3489stun 32% ice 32% 5389stun 32% turn 26% sip/stun multiplexing 26% history-info (no implementations of 4244bis) (source SIPit 29 held in October 2011) SIP Support for RTP and RTCP (From www.sipit.net) 100% of the implementations sent RTP from the port advertised for reception (symmetric-rtp). 90% of the UAs present both sent RTCP and paid attention to RTCP they received. 81% of the endpoints present supported SRTP using SDES. (SDP Security Description for SRTP) (source SIPit 30 held in February 2013) (c) 2013 Len Evenchik (evenchik@fas.harvard.edu) Page 16
What About the Telephone SIP Building Blocks Location Service Registrar Service Proxy Server Gateway Network Cloud POTS and Telephone Network Redirect Server Alice Carol (c) 2013 Len Evenchik (evenchik@fas.harvard.edu) Page 17
SIP Interoperability with the PSTN (POTS) and SIP Replacement of Legacy Services SIP or VoIP (i.e., Skype, proprietary protocol) as a replacement for your home telephone, or you mobile phone Supporting your POTS telephone on a SIP network (via an ATA) while keeping your current telephone number Using a SIP based PBX for your business or other organization. This typically means that you have some equipment at your location. SIP Trunking for connecting your conpany s PBX to the PSTN and other SIP networks. Your PBX could be SIP based or use a proprietary protocol. Network-based (cloud) SIP service SIP services provided by an Internet Telephone Service Provider (ITSP), a VoIP Service Provider, or an IP-Centrex service. (These names change.) SIP PBX: Asterisk Small and large organizations can easily install a SIP based PBX so that they have their voice and UC equipment on-site versus in the cloud. A very well known open source SIP PBX is called Asterisk. It is supported by a large ecosystem of equipment and service providers. It can run on a five year old laptop, as it is now doing in my office. Working with Asterisk is a great way to learn SIP and VoIP. POTS Access IP Network Internet Access SIP PBX Alice Carol (c) 2013 Len Evenchik (evenchik@fas.harvard.edu) Page 18
E.164 and ENUM E.164 and ENUM E.164 is the ITU standard for PSTN numbering. The number always starts with a country code. ENUM provides a mechanism to map E.164 telephone numbers to SIP addresses (or email addresses, or web sites, etc.) via the use of DNS The mechanism uses the.e164.arpa zone in the DNS. The management of this top level domain is done by RIPE. The website is www.ripe.net For example +16174951000 becomes? There are both public and private ENUM trees The future of public ENUM is unclear. However, the mechanism that it provides is very important and is being used in private networks. See RFC 5483 on ENUM Implementation and Experiences (c) 2013 Len Evenchik (evenchik@fas.harvard.edu) Page 19
www.ripe.net/enum/ http://enumquery.com (c) 2013 Len Evenchik (evenchik@fas.harvard.edu) Page 20
DNS ENUM Query For Telephone number +43 720 550383 fas% dig -t NAPTR 3.8.3.0.5.5.0.2.7.3.4.e164.arpa ; <<>> DiG 9.4.2-P2.1 <<>> -t NAPTR 3.8.3.0.5.5.0.2.7.3.4.e164.arpa ;; QUESTION SECTION: ;3.8.3.0.5.5.0.2.7.3.4.e164.arpa. IN NAPTR ;; ANSWER SECTION: 3.8.3.0.5.5.0.2.7.3.4.e164.arpa. 86400 IN NAPTR 10 100 "u" "E2U+sip" "!^(.*)$!sip:\\1@enum.sil.at!". One Minute Wrap-Up Please do this Wrap-Up at the end of each lecture. There is a form for this on the course website. The Wrap- Up can be anonymous. Please answer three questions: What is your grand Aha for today s class? What concept did you find most confusing in today s class? What questions should I address next time (c) 2013 Len Evenchik (evenchik@fas.harvard.edu) Page 21