Introduction to SIP Alan B. Johnston and Henry Sinnreich San Jose, March 17 2008 SIP and P2P Tutorial part 1
Session Initiation Protocol Overview <ul><li>Application Layer Signaling Protocol </li></ul><ul><li>“ Rendezvous” Protocol...
The Internet Hourglass Protocol Architecture Putting on weight: QoS, MPLS Midlife crisis: Too many interfaces (SONET, ATM,...
Internet End-to-End Control User has little control Walled gardens and  central network control:  POTS, X.25, ISDN, BISDN,...
A Short History of SIP <ul><li>Internet Engineering Task Force (IETF) protocol  </li></ul><ul><li>Inventors: M. Handley, H...
SIP “Rendezvous” Functionality <ul><li>Locate another SIP device </li></ul><ul><li>Locate a SIP server to facilitate the f...
SIP Requests <ul><li>SIP Requests are called “methods” </li></ul><ul><li>Examples: </li></ul>
SIP Responses <ul><li>SIP Responses have a numerical part and a reason phrase </li></ul><ul><li>First digit of code indica...
SIP Uniform Resource Indicators (URIs) <ul><li>Same form as email addresses: user@domain </li></ul><ul><li>Two URI schemes...
Related Protocols <ul><li>SDP – Session Description Protocol </li></ul><ul><ul><li>Used to describe media session. </li></...
SIP Element Types <ul><li>User Agent (UA) </li></ul><ul><ul><li>PSTN Gateway </li></ul></ul><ul><ul><li>Minimal capabiliti...
SIP Call Flow Example Proxy proxy.aol.com 200 OK 200 OK Proxy server.munich.de BYE Media Session ACK UA sip:schroed5422@ao...
SIP Message Details <ul><li>INVITE sip:wh@200.201.202.203 SIP/2.0 </li></ul><ul><li>Via: SIP/2.0/UDP proxy.munich.de:5061;...
SIP Message Details <ul><li>INVITE sip:w.h@200.201.202.203 SIP/2.0 </li></ul><ul><li>Via: SIP/2.0/UDP proxy.munich.de:5061...
SIP Message Details <ul><li>INVITE sip:w.h@200.201.202.203 SIP/2.0 </li></ul><ul><li>Via: SIP/2.0/UDP proxy.munich.de:5061...
SIP Message Details <ul><li>INVITE sip:w.h@200.201.202.203 SIP/2.0 </li></ul><ul><li>Via: SIP/2.0/UDP proxy.munich.de:5061...
SIP Message Details <ul><li>CSeq  Command Sequence Number </li></ul><ul><ul><li>Initialized at start of call ( 1  in this ...
SIP Message Details <ul><li>INVITE sip:w.h@200.201.202.203 SIP/2.0 </li></ul><ul><li>Via: SIP/2.0/UDP proxy.munich.de:5061...
SIP Message Details <ul><li>Content-Type   indicates the type of message body attachment (others could be  text/plain ,  a...
SDP Message Body Details <ul><li>v=0 </li></ul><ul><li>o=schroed5244 289084526 28904529 IN IP4 100.101.102.103 </li></ul><...
SIP Response Details <ul><li>Via ,  To ,  From ,  Call-ID , &  CSeq  are all copied from request.   </li></ul><ul><ul><li>...
Example SIP Header Fields
SIP Capability Discovery <ul><li>SIP has strong capability discovery. </li></ul><ul><li>Using  OPTIONS  inside or outside ...
SIP Extensions and Features <ul><li>Method Extensions </li></ul><ul><ul><li>Unknown methods rejected by UA using  405  or ...
SIP Message Body Types
Successful Session Establishment Through One Proxy INVITE  F1 INVITE  F2 100 (Trying)  F3 180 (Alerting)  F4 180 (Alerting...
Successful Session Establishment Through P2P SIP Both way RTP media Progress tone Ring back Call is accepted Dialog state ...
SIP and PSTN Interworking <ul><li>Gateways interwork SIP with PSTN </li></ul><ul><ul><li>Signaling: SIP to ISUP (or ISDN D...
SIP dialogs and routes <ul><li>Dialog: P2P SIP relationship between 2 UAs </li></ul><ul><li>  Sequencing and routing betwe...
Tags and branches in SIP routing with two proxies Alice Proxy 1 Proxy 2 Bob F1  INVITE F2  INVITE F3  INVITE F6  100 F4  1...
SIP-T ISUP Messages are carried as  multipart MIME message  bodies  in the SIP messages between the SIP-T Gateways. (RFC 3...
Digest Challenge/Response SIP User Agent 1  INVITE Proxy Server 3 ACK 4  INVITE Proxy-Auth:1 5 100 Trying 17 200 OK Authen...
SIP Digest Example <ul><li>INVITE sip:913145551212@siptest.mci.com SIP/2.0  </li></ul><ul><li>From: sip:alan.johnston@sipt...
SIP Media Negotiation – The Offer Answer Model <ul><li>Media Session negotiation is handled using Offer Answer model  </li...
The Ecologic System of SIP SIP XCAP (config) RTSP SIMPLE Presence+IM policy RPID … . SDP XCON (conferencing) STUN/TURN/ICE...
Upcoming SlideShare
Loading in …5
×

Sinnreich Henry Johnston Alan Pt 1

1,599 views

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,599
On SlideShare
0
From Embeds
0
Number of Embeds
15
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • Sinnreich Henry Johnston Alan Pt 1

    1. 1. Introduction to SIP Alan B. Johnston and Henry Sinnreich San Jose, March 17 2008 SIP and P2P Tutorial part 1
    2. 2. Session Initiation Protocol Overview <ul><li>Application Layer Signaling Protocol </li></ul><ul><li>“ Rendezvous” Protocol </li></ul><ul><ul><li>Used to establish, modify, and terminate multimedia sessions </li></ul></ul><ul><li>Part of Internet Multimedia Architecture </li></ul><ul><li>Can use a variety of transports </li></ul><ul><ul><li>UDP, TCP, TLS, SCTP, etc. </li></ul></ul><ul><li>Based on HTTP (Web) </li></ul><ul><ul><li>Similar text-based structure </li></ul></ul><ul><ul><li>Uses URIs (Uniform Resource Indicators) </li></ul></ul><ul><li>Applications include (but not limited to): </li></ul><ul><ul><li>Voice, video, gaming, instant messaging, presence, call control, etc. </li></ul></ul>
    3. 3. The Internet Hourglass Protocol Architecture Putting on weight: QoS, MPLS Midlife crisis: Too many interfaces (SONET, ATM, frame relay) http://www.cs.columbia.edu/~coms6181/slides/1/internet.ppt L5: Application L4: Transport L3: Network L2: Data Link L1: Physical Copper Fiber Wireless Ethernet PPP IP UDP SMTP RTP SIP TCP HTTP Applications are not dependent on the network and transport layers
    4. 4. Internet End-to-End Control User has little control Walled gardens and central network control: POTS, X.25, ISDN, BISDN, FR, ATM, GSM, H.323, H.248, 3GPP, TISPAN, NG… Central Control USER USER Central Control Central Control UNI NNI NNI UNI Services supported by interfaces and central controllers Central Control in Telecom Networks USER USER Elective Server Elective Server Internet “ Dumb Network” R R R User has control of all applications and choice of servers All services enabled by protocols: From ftp to web No single point of failure R
    5. 5. A Short History of SIP <ul><li>Internet Engineering Task Force (IETF) protocol </li></ul><ul><li>Inventors: M. Handley, H. Schulzrinne, E. Schooler, and J. Rosenberg </li></ul><ul><li>Became “Proposed Standard” and RFC 2543 in March 1999 in MMUSIC WG. </li></ul><ul><li>Separate SIP WG established in September 1999. </li></ul><ul><li>Now new SIPPING (applications) and SIMPLE (presence and instant messaging) WGs using SIP. </li></ul><ul><li>RFC2543bis-09 I-D became RFC 3261 in June 2002 </li></ul><ul><ul><li>Added four new authors: G. Camarillo, A. Johnston, J. Peterson, and R. Sparks. </li></ul></ul><ul><ul><li>Entire spec rewritten for clarity, but some new features </li></ul></ul><ul><ul><li>Mostly backwards compatible with RFC 2543 </li></ul></ul><ul><li>Many other SIP extensions published as RFCs. </li></ul>
    6. 6. SIP “Rendezvous” Functionality <ul><li>Locate another SIP device </li></ul><ul><li>Locate a SIP server to facilitate the finding of another SIP device </li></ul><ul><li>Establish a media session using an offer/answer exchange </li></ul><ul><li>Modify an existing session using an offer/answer exchange </li></ul><ul><li>Express a SIP device’s capabilities and features </li></ul><ul><li>Request 3rd party (remote) call control operations </li></ul><ul><li>Find out the status, capabilities, and availability of another SIP device </li></ul><ul><li>Request future updates on the status and availability of another SIP device </li></ul><ul><li>Exchange mid call signaling information </li></ul><ul><li>Exchange short instant messages </li></ul>
    7. 7. SIP Requests <ul><li>SIP Requests are called “methods” </li></ul><ul><li>Examples: </li></ul>
    8. 8. SIP Responses <ul><li>SIP Responses have a numerical part and a reason phrase </li></ul><ul><li>First digit of code indicates class of response </li></ul><ul><li>Examples </li></ul>
    9. 9. SIP Uniform Resource Indicators (URIs) <ul><li>Same form as email addresses: user@domain </li></ul><ul><li>Two URI schemes: </li></ul><ul><ul><li>s ip:henry@pulver.com is a SIP URI </li></ul></ul><ul><ul><ul><li>Most common form introduced in RFC 2543 </li></ul></ul></ul><ul><ul><li>sips:henry@pulver.com is a Secure SIP URI </li></ul></ul><ul><ul><ul><li>New scheme introduced in RFC 3261 </li></ul></ul></ul><ul><ul><ul><li>Requires TLS over TCP as transport for security </li></ul></ul></ul><ul><li>Two types of SIP URIs: </li></ul><ul><ul><li>Address of Record (AOR) (identifies a user) </li></ul></ul><ul><ul><ul><li>sip:henry@pulver.com (Needs DNS SRV records to locate SIP Servers for mci.com domain) </li></ul></ul></ul><ul><ul><li>Contact (identifies a device and is usually a Fully Qualified Domain Name, FQDN ) </li></ul></ul><ul><ul><ul><li>sip:henry@127.24.45.4 or sip:henry@wisip.pulver.com (Which needs no resolution for routing) </li></ul></ul></ul><ul><li>Other URI Schemes used with SIP </li></ul>
    10. 10. Related Protocols <ul><li>SDP – Session Description Protocol </li></ul><ul><ul><li>Used to describe media session. </li></ul></ul><ul><ul><li>Carried as a message body in SIP messages. </li></ul></ul><ul><ul><li>Text-based protocol </li></ul></ul><ul><ul><li>Uses RTP/AVP Profiles for common media types </li></ul></ul><ul><ul><li>Defined by RFC 2327 </li></ul></ul><ul><ul><ul><li>Minor updates in draft-ietf-mmusic-sdp-new-xx.txt </li></ul></ul></ul><ul><ul><li>SIP use of SDP based on Offer/Answer model RFC 3264 </li></ul></ul><ul><li>RTP – Real-time Transport Protocol </li></ul><ul><ul><li>Used to transport media packets over IP </li></ul></ul><ul><ul><li>RTP adds a bit-oriented header containing: </li></ul></ul><ul><ul><ul><li>name of media source </li></ul></ul></ul><ul><ul><ul><li>timestamp </li></ul></ul></ul><ul><ul><ul><li>codec type </li></ul></ul></ul><ul><ul><ul><li>sequence number </li></ul></ul></ul><ul><ul><li>Defined by H. Schulzrinne et al, RFC 3550. </li></ul></ul><ul><ul><li>Profiles defined by RFC 3551. </li></ul></ul><ul><ul><li>RTCP for exchange of participant and quality reports. </li></ul></ul><ul><ul><li>RTCP-XR provides additional VoIP statistics defined in RFC 3611 </li></ul></ul>
    11. 11. SIP Element Types <ul><li>User Agent (UA) </li></ul><ul><ul><li>PSTN Gateway </li></ul></ul><ul><ul><li>Minimal capabilities </li></ul></ul><ul><li>Advanced User Agent </li></ul><ul><ul><li>Multimedia </li></ul></ul><ul><ul><li>Call control and conferencing </li></ul></ul><ul><li>Proxy Server </li></ul><ul><ul><li>Receives requests from UAs and acts upon them </li></ul></ul><ul><ul><li>Performs database queries (DNS, etc.) </li></ul></ul><ul><ul><li>Signaling only – ignores message bodies (SDP) and never sees media flow (RTP) </li></ul></ul><ul><ul><li>Can implement services (forwarding, find me, voice mail, etc.) </li></ul></ul><ul><ul><li>Can be stateless, transaction stateful, or call stateful </li></ul></ul><ul><ul><li>Drops out of signaling after initial exchange unless Record-Routes </li></ul></ul><ul><li>Redirect Server </li></ul><ul><ul><li>Server queries database or implements service then returns response in 3xx </li></ul></ul><ul><ul><li>Simple query/response mechanism </li></ul></ul><ul><li>Registrar Server </li></ul><ul><ul><li>Receives REGISTER requests and populates Location Server database </li></ul></ul><ul><li>Location Server </li></ul><ul><ul><li>Database of AOR/Contact URI binding </li></ul></ul><ul><ul><li>Consulted by proxy and redirect servers </li></ul></ul><ul><ul><li>No standard IETF protocol defined </li></ul></ul><ul><li>Back to Back User Agent (B2BUA) </li></ul><ul><ul><li>Terminates SIP session and re-originates </li></ul></ul><ul><ul><li>May also proxy RTP media </li></ul></ul><ul><ul><li>Breaks end-to-end security and service transparency </li></ul></ul>
    12. 12. SIP Call Flow Example Proxy proxy.aol.com 200 OK 200 OK Proxy server.munich.de BYE Media Session ACK UA sip:schroed5422@aol.com UA sip:w.heisenberg@munich.de INVITE INVITE INVITE 100 Trying 100 Trying 180 Ringing 180 Ringing 180 Ringing 200 OK 200 OK “ SIP Trapezoid”
    13. 13. SIP Message Details <ul><li>INVITE sip:wh@200.201.202.203 SIP/2.0 </li></ul><ul><li>Via: SIP/2.0/UDP proxy.munich.de:5061;branch=z9hG4bK8542.1 </li></ul><ul><li>Via: SIP/2.0/TLS proxy.aol.com:5060;branch=z9hG4bK9213 </li></ul><ul><li>Via: SIP/2.0/UDP 100.101.102.103:5060;branch=z9hG4bK45a35h76 </li></ul><ul><li>Max-Forwards: 69 </li></ul><ul><li>To: Heisenberg <sip:w.heisenberg@munich.de> </li></ul><ul><li>From: E. Schroedinger <sip:schroed5244@aol.com>;tag=312345 </li></ul><ul><li>Call-ID: 105637921@100.101.102.103 </li></ul><ul><li>CSeq: 1 INVITE </li></ul><ul><li>Contact: sip:schroed5244@100.101.102.103 </li></ul><ul><li>Content-Type: application/sdp </li></ul><ul><li>Content-Length: 159 </li></ul><ul><li>First line of a SIP message is Start Line which contains: </li></ul><ul><ul><li>the method or Request type: INVITE ( session setup request). </li></ul></ul><ul><ul><li>the Request-URI which indicates who the request is for sip:wh@200.201.202.203 </li></ul></ul><ul><ul><ul><li>Note: Request-URI can be either an AOR or Contact (FQDN) </li></ul></ul></ul><ul><ul><ul><li>This Request-URI is a FQDN, but the initial Request-URI was an AOR (same as To URI) </li></ul></ul></ul><ul><ul><li>the SIP version number SIP/2.0 </li></ul></ul>
    14. 14. SIP Message Details <ul><li>INVITE sip:w.h@200.201.202.203 SIP/2.0 </li></ul><ul><li>Via: SIP/2.0/UDP proxy.munich.de:5061;branch=z9hG4bK8542.1 </li></ul><ul><li>Via: SIP/2.0/TLS proxy.aol.com:5060;branch=z9hG4bK9213 </li></ul><ul><li>Via: SIP/2.0/UDP 100.101.102.103:5060;branch=z9hG4bK45a35h76 </li></ul><ul><li>Max-Forwards: 69 </li></ul><ul><li>To: Heisenberg <sip:w.heisenberg@munich.de> </li></ul><ul><li>From: E. Schroedinger <sip:schroed5244@aol.com>;tag=312345 </li></ul><ul><li>Call-ID: 105637921@100.101.102.103 </li></ul><ul><li>CSeq: 1 INVITE </li></ul><ul><li>Contact: sip:schroed5244@100.101.102.103 </li></ul><ul><li>Content-Type: application/sdp </li></ul><ul><li>Content-Length: 159 </li></ul><ul><li>Via headers show the path the request has taken </li></ul><ul><ul><li>The bottom Via header is inserted by the User Agent which initiated the request </li></ul></ul><ul><ul><li>Additional Via headers are inserted by each proxy in the path </li></ul></ul><ul><ul><li>Shows transport used (TLS between proxies in this case) </li></ul></ul><ul><li>The Via headers are used to route responses back the same way </li></ul><ul><li>Required branch parameter contains a “cookie” ( z9hG4bK ) then a transaction-ID. </li></ul>
    15. 15. SIP Message Details <ul><li>INVITE sip:w.h@200.201.202.203 SIP/2.0 </li></ul><ul><li>Via: SIP/2.0/UDP proxy.munich.de:5061;branch=z9hG4bK8542.1 </li></ul><ul><li>Via: SIP/2.0/TLS proxy.aol.com:5060;branch=z9hG4bK9213 </li></ul><ul><li>Via: SIP/2.0/UDP 100.101.102.103:5060;branch=z9hG4bK45a35h76 </li></ul><ul><li>Max-Forwards: 69 </li></ul><ul><li>To: Heisenberg <sip:w.heisenberg@munich.de> </li></ul><ul><li>From: E. Schroedinger <sip:schroed5244@aol.com>;tag=312345 </li></ul><ul><li>Call-ID: 105637921@100.101.102.103 </li></ul><ul><li>CSeq: 1 INVITE </li></ul><ul><li>Contact: sip:schroed5244@100.101.102.103 </li></ul><ul><li>Content-Type: application/sdp </li></ul><ul><li>Content-Length: 159 </li></ul><ul><li>Max-Forwards is a count decremented by each proxy that forwards the request. </li></ul><ul><li>When count goes to zero, request is discarded and 483 Too Many Hops response is sent. </li></ul><ul><li>Used for stateless loop detection. </li></ul>
    16. 16. SIP Message Details <ul><li>INVITE sip:w.h@200.201.202.203 SIP/2.0 </li></ul><ul><li>Via: SIP/2.0/UDP proxy.munich.de:5061;branch=z9hG4bK8542.1 </li></ul><ul><li>Via: SIP/2.0/TLS proxy.aol.com:5060;branch=z9hG4bK9213 </li></ul><ul><li>Via: SIP/2.0/UDP 100.101.102.103:5060;branch=z9hG4bK45a35h76 </li></ul><ul><li>Max-Forwards: 69 </li></ul><ul><li>To: Heisenberg <sip:w.heisenberg@munich.de> </li></ul><ul><li>From: E. Schroedinger <sip:schroed5244@aol.com>;tag=312345 </li></ul><ul><li>Call-ID: 105637921@100.101.102.103 </li></ul><ul><li>CSeq: 1 INVITE </li></ul><ul><li>Contact: sip:schroed5244@100.101.102.103 </li></ul><ul><li>Content-Type: application/sdp </li></ul><ul><li>Content-Length: 159 </li></ul><ul><li>Dialog (formerly called call leg) information is in headers: </li></ul><ul><ul><li>To tag, From tag, and Call-ID (Note: Not URIs) </li></ul></ul><ul><li>To and From URIs usually contain AOR URIs. </li></ul><ul><li>All requests and responses in this call will use this same Dialog information. </li></ul><ul><li>Call-ID is unique identifier usually composed of </li></ul><ul><ul><li>pseudo-random string or string “@” hostname or IP Address </li></ul></ul>
    17. 17. SIP Message Details <ul><li>CSeq Command Sequence Number </li></ul><ul><ul><li>Initialized at start of call ( 1 in this example) </li></ul></ul><ul><ul><li>Incremented for each subsequent request </li></ul></ul><ul><ul><li>Used to distinguish a retransmission from a new request </li></ul></ul><ul><li>Also contains the request type (method) - INVITE </li></ul>INVITE sip:w.h@200.201.202.203 SIP/2.0 Via: SIP/2.0/UDP proxy.munich.de:5061;branch=z9hG4bK8542.1 Via: SIP/2.0/TLS proxy.aol.com:5060;branch=z9hG4bK9213 Via: SIP/2.0/UDP 100.101.102.103:5060;branch=z9hG4bK45a35h76 Max-Forwards: 69 To: Heisenberg <sip:w.heisenberg@munich.de> From: E. Schroedinger <sip:schroed5244@aol.com>;tag=312345 Call-ID: 105637921@100.101.102.103 CSeq: 1 INVITE Contact: sip:schroed5244@100.101.102.103 Content-Type: application/sdp Content-Length: 159
    18. 18. SIP Message Details <ul><li>INVITE sip:w.h@200.201.202.203 SIP/2.0 </li></ul><ul><li>Via: SIP/2.0/UDP proxy.munich.de:5061;branch=z9hG4bK8542.1 </li></ul><ul><li>Via: SIP/2.0/TLS proxy.aol.com:5060;branch=z9hG4bK9213 </li></ul><ul><li>Via: SIP/2.0/UDP 100.101.102.103:5060;branch=z9hG4bK45a35h76 </li></ul><ul><li>Max-Forwards: 69 </li></ul><ul><li>To: Heisenberg <sip:w.heisenberg@munich.de> </li></ul><ul><li>From: E. Schroedinger <sip:schroed5244@aol.com>;tag=312345 </li></ul><ul><li>Call-ID: 105637921@100.101.102.103 </li></ul><ul><li>CSeq: 1 INVITE </li></ul><ul><li>Contact: sip:schroed5244@100.101.102.103 </li></ul><ul><li>Content-Type: application/sdp </li></ul><ul><li>Content-Length: 159 </li></ul><ul><li>Contact header contains a SIP FQDN URI for direct communication between User Agents </li></ul><ul><ul><li>If Proxies do not Record-Route , they can be bypassed </li></ul></ul><ul><ul><ul><li>If Record-Route is present in 200 OK, then a Route header is present in all future requests in this dialog. </li></ul></ul></ul><ul><li>Contact header is also present in 200 OK response </li></ul>
    19. 19. SIP Message Details <ul><li>Content-Type indicates the type of message body attachment (others could be text/plain , application/cpl+xml , etc.) </li></ul><ul><li>Content-Length indicates the octet (byte) count of the message body. </li></ul><ul><li>Message body is separated from SIP header fields by a blank line (CRLF). </li></ul>INVITE sip:w.h@200.201.202.203 SIP/2.0 Via: SIP/2.0/UDP proxy.munich.de:5061;branch=z9hG4bK8542.1 Via: SIP/2.0/TLS proxy.aol.com:5060;branch=z9hG4bK9213 Via: SIP/2.0/UDP 100.101.102.103:5060;branch=z9hG4bK45a35h76 Max-Forwards: 69 To: Heisenberg <sip:w.heisenberg@munich.de> From: E. Schroedinger <sip:schroed5244@aol.com>;tag=312345 Call-ID: 105637921@100.101.102.103 CSeq: 1 INVITE Contact: sip:schroed5244@100.101.102.103 Content-Type: application/sdp Content-Length: 159
    20. 20. SDP Message Body Details <ul><li>v=0 </li></ul><ul><li>o=schroed5244 289084526 28904529 IN IP4 100.101.102.103 </li></ul><ul><li>s=- </li></ul><ul><li>c=IN IP4 100.101.102.103 </li></ul><ul><li>t=0 0 </li></ul><ul><li>m=audio 49170 RTP/AVP 0 97 98 </li></ul><ul><li>a=rtpmap:0 PCMU/8000 </li></ul><ul><li>a=rtpmap:97 iLBC/8000 </li></ul><ul><li>a=rtpmap:98 telephone-event/8000 </li></ul><ul><li>Version number (ignored by SIP) </li></ul><ul><li>Origin (only version used by SIP - 28904529 ) </li></ul><ul><li>Subject (ignored by SIP) </li></ul><ul><li>Connection Data (IP Address for media - 100.101.102.103 ) </li></ul><ul><li>Time (ignored by SIP) </li></ul><ul><li>Media (type - audio , port - 49170 , RTP/AVP Profile – 0, 97, 98 ) </li></ul><ul><li>Attributes </li></ul><ul><ul><li>RTP/AVP 0 is PCM  Law (64kb/s) </li></ul></ul><ul><ul><li>RTP/AVP 97 (dynamic payload) is Internet Low Bit Rate Codec (iLBC) RFC 3952 </li></ul></ul><ul><ul><li>RTP/AVP 98 (dynamic payload) is for telephone events (DTMF) RFC 2833 </li></ul></ul>
    21. 21. SIP Response Details <ul><li>Via , To , From , Call-ID , & CSeq are all copied from request. </li></ul><ul><ul><li>To now has a tag inserted by UAS </li></ul></ul><ul><li>Contact and Message Body contain UAS information. </li></ul>SIP/2.0 200 OK Via: SIP/2.0/UDP proxy.munich.de:5061;branch=z9hG4bK8542.1 Via: SIP/2.0/TLS proxy.aol.com:5060;branch=z9hG4bK9213 Via: SIP/2.0/UDP 100.101.102.103:5060;branch=z9hG4bK45a35h76 To: Heisenberg <sip:w.heisenberg@munich.de>; tag=24019385 From: E. Schroedinger <sip:schroed5244@aol.com>;tag=312345 Call-ID: 105637921@100.101.102.103 CSeq: 1 INVITE Contact: sip:wh@200.201.202.203 Content-Type: application/sdp Content-Length: 173 v=0 o=Heisenberg 2452772446 2452772446 IN IP4 200.201.202.203 s=SIP Call c=IN IP4 200.201.202.203 t=0 0 m=audio 56321 RTP/AVP 0 a=rtpmap:0 PCMU/8000
    22. 22. Example SIP Header Fields
    23. 23. SIP Capability Discovery <ul><li>SIP has strong capability discovery. </li></ul><ul><li>Using OPTIONS inside or outside a session </li></ul><ul><li>Declared in INVITE and other requests and responses </li></ul><ul><li>Indicates </li></ul><ul><ul><li>The types of SIP requests (methods) the UAC will accept ( Accept header field) </li></ul></ul><ul><ul><li>Any SIP extensions and capabilities ( Supported header field) </li></ul></ul><ul><ul><li>The characteristics of the UAC such as whether it is mobile or fixed, a conference server, etc. (feature tags in the Contact header field) </li></ul></ul><ul><ul><li>Any SIP event packages supported ( Allow-Events header field) </li></ul></ul><ul><ul><li>Any SIP extensions and capabilities required to complete the request ( Require header field) </li></ul></ul><ul><ul><li>The type of message bodies accepted ( Accept-Content header field) </li></ul></ul><ul><ul><li>Call control capabilities </li></ul></ul><ul><ul><li>Capabilities and characteristics of a UA (feature tags) </li></ul></ul><ul><ul><li>Codecs supported (SDP message body response to OPTIONS ) </li></ul></ul>
    24. 24. SIP Extensions and Features <ul><li>Method Extensions </li></ul><ul><ul><li>Unknown methods rejected by UA using 405 or 501 response </li></ul></ul><ul><ul><li>Listed in Allow header field </li></ul></ul><ul><ul><li>Proxies treat unknown methods as a non- INVITE </li></ul></ul><ul><li>Header Field Extensions </li></ul><ul><ul><li>Unknown header fields are ignored by UAs and Proxies </li></ul></ul><ul><ul><li>Some have feature tags registered, can be declared in a Supported or Require header field. </li></ul></ul><ul><li>Message Body Extensions </li></ul><ul><ul><li>Unknown message body types are rejected with a 406 response. </li></ul></ul><ul><ul><li>Supported types can be declared with a Accept header field. </li></ul></ul><ul><ul><li>Content-Disposition indicates what to do with it. </li></ul></ul><ul><li>Extensions must define fallback to base specification. </li></ul><ul><li>Result – No Profiling is Needed! </li></ul>
    25. 25. SIP Message Body Types
    26. 26. Successful Session Establishment Through One Proxy INVITE F1 INVITE F2 100 (Trying) F3 180 (Alerting) F4 180 (Alerting) F5 200 (OK) F6 200 (OK) F7 ACK F8 ACK F9 Both way RTP media BYE F10 BYE F11 ACK F12 ACK F13 Progress tone Ring back Call is accepted Dialog state tear-down IM/Voice/video conversation Hang up call Call state tear-down Start the call Alice SIP Proxy Bob Dialog state Call state The italic/underlined events require human audio and visual interaction
    27. 27. Successful Session Establishment Through P2P SIP Both way RTP media Progress tone Ring back Call is accepted Dialog state tear-down IM/Voice/video conversation Hang up call Call state tear-down Start the call INVITE F1 100 (Trying) F2 180 (Alerting) F3 200 (OK) F4 ACK F5 ACK F7 BYE F6 Alice Bob Dialog state Call state The italic/underlined events require human audio and visual interaction DHT P2P
    28. 28. SIP and PSTN Interworking <ul><li>Gateways interwork SIP with PSTN </li></ul><ul><ul><li>Signaling: SIP to ISUP (or ISDN D-channel) </li></ul></ul><ul><ul><li>Media: RTP to PCM trunk (or B-channel) </li></ul></ul><ul><li>Details in “ISUP to SIP Mapping” RFC 3398 by G. Camarillo et al. </li></ul><ul><li>SIP/PSTN Call flows in RFC 3666 by A. Johnston et al. </li></ul>The 183 Session Progress response is used along with “early media” RTP packets to provide “inband” call progress indicators. 2 407 Proxy Auth Req. SIP Phone Proxy Server SIP/PSTN Gateway PSTN Switch 1 INVITE 3 ACK 5 100 Trying 4 INVITE WWW-Auth 14 ACK 9 183 Session Progress 6 INVITE 8 Alerting 7 Setup 15 ACK 12 200 OK 13 200 OK 11 Answer 10 183 Session Progress Early Media RTP Media RTP PSTN Phone
    29. 29. SIP dialogs and routes <ul><li>Dialog: P2P SIP relationship between 2 UAs </li></ul><ul><li> Sequencing and routing between UAs </li></ul><ul><ul><li>Dialog ID = Call-ID, local/remote tag (To/From) </li></ul></ul><ul><ul><li>Dialog uses sequence numbers for state </li></ul></ul><ul><ul><li>Dialog states: Early, provisional and final responses </li></ul></ul><ul><li>Route through a select list of proxies </li></ul><ul><li>Via header indicates the path taken so far </li></ul><ul><li>Branch parameter starting with <z9hG4bK> </li></ul><ul><li>Loose routing: Separates the destination and the path </li></ul><ul><li>Forking: Parallel search using several INVITE’s </li></ul>
    30. 30. Tags and branches in SIP routing with two proxies Alice Proxy 1 Proxy 2 Bob F1 INVITE F2 INVITE F3 INVITE F6 100 F4 100 F5 180 F6 180 F7 180 F8 200 F9 200 F10 200 F11 ACK F12 ACK F13 ACK F14 BYE F15 BYE F16 BYE F17 200 F18 200 F15 200 VIA: branch z9hG4bK74bf9 From: tag=9fxced76sl Via: branch=z9hG4bK2d4790.1 Via: branch=z9hG4bK721e4.1 To: tag=314159 RTP Media From: tag=314159 RFC 3665 Section 3.2. response and request tag processing
    31. 31. SIP-T ISUP Messages are carried as multipart MIME message bodies in the SIP messages between the SIP-T Gateways. (RFC 3204) Advantage: Possible ISUP transparency Disadvantages: SIP-T does not interwork with SIP Perpetuates ISUP PSTN Switch 2 INVITE (IAM) SIP-T Gateway 6 183 Session Progress (ACM) 9 200 OK (ANM) 11 ACK 13 BYE (REL) 16 200 OK (RLC) RTP Media Session No Media Session PSTN Switch 5 ACM 8 ANM 14 REL 15 RLC 3 IAM 4 100 Trying One way RTP Media One way speech Two way speech No Speech Path SIP-T Gateway 7 ACM 10 ANM 12 REL 17 RLC 1 IAM One way speech Two way speech No Speech Path
    32. 32. Digest Challenge/Response SIP User Agent 1 INVITE Proxy Server 3 ACK 4 INVITE Proxy-Auth:1 5 100 Trying 17 200 OK Authenticated Media Session SIP User Agent 7 401 Unauthorized 9 ACK 16 200 OK 19 ACK 6 INVITE 2 407 Proxy Authentication Required 8 401 Unauthorized 10 ACK 11 INVITE Proxy-Auth:1, WWW-Auth:2 13 100 Trying 14 180 Ringing 12 INVITE WWW-Auth:2 15 180 Ringing 18 ACK Caller is challenged by Proxy Server and Called User Agent. Relies on “shared secret” (username and password) exchange. Based on HTTP Digest RFC 2716 Does not provide integrity protection unless qop=auth-int
    33. 33. SIP Digest Example <ul><li>INVITE sip:913145551212@siptest.mci.com SIP/2.0 </li></ul><ul><li>From: sip:alan.johnston@siptest.mci.com;tag=1c31657 </li></ul><ul><li>To: sip:913145551212@siptest.mci.com </li></ul><ul><li>Call-Id: call-1087694972-1@192.168.0.32 </li></ul><ul><li>Cseq: 2 INVITE </li></ul><ul><li>Contact: <sip:alan.johnston@192.168.0.32> </li></ul><ul><li>Content-Type: application/sdp </li></ul><ul><li>Content-Length: 306 Accept-Language: en </li></ul><ul><li>Allow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE </li></ul><ul><li>Supported: replaces, join </li></ul><ul><li>User-Agent: Pingtel/2.1.11 (VxWorks) </li></ul><ul><li>Date: Sun, 20 Jun 2004 01:29:40 GMT </li></ul><ul><li>Proxy-Authorization: DIGEST USERNAME=&quot;alanjohnston&quot;, REALM=&quot;MCI&quot;, NONCE=&quot;f9d26bd9c4766eacd3101d8d2dc5f38d.1087694984&quot;, URI=&quot;sip:913145551212@siptest.mci.com&quot;, RESPONSE=&quot;fe1545a816d698b993b83bade8428c0f&quot; </li></ul><ul><li>Via: SIP/2.0/UDP 192.168.0.32 </li></ul><ul><li>(SDP Message body not shown) </li></ul>
    34. 34. SIP Media Negotiation – The Offer Answer Model <ul><li>Media Session negotiation is handled using Offer Answer model </li></ul><ul><ul><li>RFC 3264 – a two pass mechanism </li></ul></ul><ul><li>Usage of SDP </li></ul><ul><li>Offer and Answer carried in: </li></ul><ul><ul><li>INVITE/200 OK (most common) </li></ul></ul><ul><ul><li>200 OK/ACK (used in 3pcc) </li></ul></ul><ul><ul><li>Combinations of INVITE , reliable 18x , PRACK , UPDATE , etc. (used in preconditions) </li></ul></ul><ul><li>Order and number of media lines must be the same in an offer answer exchange </li></ul><ul><li>Media streams can be added by appending media line in an offer. </li></ul><ul><li>Media streams can be refused or deleted by setting port to 0 in offer or answer. </li></ul><ul><li>Offer lists all codecs supported in preference order </li></ul><ul><li>Answerer answers with a subset </li></ul><ul><li>If none in common, media stream is declined in answer. </li></ul><ul><li>Streams can be marked sendrecv, sendonly, recvonly </li></ul><ul><li>Offer Answer Examples I-D has many examples </li></ul><ul><ul><li>draft-ietf-mmusic-offer-answer-examples-05.txt </li></ul></ul>
    35. 35. The Ecologic System of SIP SIP XCAP (config) RTSP SIMPLE Presence+IM policy RPID … . SDP XCON (conferencing) STUN/TURN/ICE (NAT traversal) RTP (media) configures initiates carries carries controls provide addresses Ref: H. Schulzrinne

    ×