SIPping from the Open Source Well Matthew Bynum UC Architect
A little about me Matthew Bynum • Dabbler in Unified Communications for 12 years • CCIE Voice #21753 • Installed my first Linux distro at age 17 (RedHat 5.0) • Open Source lover, amateur maker, forestry nerd http://gplus.to/mbynum http://www.linkedin.com/in/mattbynum/
Agenda • SIP History • Why SIP matters (SIP and DNS) • Inside the SIP spec • Open Source (and one proprietary) SIP options • What the future entails
SIP is a protocol for establishing sessions in an IP network.
SIP History Glory is fleeting, but obscurity is forever. - Napoleon Bonaparte
Setting the Stage The Internet Engineering Task Force first met in 1986. “The mission of the IETF is to make the Internet work better by producing high quality, relevant technical documents that influence the way people design, use, and manage the Internet. “ - http://www.ietf.org/about/mission.html TCP UDP dhcp TELNET IGMP ICMP FTP ECHO POP3 OSPF RIP http://tools.ietf.org/html/rfc5000
IETF Meetings 1 Create Descr.: DNS Discussion San Fran Orig.: John Doe j.doe@com.com Info: http://www.com.com The First IETF Audiocast Start: 04.04.2001 / 09.30 End: 04.20.2001 / 16:30 occurred in 1992. A Media: Audio GSM 224.1.6.7/49000 Media: Video H.263 224.1.6.8/49100 method was needed 2 to disseminate the Disseminate SAP/NNTP/HTTP meeting invites. Invite SMTP/SIP 3 Join PC/Telephone 4 Media PC/Telephone
Session Invitation Simple Conference Invitation Protocol Protocol by Mark Handley and Eve Schooler by Henning Schulzrinne SUCCESS UNKNOWN CALL 1xx UNSUCCESSFUL FAILED CHANGE 2xx BUSY FORBIDDEN CLOSE 3xx DECLINE RINGING 4xx RINGING NEGOTIATE 5xx TRYING REDIRECT ALTERNATIVE TCP/SCIP UDP/SDP
Session Invitation Simple Conference Invitation Protocol Protocol SCIP/1.0 302 Callee has moved temporarily SIP/1.0 REQ Location: jones@salt.lab3.company.com PA=128.16.65.19 16 Location: jones@pepper.lab3.company.com AU=none CALL hgs@lupus.fokus.gmd.de 1.0 ID=128.16.65.19/32492374 User-Agent: coco/1.3 FR=M.Handley@cs.ucl.ac.uk From: Christian Zahl <cz@cs.tu-berlin.de> TO=J.Crowcroft@cs.ucl.ac.uk To: Henning Schulzrinne <schulzrinne@fokus.gmd.de> v=0 Call-Id: 9510021900.AA07734@lion.cs.tu- o=van 2353644765 2353687637 IN IP4 berlin.de 128.3.4.5 Referer: ceres.fokus.gmd.de s=Mbone Audio Expires: Mon, 02 Oct 1995 18:44:11 GMT i=Discussion of Mbone Engineering Issues Required: fc99cb08 audio/pcmu; port=3456; e=van@ee.lbl.gov (Van Jacobsen transport=RTP; c=IN IP4 224.2.0.1/127 rate=16000; channels=1; pt=97; net=224.2.0.1; t=0 0 ttl=128, audio/gsm; port=3456; transport=RTP; m=audio 3456 RTP PCMU rate=8000; channels=1, audio/lpc; port=3456; transport=RTP; rate=8000; channels=1
Papa SIP “Personal Mobility for Multimedia Services in the Internet” by Henning Schulzrinne , March 1996 http://www.cs.columbia.edu/~hgs/papers/Schu9603_Personal.pdf Creator of RTP http://www.cs.columbia.edu/~hgs/
The Internet Architect SIP (RFC 2543, RFC 3261); SDP (RFC 2327; SAP, RFC 2974); Protocol Independent Multicast-Sparse Mode (PIM-SM, RFC 2362), TCP-Friendly Rate Control (TFRC, RFC 3448), Multicast-Scope Zone Announcement Protocol (MZAP, RFC 2776), Multicast Address Allocation (RFC 2908, RFC 2909), TCP Congestion Window Validation ( RFC 2861), Reliable Multicast ( RFC 3451, RFC 3452, RFC 3453, RFC 3048), Datagram Congestion Control Protocol ( RFC 4340, RFC 4336). Mark Handley Founder of XORP (www.xorp.org) Creator of SDP http://www.cs.ucl.ac.uk/staff/M.Handley/
SIP Drafts http://www.cs.columbia.edu/sip/history.html Date Draft Name December 2, 1996 draft-ietf-mmusic-sip-01 March 27, 1997 draft-ietf-mmusic-sip-02 July 31, 1997 draft-ietf-mmusic-sip-03 November 11, 1997 draft-ietf-mmusic-sip-04 May 14, 1998 draft-ietf-mmusic-sip-05 June 17, 1998 draft-ietf-mmusic-sip-06 July 16, 1998 draft-ietf-mmusic-sip-07 August 7, 1998 draft-ietf-mmusic-sip-08 September 18, 1998 draft-ietf-mmusic-sip-09 September 28, 1998 Last call November 12, 1998 draft-ietf-mmusic-sip-10 December 15, 1998 draft-ietf-mmusic-sip-11 January 16, 1999 draft-ietf-mmusic-sip-12 February 2, 1999 Approved March 17, 1999 RFC 2543
SIP Today http://tools.ietf.org/html/rfc5411 RFC 3261 (SIP: Session Initiation Protocol) Don’t RFC 3263 (Session Initiation Protocol (SIP): Locating SIP Servers) RFC 3264 (An Offer/Answer Model with Session Description Protocol (SDP)) RFC 3265 (Session Initiation Protocol (SIP)-Specific Event Notification) RFC 3325 (Private Extensions to SIP for Asserted Identity within Trusted Networks) RFC 3327 (SIP Extension Header Field for Registering Non-Adjacent Contacts) RFC 3581 (An Extension to SIP for Symmetric Response Routing) RFC 3840 (Indicating User Agent Capabilities in SIP) RFC 4320 (Actions Addressing Issues Identified with the Non-INVITE Transaction in SIP) RFC 4474 (Enhancements for Authenticated Identity Management in SIP) GRUU (Obtaining and Using Globally Routable User Agent Identifiers (GRUU) in SIP) Panic ! OUTBOUND (Managing Client Initiated Connections through SIP) RFC 4566 (Session Description Protocol) SDP-CAP (SDP Capability Negotiation) ICE (Interactive Connectivity Establishment) RFC 3605 (Real Time Control Protocol (RTCP) Attribute in the Session Description Protocol) RFC 4916 (Connected Identity in the Session Initiation Protocol (SIP)) RFC 3311 (The SIP UPDATE Method) SIPS-URI (The Use of the SIPS URI Scheme in the Session Initiation Protocol (SIP)) RFC 3665 (Session Initiation Protocol (SIP) Basic Call Flow Examples) A Hitchhiker's Guide to the Session Initiation Protocol (SIP)
Alternative protocols… • Q.931 (TDM) • H.323 (IP)
Why SIP is kind of a big deal
It’s all about the decentralization 2. Where is the SIP server for linuxcon.com? 20.20.20.20 and port 5061 DNS 4. INVITE is forwarded to the user bob, who 1. answers, and the media Internet is established between Alice places call to bob@linuxcon.com. Alice and Bob. 3. INVITE is sent to bob@linuxcon.com alice@atlanta.com atlanta.com 20.20.20.20 addressed linuxcon.com to bob@linuxcon.com SIP Proxy 20.20.20.20 SIP Proxy SIP DNS Media
SIP and DNS (RFC 3263) • Use DNS SRV records for determining what servers provide SIP services for a domain (internal and external) sipserver A 10.0.0.1 ; SRV’s _sips._tcp IN SRV 50 1 5061 sipserver.yourdomain.com. _sip._tcp IN SRV 90 1 5060 sipserver.yourdomain.com. _sip._udp IN SRV 100 1 5060 sipserver.yourdomain.com. ; NAPTR IN NAPTR 50 50 "s" "SIPS+D2T" "" _sips._tcp.yourdomain.com. IN NAPTR 90 50 "s" "SIP+D2T" "" _sip._tcp.yourdomain.com. IN NAPTR 100 50 "s" "SIP+D2U" "" _sip._udp.yourdomain.com.
SIP and DNS (cont.) • Use ENUM records for determining what URI a full E.164 number should map to • Politics restrict this from being a viable option. Screenshot from the ITU website: ; NAPTR for calling +12561234567 $ORIGIN 7.6.5.4.3.2.1.6.5.2.1.e164.arpa. IN NAPTR 100 10 “u" "E2U+sip" “!^.*$! sip:bob@linuxcon.com !” .
Inside SIP
User Agents Client Server TCP or UDP port 5060 TLS on port 5061
SIP Methods METHOD DESCRIPTION INVITE Session setup ACK Acknowledgement of final response to INVITE BYE Session termination CANCEL Pending session cancellation REGISTER Registration of a user’s URI OPTIONS Query of options and capabilities INFO Mid-call signaling transport PRACK Provisional response acknowledgement UPDATE Update session information REFER Transfer user to a URI SUBSCRIBE Request notification of an event NOTIFY Transport of subscribed event notification MESSAGE Transport of an instant message body PUBLISH Upload presence state to a server
SIP Responses Status Message 100 Trying 180 Ringing CLASS DESCRIPTION 183 Session Progress 200 OK 1xx Provisional or Informational 300 Multiple Choices 2xx Success 302 Moved Temporarily 305 Use Proxy 3xx Redirection 400 Bad Request 4xx Client Error 401 Unauthorized 402 Payment Required 5xx Server Error 403 Forbidden 6xx Global Failure 404 Not Found 500 Internal Server Error 501 Not Implemented 502 Bad Gateway
SIP Roles Element Function Proxy Responsible for routing Registrar Accepts REGISTER request from endpoints Redirect Generates 3xx responses Back to Back User Terminates SIP dialogs from UAC and creates Agent (B2BUA) new dialog to end destination Session Border Demarcation between disparate networks Controller (SBC) Media Gateway Media translation
SIP Element Examples Service Provider Registrar/B2BUA SBC Proxy Media Gateway Redirect SIP TDM
Basic Call Flow Phone B Phone A INVITE 180 Ringing 200 OK ACK Media BYE 200 OK
Call Flow with Proxy Phone (Client) Proxy (Server/Client) Phone (Server) INVITE INVITE 100 Trying 180 Ringing 180 Ringing 200 OK 200 OK ACK Media BYE 200 OK
Recommend
More recommend