Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM [email protected].
-
Upload
avice-imogene-burns -
Category
Documents
-
view
230 -
download
0
Transcript of Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM [email protected].
Objectives
• What is SIP?
• Why Did the World Need SIP?
• What are the Differences between SIP, H.323 and MGCP?
• SIP Entities and their Functions
• Example of a Basic SIP Session.
What is SIP?• Session Initiation Protocol (SIP) is an application layer
control (signaling) protocol for creating, modifying and terminating sessions with one or more participants.
• SIP can invite both persons and "robots," such as a media storage service, to participate in a call.
• These sessions include multimedia such as Voice, Video Messaging and events.
• SIP is defined in RFC 3261 (preceded by RFC 2543).
What Else Is SIP Used For?• SIP is a flexible protocol designed to be part of
the overall IETF multimedia data and control architecture.
• Setup many types of sessions such as Push-To-Talk Over Cellular or IM
• Telephony over cable• Carrier backbone VoIP sessions (SIP-T)
between 2 PSTNs• Voice for 3G wireless networks (3GPP)
What Doesn’t SIP Do?
• Basic SIP does not offer conference control services.
• SIP does not prescribe how a conference is to be managed.
• SIP does not reserve resources, but can convey to the invited system the information necessary to do this.
How Does SIP Compare with H.323?
• SIP offers similar functionality to H.323
• SIP is protocol neutral: can use TCP/UDP or run on top of AAL5, IPX, X.25, SCTP etc.
• SIP architecture is modular hence extensible
• SIP is less complex
• SIP uses simpler encoding – Text vs. Binary.
• SIP supports calling-party number security
• SIP setup times are shorter
• SIP address is any URL while H.323 addressing is more confined
• Politics: SIP is IETF, H.323 is ITU-T
ITU
H.323
H.225
H.245
RTP
RTCP
IETF
SIP
SDP
SAP
RTP
RTCP
RTSP
MGCP
RAS
MGCP Carrier Grade
MGCP At The Access
How is SIP different from MGCP?• MGCP is a device control protocol. A slave (gateway
(MG)) is controlled by a master (media gateway controller (MGC), call agent).
• SIP may be used between controllers, in a peer-to-peer relationship.
• To the SIP side, the MGC looks like a node with a large number of connections, but otherwise the same as a "native" SIP device.
• The MG is completely unaware that the call between MGCs is established via SIP.
• Only the MGC needs to understand both protocols.
Combined Architecture
Why Did The World Need SIP?• H.323
– Uses the traditional approach of end-to-end call setup– Expands to accommodate other traditional services such as
Video
• SIP– “Flexible” protocol– Designed to scale and stay simple– Allows integrated services
• Voice• Video• IM• Presence• Conferencing
Why Did The World Need SIP?• VoIP–only applications are past the initial
adoption phase• Service providers are seeking to expand their
offerings• SIP is the most suitable tool to achieve that goal• SIP is matured enough for prime time • Example: adopted by cellular world for
– 3GPP Voice Core– Push-To-Talk over cellular– Packet Cable
SIP Entities
• SIP servers:– User Agent Client– User Agent Server– Proxy servers– Redirect servers– Registrars– Location server
• Application – specific servers e.g.:– IM server– POC server
• There are several different SIP entities, each with their own purpose.
User Agent Client• SIP device or application that initiates SIP
requests• This is the SIP name for endpoint device
User Agent Server• SIP device or application that terminates SIP
requests• UAS contacts the user when a SIP request is
received.• The UAS returns a response on behalf of the user.• The response either accepts, rejects, or redirects
the request.
User Agent Server
“Call for you?”
“I’ll accept.”
SIP Call Request
Call Accepted
Proxy Server• A proxy server is an intermediary program that acts as both a
server and a client for the purpose of making requests on behalf of other clients.
• A proxy interprets a request, and if necessary, rewrites the request message before forwarding it.
• Helps routing requests to user’s current location
Proxy Server
Forwards SIP Requests.
Responds on behalf Y and X.
Implements provider’s Call-routing policies
User Agent Y
User Agent X
Redirect ServerRedirects calls to new location.
A redirect server is a server that accepts a SIP request, then returns new addresses to the client.
Unlike a proxy server, a redirect server does not initiate its own SIP request.
Unlike a user agent server, a redirect server does not accept calls.
User Agent
User Agent
RedirectServer
Registrar
Redirect Server
Specialized UAS that Allows a user to register their presence.
A registrar is a server that accepts REGISTER requests.
A registrar is typically co-located with a proxy or redirect server.
A registrar may offer location services.
Proxy Server
RegisterServer
Protocol Building Blocks
Request Response Request
Transaction Transaction Transaction
Dialog Dialog
Session
RequestRequest Response
Transaction
SIP Request Types
• INVITE• ACK• BYE• CANCEL• OPTIONS
• REGISTER• MESSAGE• SUBSCRIBE• NOTIFY
SIP Response Codes
Code Phrase1xx Provisional2xx Success3xx Redirection4xx Client Error5xx Server Error6xx Global Failure
SIP Transactions• A SIP transaction consists of a SIP request
with the appropriate response.• To identify which SIP request a response is
for, the following fields should be identical.– Call-ID - uniquely identifies a particular invitation.– Cseq - (command sequence) a unique number that is
incremented for each command with the same call-ID.– To, From.– Tag (The Tag is only present when more than one Via
header field is present).
• In RFC 3261 less fields are required, with the presence of “magic cookie”
INVITE• The INVITE request asks a callee to establish
a 2-party call or join a conference call.• The INVITE includes a session description
(using SDP). The session description enumerates media types & formats.
• If the callee agrees, the caller sends an ACK & returns a description listing the media it wishes to use.– For a multicast session, the callee should only return a
session description if it is unable to receive the media indicated.
You are
cordially
invited...
Sip Session Phone to Phone
INVITE
1XX - Ringing
ACK
Conversation
BYE
200OK
200OK
INVITE With a Proxy Server
200 OK
EndUser
EndUser
ProxyServer
LocationServer
User AgentServerINVITE
RING
200 OK
ACK
mj
mj@bbThor
INVITEmj@bbThor
ACK
bulls.orgbulls.org
100 TRYING
Sip Session Via Proxy – RFC 3261
REGISTER (Address1)200OK
100 Trying
Conversation
200OK
INVITE
Register + Proxy Server
REGISTER (Address2)
200OK
INVITEINVITE
200Ok Invite (address2)
ACKACK
200OK
200Ok Invite (address1)
User decide
INVITE With a Redirect ServerEndUser
EndUser
RedirectServer
LocationServer
User AgentServerINVITE
RING
200 OK
mj
ACK
302 MOVED [email protected]
ACK
Sip IM Session
REGISTER - Online
200OK
200OK - Subscribe
SUBSCRIBE (User1)
Register + IM Server
NOTIFY - Online
200OK - Notify
REGISTER – Busy
200OKNOTIFY - Busy
200OK - Notify
200OK - Subscribe
User1 User2
SUBSCRIBE (Expire=0) Delete Subscription
The Scenario
Calling SIP Phone Called Proxy Servr Called SIP PhoneCalling Proxy Servr
Invite
Calling SIP Phone Called Proxy Servr Called SIP PhoneCalling Proxy Servr
INVITE
Status 100Trying
SIP Invite
Invite
Calling SIP Phone Called Proxy Servr Called SIP PhoneCalling Proxy Servr
INVITEw/Token
Status 100Trying
INVITE
Another Invite
Invite
Calling SIP Phone Called Proxy Servr Called SIP PhoneCalling Proxy Servr
INVITE
Status 180
SIP Invite with a Status Code
Provosional Response
Calling SIP Phone Called Proxy Servr Called SIP PhoneCalling Proxy Servr
Status 180
Status 180
SIP Status Codes
SIP OK Plus First RTP
Calling SIP Phone Called Proxy Servr Called SIP PhoneCalling Proxy Servr
RTP
200 OK
SIP OK Plus First RTP Frame
SIP OK Messages
Calling SIP Phone Called Proxy Servr Called SIP PhoneCalling Proxy Servr
200 OK
200 OK
SIP OK Messages
Calling SIP Phone Called Proxy Servr Called SIP PhoneCalling Proxy Servr
ACK
ACK
ACK
Acknoledgement