• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Sip Fundamentals and Prospects Tutorial - VoiceCon Orlando 2010
 

Sip Fundamentals and Prospects Tutorial - VoiceCon Orlando 2010

on

  • 10,791 views

At VoiceCon Orlando 2010, Voxeo's Dan York taught a 3-hour tutorial about the Session Initiation Protocol (SIP) that was attended by over 200 people. The session explained the basics of SIP, walked ...

At VoiceCon Orlando 2010, Voxeo's Dan York taught a 3-hour tutorial about the Session Initiation Protocol (SIP) that was attended by over 200 people. The session explained the basics of SIP, walked through the message flow, discussed SIMPLE, SIP trunking and explored issues with distributed systems and federation.

http://blogs.voxeo.com/events/voicecon/

Please note that the slides were developed from a set of slides originally created by David Bryan of http://www.ethernot.org/ (used with his permission).

Statistics

Views

Total Views
10,791
Views on SlideShare
10,312
Embed Views
479

Actions

Likes
9
Downloads
733
Comments
5

12 Embeds 479

http://blogs.voxeo.com 294
http://www.asteriskcr.com 69
http://www.slideshare.net 41
http://asteriskcr.com 28
http://voip-cr.org 20
http://voipsystemscr.com 10
http://asteriskcr.blogspot.com 9
http://paper.li 3
http://translate.googleusercontent.com 2
http://www.voipsystemscr.com 1
http://webcache.googleusercontent.com 1
http://www.josetapia.net 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

15 of 5 previous next Post a comment

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • thanks alottttttttt
    Are you sure you want to
    Your message goes here
    Processing…
  • fantastic!
    Are you sure you want to
    Your message goes here
    Processing…
  • Excellent!
    Are you sure you want to
    Your message goes here
    Processing…
  • Very Cool,
    Are you sure you want to
    Your message goes here
    Processing…
  • brilliant!!!!!!!!
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Sip Fundamentals and Prospects Tutorial - VoiceCon Orlando 2010 Sip Fundamentals and Prospects Tutorial - VoiceCon Orlando 2010 Presentation Transcript

    • SIP Fundamentals VoiceCon Orlando 2010 Dan York, Director of Conversations, Voxeo March 23, 2010 With thanks to David Bryan of Cogent Force
    • Quick Survey – Who Are You?   Type of business: •  Enterprise? •  System integrator? reseller? •  Government? •  Other?   Have a SIP system today? Considering one?   SIP experience? •  I know how to spell it •  Worked with it a bit •  Wrote several of the SIP RFCs ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • About Dan York www.ietf.org www.voxeo.com www.sipforum.org blogs.voxeo.com/speakingofstandards www.disruptivetelephony.com www.7ducattacks.com ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • About Voxeo   Founded in 1999   World’s largest hosted VoiceXML and CCXML platform – Over 82,000 hosted ports globally; hundreds of premise deployments   Over 100,000 developers using Voxeo platforms   The Voxeo difference: Unlocked Communications, Customer Obsession Teams, Communications Passion   Services/software available for free: www.voxeo.com/free ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Voxeo - Built for VoIP Since Day One   100% SIP VOIP-based communications application platform •  Built from the ground up; natively SIP-based •  Other XML IVR platforms were built on a CT card-centric model with SIP added afterwards as a “virtual” or “emulated” CT card   Works with the widest variety of SIP providers, gateways, softphones and adapters   SIPMethod SIP Servlets Platform •  IM, Presence, Session Border Controller ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Voxeo: Design Once − Deploy Anywhere ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • A Quick Background
    • Some (brief!) Background on VoIP   Packet Switched, not Circuit switched •  There is no dedicated path that traffic follows •  Segmented into IP packets, sent to target, particular path not specified   Original telephone network was circuit switched (think of the operator w/wires) •  SS7, defined by the ITU (International Telecommunications Union) ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Circuit Switched Network There is a dedicated, fixed line (usually physically connected) between parties, and reserved for their use ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Packet Switched Network There is no physical connection. The call is chopped into packets, which are sent over a network of devices, perhaps using different paths ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Public Switched Telephone Network (PSTN) ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Today... ITSP ITSP ITSP ITSP ITSP ITSP ITSP ITSP Internet ITSP ITSP ITSP Telephony Service Provider ITSP ITSP PSTN ITSP ITSP ITSP ITSP ITSP ITSP ITSP ITSP ITSP ITSP ITSP ITSP ITSP ITSP ITSP ITSP ITSP ITSP ITSP ITSP ITSP ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Traditional Telephony 1.1  PSTN PBX Gateways Physical Voicemail Wiring ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • VoIP and Unified Communications 1.2  Mobile Devices IM Application Internet Servers Networks Operating Systems PSTN IP-PBX VoIP Gateways Web IP Social Firewalls Servers Network Networks Physical Directory Voicemail Wiring Servers Desktop Email PCs Database Servers CRM Servers Systems ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • VoIP Protocols   H.323 •  ITU defined VoIP protocol •  ITU is very formal, government oriented •  More “telephony” in nature than Internet   SIP •  IETF (Internet Engineering Task Force) defined protocol for general multimedia session establishment •  IETF is much less formal, individual oriented •  More “Internet” in nature than telephony ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • H.323 vs. SIP Feature H.323 SIP Encoding Binary Text Control Centralized server Endpoints (using proxy) Intelligence Most in central server; Most in the core endpoints; edge Modularity Monolithic (all in one Can be multiple server) servers Defined by ITU IETF Media RTP RTP ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • SIP Basics
    • SIP   Session Initiation Protocol   Defined (mostly) in IETF RFCs 3261-3264 •  Many other drafts extend SIP and add new features   Text based, very similar to HTTP, mail protocols   Establishes a media session between endpoints   Allows mobility – locate users using a SIP URI (sip:dyork@voxeo.com) •  Multiple endpoints can be associated with single SIP URI   Usually runs on port 5060, using UDP or TCP   Allows for IPv4 and IPv6 (Next generation mobile phones use SIP over TCP/IPv6) ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • SIP   Offers Event management (Subscribe/Notify) for presence etc.   Extended by SIMPLE to support IM (Instant Messaging)   Designed to allow easy interoperation with other Internet features such as WWW and email ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Why is SIP Important?   It’s all about standards   The promise of interoperable equipment •  A Nortel phone talking to a Cisco proxy to reach another user with an Avaya phone   Designed for the future •  Any media (voice, video, text, ???) •  Internet/endpoint centric design •  Easily extensible   SIP has become the dominant VoIP protocol ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Major Components of SIP   SIP systems specify components logically   There are several components specified •  UA (User-Agent, Endpoint) – the phone or application •  Registrar – keeps track of where the user is within a system •  Redirect Server – used to inform devices when they need to contact different locations •  Proxy Server – used to relay messages back and forth within the system   In practice, several logical functions may actually reside in the same physical server/program ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • User Agents   A User Agent (also called a UA, Phone, or Endpoint) represents a user of a SIP system •  A particular user may have more than one UA •  Can be hard device (fixed or mobile) or a “soft client” – an application running on a PC Hard Phone Mobile Hard Phone Soft Client ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • UAs and Proxies   Many things are really built on UAs •  Session Border Controllers are usually 2 UAs connected •  B2BUA or “Back-to-Back User Agent” •  (sometimes also an ALG -- special kind of firewall) •  Voice mail servers •  Interactive Voice Response systems   SIP Proxy •  Often what is sold as a proxy is really a Proxy/Registrar/ Redirect server •  Proxy is often part of IP-PBX, “call server”, etc.   “Softswitch” often incorporates all of this ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Basic SIP Call Flow 3.1  Proxy SIP SIP Alice Bob Media ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • SIP & Media Paths SIP SIP Proxy Proxy A SIP B SIP SIP Alice Bob Media (RTP, MSRP, etc.) ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Proxy Bob is over at bob-isp.com. I’ll proxy the call over there! “I need to call Bob!” sip.bob-office.com “Call here for Bob from Alice” “Call for you from Alice!” sip.bob-isp.com ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Registration “I’m Alice, and I’ll be using a When I get a phone at 192.168.0.1 today!” call for Alice, I’ll know to contact her at 192.168.0.1! 192.168.0.1 Registrar sip.cogentforce.com ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Registration SIP Registrar 1 SIP 2 SIP SIP Proxy Proxy A SIP B SIP SIP Alice Bob Media (RTP, MSRP, etc.) ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Redirection “I need to call Bob!” sip.cogentforce.com “Call here for “Call here Bob from Alice” for Bob from Alice” sip.bob-isp.com “Try him at bob-isp.com” sip.bob-office.com “Call for you from Alice!” ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • The Simple Picture SIP SIP Proxy Proxy A SIP B SIP SIP Alice Bob Media (RTP, MSRP, etc.) ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • The Complex Reality SIP SIP SIP SIP SIP Proxy Proxy Proxy Proxy Proxy A SIP B SIP C SIP D SIP N SIP Internet (or WAN) SIP Media Media Alice Proxy Proxy Bob Media A Media B Media ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • SIP Messages   SIP messages fall into two types – requests and responses   Requests include a method telling what it is they are doing. •  REGISTER, to register where to contact a user •  INVITE, to start a new session (call) •  BYE, to end a session that is established •  CANCEL, to end a session that is still being set up (no final response yet) •  ACK, part of the triple handshake •  Several others ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • SIP Messages   Responses are numeric, much like HTTP •  1xx Provisional – 100 Trying, 180 Ringing •  2xx Successful – 200 OK •  3xx Redirection – 301 Moved Permanently, 302 Moved Temporarily •  4xx Failure – 404 Not Found, 410 Gone, 403 Forbidden •  5xx Server Failure – 503 Service Unavailable •  6xx Global Failure – 600 Busy Everywhere ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Registration Call Flow SIP Server REGISTER 401 Unauthorized REGISTER 200 OK ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Basic Call Flow SIP Server INVITE INVITE 100 Trying 180 Ringing 180 Ringing 200 OK 200 OK ACK ACK Bi-directional Media between endpoints BYE BYE 200 OK 200 OK ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • No-answer Call Flow SIP Server INVITE INVITE 100 Trying 180 Ringing 180 Ringing CANCEL 200 OK CANCEL 200 OK 487 Request Terminated 487 Request Terminated ACK ACK ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • AORs and Contacts   In SIP, a registrar maps between an AoR and a contact •  AoR: Address of Record •  Permanent, something on your business card •  Not tied to a specific device •  sip:dyork@voxeo.com •  Contact •  Ephemeral, tied to a device •  sip:dyork@pc141.voxeo.com •  Being able to change AoR→Contact mapping allows mobility ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Registration, revisited “I’m Alice (alice@phonecompany.com), and I’ll be using a phone at 192.168.0.1 today!” 192.168.0.1 Registrar AoR → Contact Map: alice@phonecompany.com → alice@192.168.0.1 ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Registration, revisited “Lunch time! Mobile Time! (alice@phonecompany.com) will be using 10.0.1.1 now!” Registrar 10.0.1.1 AoR → Contact Map: alice@phonecompany.com → alice@10.0.1.1 ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • INVITE message INVITE sip:bob@bigcompany.com SIP/2.0 Via: SIP/2.0/TCP aliceua.phonecompany.com:5060 From: Alice <sip:alice@phonecompany.com>;tag=ss95cbav To: Bob <sip:bob@bigcompany.com> Call-ID: 3848276298220188511@aliceua.phonecompany.com CSeq: 1 INVITE Max-Forwards: 10 Contact: <sip:alice@aliceua.phonecompany.com;transport=tcp> …snip!... (Alice is going to call Bob…) ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • INVITE message INVITE sip:bob@bigcompany.com SIP/2.0 SIP request, method is INVITE, target is an AoR (for Bob) Via: SIP/2.0/TCP aliceua.phonecompany.com:5060 Via header tracks where it has been (more on this later) From: Alice <sip:alice@phonecompany.com>; tag=ss95cbav Message is from Alice, and this is the SIP URL for Alice. The tag is unique to this call and selected by Alice’s UA To: Bob <sip:bob@bigcompany.com> Alice is trying to contact Bob at his SIP URL (a tag will be selected by Bob’s UA later Call-ID: 3848276298220188511@aliceua.phonecompany.com Call-ID is a unique ID to track this particular call (selected by Alice’s UA) CSeq: 1 INVITE Used to track which responses go with which messages. Responses to this invite will also have a CSeq of 1 INVITE Max-Forwards: 10 Used in routing (more on this later) Contact: <sip:alice@aliceua.phonecompany.com;transport=tcp> How to contact Alice directly. Notice this is a contact (has a host) …snip… ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Calls and Dialogs   A call is an informal term for communication between two devices   A dialog is a more specific term, which defines a relationship between two UAs for a duration •  In many ways, this is what most people would think of as a call •  Defined by Call-ID, To tag, and From tag •  Sender selects Call-ID, and From tag •  Reciever selects To tag ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Transaction   A transaction defines a particular operation that is carried out between the endpoints •  Example: (INVITE) Set up the call, (BYE) end the call   Includes all responses (including the ACK)   May be several transactions within a dialog   Each transaction uses a new CSeq •  Command Sequence •  Chosen by the initiator of the transaction •  Each side must increase the CSeq for each new transaction they initiate – no specified starting point •  But since some transactions are initiated by each side, within a call it might look out of order ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Dialogs and Transactions SIP Server INVITE INVITE 100 Trying Transaction 1 180 Ringing 180 Ringing 200 OK Dialog/Call 200 OK ACK ACK Bi-directional Media between endpoints Transaction 2 BYE BYE 200 OK 200 OK ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Routing
    • The Complex Reality SIP SIP SIP SIP SIP Proxy Proxy Proxy Proxy Proxy A SIP B SIP C SIP D SIP N SIP Internet (or WAN) SIP Media Media Alice Proxy Proxy Bob Media A Media B Media ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Routing   Each entity forwards message along path to reach destination •  Places next destination into Request-URI (top line) •  Adds themselves as another Via •  Max-Forwards is decremented to prevent loops and limit the length of path •  if it reaches 0, the message isn’t forwarded again ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • INVITE message INVITE sip:bob@bigcompany.com SIP/2.0 Via: SIP/2.0/TCP aliceua.phonecompany.com:5060 From: Alice <sip:alice@phonecompany.com>;tag=ss95cbav To: Bob <sip:bob@bigcompany.com> Call-ID: 3848276298220188511@aliceua.phonecompany.com CSeq: 1 INVITE Max-Forwards: 10 Contact: <sip:alice@aliceua.phonecompany.com;transport=tcp> …snip!... Let’s see what happens as this message passes through the big company proxy on the way to Bob… ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • INVITE message INVITE sip:bob@bobua.bigcompany.com SIP/2.0 Via: SIP/2.0/TCP proxy.bigcompany.com:5060 Via: SIP/2.0/TCP aliceua.phonecompany.com:5060 From: Alice <sip:alice@phonecompany.com>;tag=ss95cbav To: Bob <sip:bob@bigcompany.com> Call-ID: 3848276298220188511@aliceua.phonecompany.com CSeq: 1 INVITE Record-Route: <sip:proxy.bigcompany.com;lr> Max-Forwards: 9 Contact: <sip:alice@aliceua.phonecompany.com;transport=tcp> …snip!... Notice the new URI, added VIA, and decremented Max-Forwards. This message is forwarded to Bob’s UA. ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Routing Responses   When Bob’s UA responds, it “unrolls” the Via headers to decide where to route the responses   The response traces the path back, sending the response to the Via address of the entity that sent the message (responding!)   That entity removes itself from the Via and passes the message along, unrolling until it reaches the sender   Notice that the proxy needs no state here ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • INVITE message INVITE sip:bob@bobua.bigcompany.com SIP/2.0 Via: SIP/2.0/TCP proxy.bigcompany.com:5060 Via: SIP/2.0/TCP aliceua.phonecompany.com:5060 From: Alice <sip:alice@phonecompany.com>;tag=ss95cbav To: Bob <sip:bob@bigcompany.com> Call-ID: 3848276298220188511@aliceua.phonecompany.com CSeq: 1 INVITE Record-Route: <sip:proxy.bigcompany.com;lr> Max-Forwards: 9 Contact: <sip:alice@aliceua.phonecompany.com;transport=tcp> …snip!... But one more here. What is record route? ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Record Route   Once a UA has the address of the other UA in the call, new messages can be sent directly between devices if they wish   Record route is a way for a proxy to request “keep me in the loop” •  Ensures that future transactions include this proxy, rather than going directly to the other UA ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Forking
    • Forking   While somewhat complicated, many features require “forking” •  Send a message to more than one entity Need to track (and manage both sides)   Parallel forking (send to more than one at a time) •  Ring both desk and mobile at once, cancel the call to whichever fails to pickup   Can also use redirection (sequential) •  Ring desk phone, then try mobile if no answer   Can combine •  Ring desk phone and mobile, then VM if no answer ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Parallel Forking time a SIP Server Desk Phone Caller time a Two devices are tried at the same Mobile time, time a ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Sequential Forking time a SIP Server Desk Phone Caller time b One device is tried at time a, then Voice Mail another at time b ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Parallel & Sequential Forking Desk Phone time a SIP Server time a Mobile Phone Caller time b Several devices are tried in parallel at time a, then forked to Voice Mail another at time b ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • SIP Trunking & PSTN Interconnection
    • Gateways   How about connecting to the outside world? •  If you want to talk to another SIP user, your proxy may know how to contact that user’s proxy directly, and the call is all SIP •  To call out to a regular phone (or to have calls come in) you use a gateway. It connects to one or more regular phone lines to let you receive and place calls to old fashioned “Plain Old Telephone Service” (POTS) •  Can also gateway between SIP and other protocols such as H.323, or to networks such as Skype ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Gateway example SIP Server Gateway SIP/IP network POTS network ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • SIP Trunking   Instead of using a local gateway, use SIP to connect to a remote gateway at a: •  Internet Telephony Service Provider (ITSP) •  SIP Service Provider •  (other names)   Create a “SIP Trunk” out to remote system •  NOT a physical connection like a TDM trunk. Purely a virtual connection from your premise system to the IP address of the ITSP.   Can be over public Internet or over WAN, dedicated lines or VPN ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Trunking before SIP Internet Carrier PSTN PBX Corp HQ  ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • SIP Trunking ITSP Internet PBX PSTN Corp HQ  ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • SIP Trunking – Multiple ITSPs ITSP 1 Internet PBX ITSP 2 PSTN Corp HQ  ITSP 3 ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • SIP Trunking - Failover PBX ITSP Corp HQ  Internet PSTN PBX Office  A  ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • SIP Trunking - Geography ITSP (Boston) Internet PBX ITSP (Paris) PSTN Corp HQ  ITSP (Tokyo) ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • SIP Trunking - SIPconnect   Initiative of the SIP Forum to increase interoperabilty between on-premise systems and SIP service providers   Idea is that a “SIPconnect-compliant” IP-PBX will more easily be able to connect to a “SIPconnect-compliant” SIP service provider   http://www.sipforum.org/sipconnect ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • The Many Protocols Used In SIP
    • The (Many) Protocols in a “SIP” Call UA UA SIP Server SIP/SDP SIP/SDP Media (RTP/RTCP) ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • SIP, SDP, and RTP   SIP is only a part of the picture   SIP is used to establish the multimedia session   SIP messages don’t describe the type of media themselves •  Embed another protocol called SDP   Yet another protocol, RTP (and RTCP), is used to actually stream the media between the devices ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Codecs (encoding)   The media that flows using RTP is encoded using a codec   Codec is about how the audio has been converted to packets •  Example: g.711, g.729, GIPS •  In general, higher quality = more network bandwidth •  Codec to be used, and any parameters to be used are described in SDP ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • SDP/RTP   Both of these are older IETF protocols used by SIP •  IETF tries to promote reuse whenever possible   Session Description Protocol •  Used by SIP to describe the media format, encoding, destination, etc. •  Included in SIP message as a payload   Real-time Transport Protocol •  Used to transport the encoded media across the wire •  Can be used for media other than voice ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • INVITE message INVITE sip:bob@bigcompany.com SIP/2.0 Via: SIP/2.0/TCP aliceua.phonecompany.com:5060 From: Alice <sip:alice@phonecompany.com>; tag=ss95cbav To: Bob <sip:bob@bigcompany.com> Call-ID: 3848276298220188511@alicaua.phonecompany.com CSeq: 1 INVITE Contact: <sip:alice@aliceua.phonecompany.com;transport=tcp> Content-Type: application/sdp Content-Length: 134 v=0 o=CogentForce-UA 10010 605 IN IP4 aliceua.phonecompany.com s=SIP Call c=IN IP4 192.0.1.1 t=0 0 m=audio 49172 RTP/AVP 0 8 16 ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • INVITE message <snip!> Content-Type: application/sdp Content-Length: 134 The content of the message is SDP – to describe the media of the call. We have 134 bytes of SDP v=0 v is the SDP version number -- 0 o=CogentForce-UA 10010 605 IN IP4 aliceua.phonecompany.com o is a description of the UA and a session ID s=SIP Call s is an string to encode a name for this session c=IN IP4 192.0.1.1 c tells the other side what address to send the media to t=0 0 t indicates start and end times. 0 and 0 don’t specify times in advance m=audio 49172 RTP/AVP 0 8 16 m describes the media. We are listening for audio of type RTP/AVP on port 49172 ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Offer/Answer   Different UAs may support different codecs   Calling UA lists what it supports and is willing to use in the INVITE message SDP   Called UA responds with the subset of that it is willing to use in the response SDP (200 OK)   If nothing in common, can’t communicate and call is rejected   Mechanisms exist to change this mid call (for example, switching from audio to video) ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Instant Messaging / SIMPLE
    • Instant Message and Presence   SIP has a set of extensions called SIMPLE •  SIMPLE: SIP for Instant Messaging (IM) and Presence Leveraging Extensions •  Send text messages between devices •  Can switch between text and voice •  session is all SIP •  Presence (ability to see “status” of other user) is also supported (and persistent on server) •  Idle, Offline, Available, Busy, Offline till Monday… ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Instant Message and Presence   MESSAGE method used to send text messages   SUBSCRIBE to express an interest, “subscribe” to someone’s status   PUBLISH to change your status on the presence server   NOTIFY is send from server to those who have subscribed ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Extending SIP   SIMPLE isn’t the only extension   SIP was designed from the beginning to be highly extensible   Can add new methods, new responses, headers   Groups in the RAI (Realtime Applications and Infrastructure) area at IETF determine what is really an accepted “standard” extension •  SIPCORE, DISPATCH, SIMPLE, and others   Many vendors add non-interoperable “extensions” to SIP •  These may not work across different vendor platforms ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • NAT / Firewall Traversal
    • NAT/FW Traversal   SIP has traditionally had some trouble getting through firewalls (FWs) and Network Address Translators (NATs)   Two major causes •  NATs use “private” IP addresses, not routable from the outside •  SIP embeds these, outside entity has no way to respond •  SIP and RTP (the media) are on different “ports” •  Each requires a specific forwarding through the firewall to work and must be opened separately ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Firewalls and Media A UA Contacts another UA (or a proxy), sending SIP messages. The process of sending the message (on most NATs/FWs) creates a mapping that allows responses to reach the sender SIP ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Firewalls and Media Media (RTP) is on a different port (different opening in the FW) than SIP It is possible that at the time the media is sent, it is rejected by the firewall RTP ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • NAT/FW Traversal   Several Solutions •  IETF efforts •  STUN, TURN and ICE •  Query outside servers to find out “public” address •  Can use media relays to help get media between two hosts behind firewalls •  Session Border Controllers (SBCs) •  Sit near (or in) the firewall/NAT, rewrite the internals of the packets, work with firewall to open ports ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Session Border Controllers   Implemented either as special firewall/ALG that modify the packets (deep-packet inspection) or as a B2BUA •  B2BUA can be thought of as a special SIP-to-SIP gateway or as two UAs “glued together”, where each side is a separate call   Can be used for •  NAT Traversal •  Protocol “correction” •  Demarcation point •  Codec translation   Generally handles both media and signalling ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Session Border Controller SIP Server SIP Server Session Border Controller (SBC) SIP/IP network SIP/IP network ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Peer-To-Peer SIP
    • Peer-to-Peer (P2P) SIP   Alternate way to deliver SIP   Basic idea – reduce or completely eliminate the central servers (proxy/softswitch)   Most or all functionality is moved to the UA   Highly scalable, so good for very small deployments (no infrastructure) and internet-wide deployments ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Client/Server Session In a Client/Server session, two nodes must use a central server to communicate ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • P2P Session In a Peer-to-Peer session, when two nodes communicate, a few other nodes, rather than a central server, help complete the call ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Distributed Systems
    • Home Teleworkers 7.1  PC UC Home System Firewall Internet Firewall IP Corp HQ  Phone Home  ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Mobile Workers Laptop UC client WiFi UC System Firewall Internet Café Router Corp HQ  Mobile Data Network Mobile UC client ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Intra-company and Cloud Corporate Internet Network IVR Voicemail IM IM IM Presence Presence Presence Call Call Call Control Control Control Corp HQ  Office A  Office B  PSTN ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Inter-company Federation Internet Corporate Corporate Network Network UC UC UC UC System System System System Corp HQ  Office A  Corp HQ  Office A  Company A  Company B  ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Resources
    • Some Good SIP Webpages   Tech-Invite (www.tech-invite.com) is a great source for general SIP information with many beautiful color illustrations   SIP Forum has many links to more info (www.sipforum.org)   RFC 5411, “The Hitchhiker’s Guide to SIP” (tools.ietf.org/html/rfc5411)   SIP Tutorial at iptel.org, (www.iptel.org/tutorial)   IETF information can be found at www.ietf.org and www.softarmor.com   P2PSIP.org (www.p2psip.org) is the community site for P2PSIP   “Speaking of Standards” blog (blogs.voxeo.com/speakingofstandards) ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Books on SIP   Internet Communications Using SIP, Henry Sinnreich and Alan B. Johnston, Wiley Networking Council Series, 2006 (second edition)   SIP: Understanding the Session Initiation Protocol, Alan B. Johnston, Artech House, 2004   SIP Beyond VoIP, Henry Sinnreich, Alan B. Johnston and Robert J. Sparks, VON Publishing, 2005   SIP Demystified, Gonzalo Camarillo, McGraw-Hill Telecom Series, 2002 ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation
    • Acknowledge/Thanks   Thanks to those who have worked on SIP over the years, presented SIP tutorials, or written SIP books! ©© Voxeo Corporation (www.v o x e o .com) and David Bryan (www.e t h e r n o t .org) Voxeo Corporation