SIP For Multimedia PDF
SIP For Multimedia PDF
SIP For Multimedia PDF
Faisal Chaudhry
[email protected]
Technical Leader
Cisco Advanced Services
REFER
Session Timer RFC 2543 1999
Privacy
Message-Waiting SIPPING-WG
Diversion Bis-01
3PCC
Presence Bis-02
SIP-T Bis-03
Tel: URL
Bis-04 SIP-WG
TRIP
INFO Bis-05
T.38 Bis-06
Supported
Caller-Pref Bis-07
PRACK / COMET SIMPLE-WG
Bis-08
Etc..
Bis-09 2002
RFC 3261
© Cisco Systems, Inc. All rights reserved. 6
SIP – What Is it?
SIP SIP
S PSTN
E SIP User
Agents (UA)
R
V
I
RTP
C (Media)
E
S Legacy PBX
© Cisco Systems, Inc. All rights reserved. 10
5 Facets for Establishing and Terminating
Multimedia Communications Using SIP
UA 1 UA 2 UA 3 UA 4
LAN A LAN B
• Client—Server model
User Agent Client (UAC)—Initiates sessions
User Agent Server (UAS)—Responds to
session requests
UA 1 UA 2
SIP
Gateways
Speech Only
Telephone
LAN A Network (PSTN)
UA 1 UA 2
IP
UA 3
Network
UA 4
Client Server
Proxy
• Optional *logical* SIP component
• Handles routing of SIP signaling messages
• Can add/modify/remove Headers from SIP
messages
© Cisco Systems, Inc. All rights reserved. 16
SIP Proxy Server
UA 1 UA 2
IP UA 3
Network
Registrar
UA 4
Server
UA 1 UA 2
IP
UA 3
Network
Redirect
UA 4
Server
SIP
Location Servers/
Registrar Redirect Database Services
“Where is this
name/phone#?”
3xx Redirection
“They moved,
REGISTER SIP Proxy
try this address”
“Here I am”
Proxied INVITE
“I’ll handle it for
INVITE
you”
“I want to talk
to another UA
SIP User
Agents SIP User
Agents
SIP-GW
Dialog 1
Dialog 1 Dialog 2
SIP message body is also SIP messages *sometimes* have a message body
- a SIP message header indicates the type of body
variable, but not always - could be text, data, audio, video or something else
present (depending on
the Message-type)
v=0
o=CiscoSystemsSIP-IPPhone-UserAgent 17045 11864 IN IP4 10.80.17.134
s=SIP Call
c=IN IP4 10.80.17.134
body t=0 0
m=audio 29118 RTP/AVP 0 101
a=rtpmap:0 pcmu/8000
a=rtpmap:101 telephone-event/8000
© Cisco Systems, Inc. All rights reserved. 27
SIP Addressing
• Fully-Qualified Domain Names
sip:jdoe.cisco.com
• SMTP-style Domain Names [RFC 2368]
sip:[email protected]
• E.164 style addresses [RFC 2806]
sip:[email protected]; user=phone
user=phone means this is a gateway
• Mixed addresses
sip:[email protected]; user=phone
sip:[email protected]
• Secure SIP Messaging (indicates TLS is used) [RFC 4346]
sips:[email protected]
called a “SIPS-URI” or just “SIPS”
© Cisco Systems, Inc. All rights reserved. 28
SIP—Headers Explained
INVITE sip:[email protected]
Destination SIP/2.0
for the SIP Message (but isn’t used for routing message)
Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bK776asdhds
Max-Forwards: 70
To: Bob <sip:[email protected]>
From: Alice <sip:[email protected]>;tag=1928301774
Call-ID: [email protected]
CSeq: 314159 INVITE
Contact: <sip:[email protected]>
Content-Type: application/sdp
Content-Length: 142
*then*
Acceptance Message
*or*
ONLY
one of Redirection Message
these is
*or*
sent
Rejection Message
Expects an “answer”
© Cisco Systems, Inc. All rights reserved. 46
RFC 3261
INVITE (contains
“offer”)
RTP
Bearer RTCP
Plane
Media (UDP)
RTP
RTCP
SIP Proxy
INVITE
INVITE
100 Trying
180 Ringing
180 Ringing
200 OK
200 OK
ACK
RTP
Transaction Stateful
A Proxy Server that receives a SIP Request retains state of that
transaction until that Server receives a Final Response (meaning a
2XX, 3XX, 4XX, 5XX or 6XX Response). Transaction Stateful has no
knowledge of a session Update Request (UPDATE), a Transfer
Request (REFER) or of a Termination Request (BYE)
Dialog Stateful
When Record Route Header is utilized by a Proxy while processing
a SIP Request to ensure all remaining messages traverse that
Proxy; this applies to each proxy that is in the signaling path
between UAs
Invite
Invite (w/ RR header)
180 Ringing
180 Ringing
200 OK (w/ RR header)
200 OK (w/ RR header)
Session Established
Invite
Invite (w/ RR header)
Invite (w/ RR header)
100 Trying
100 Trying
Bob’s
Cell Phone
Bob’s
Cell Phone
v i te
vi te
In
Bob’s
Office
Atlanta.com Biloxi.com Phone
Alice
Invite Invite Invite
v i te ng
In i
R ing Bob’s
0 L Office
Atlanta.com Biloxi.com 18 NCE
CA Phone
Alice
Bob’s
-If the Proxy is also “Dialog Stateful”, Cellphone
it will receive BYE Request from Alice or Bob
© Cisco Systems, Inc. All rights reserved. 59
RFC 3265&3680
SUBSCRIBE - used to
SUBSCRIBE (Event: Reg) request asynchronous
notification of an event or
set of events at a later
time
• method used to request current
state and state updates from a
SUBSCRIBE sip:[email protected] SIP/2.0
remote node
Via: SIP/2.0/TCP app_IM.atlanta.com
;branch=z9hG4bKnashds7 • Expires header SHOULD be
From: sip:app_IM.atlanta.com ;tag=123aa9 present in Request
To: sip:[email protected] • Requests MUST have exactly
Call-ID: 9987@app_IM.atlanta.com one Event Header value
CSeq: 9887 SUBSCRIBE
Contact: sip:app_IM.atlanta.com
Event: reg
Max-Forwards: 70
Expires: 21600
Accept: application/reginfo+xml
SUBSCRIBE - used to
SUBSCRIBE (Event: Reg) request asynchronous
200 OK notification of an event or
set of events at a later
time
• Expires header MUST be
present in Response
SIP/2.0 200 OK
Via: SIP/2.0/TCP app_IM.atlanta.com • 200-class responses indicate
;branch=z9hG4bKnashds7 ;received=10.1.3.2 that the subscription has been
From: sip:app_IM.atlanta.com ;tag=123aa9 accepted, and that a NOTIFY
To: sip:[email protected] ;tag=xyzygg will be sent immediately
Call-ID: 9987@app_IM.atlanta.com
CSeq: 9987 SUBSCRIBE
Contact: sip:server19.atlanta.com
Expires: 3600
MESSAGE
MESSAGE - the transfer of
messages between users
in near real-time
• Content (the payload) in
MIME body parts
MESSAGE sip:[email protected] SIP/2.0 • MESSAGE does not initiate
Via: SIP/2.0/TCP pc33.atlanta.com
;branch=z9hG4bK776asegma dialogs
Max-Forwards: 70 • There is no explicit
To: Bob <sip:[email protected]>
From: Alice <sip:[email protected]>;tag=1928301774 association between
Call-ID: [email protected] messages
CSeq: 22756 MESSAGE
Content-Type: text/plain • The body size MUST NOT
Content-Length: 37 exceed 1300 bytes
Isn’t this a great presentation ?
Domain Proxy
Server
Alice
INVITE /200 OK
SIP Only
INVITE /200 OK Domain
RT AC
P K
St
re
am
User
Agents
Call Agent
MGCP Only
YF
Domain
OK
NT
0
20
Carol Bob
Call Agent
MGCP Only
CX
CRC
Domain
OK
CR
200
X
0
20
OK
RTP
Stream
Carol Bob
Domain Proxy
Server
Alice Call Agent
INVITE INVITE
?
User
Agents
Carol Bob
Domain Proxy
Server
Alice Call Agent
? CRCX
NTFY
User
Agents
Carol Bob
INVITE
?
User
Agents
Carol Bob
Here?
Anna
Audrey
© Cisco Systems, Inc. All rights reserved. 75
Peer-to-Peer to/from Client/Server
Interworking
ACK
CRCX/
RTP
Strea
200 OK
m
User
Agents
Carol Bob
In Conclusion…